Change-Id: I21743290128140bef729eef967e841a65f9fdc67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482702
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12701
Change-Id: I51bfad4ff61f2ab32753e532eb5b6ee46d765303
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481737
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12700
Change-Id: Ie20156e3a7a9dec4524b379a617724cca21402d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481998
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I57233c89fb27f09ca22509edeab79ea6b158b3c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481281
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12701
Change-Id: If286f9398c099298b1a543a12d4a28ba70f7a20b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479062
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12700
Change-Id: Iea26b6478ce7b23f69f7a39320a40f4cef8231bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/480399
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12700
Change-Id: I66bc33c2888c94999dcae9f709a7199208c62af4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479756
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I793495c2a0c220b919a9f8b2ead2c784548c0211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479757
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I0695614a68a0d05d3a30163b4da5a75486f1d0b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479060
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This also hides the ctors for the respective classes so you can't just
arbitrarily make one outside of the factories.
Change-Id: If31ac8ea9b54c9e10c162081251e77d7e9d07147
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478956
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
With this CL, rt adjust is handled automatically by the backend of the
CommandBuffer when setViewport is called, so DrawPass and the
CommandBufferTest are updated to configure that (and the geometry of
command buffer test is rewritten to be in Skia's coord system instead
of NDC).
Currently, the metal command buffer uses push constants to set the
rtAdjust uniform. Hypothetically, D3D12 could use the root descriptor,
etc. There is some coupling here between the intrinsics the SkSL
programming environment operates in, and the backends configuring the
pipelines, but I don't think it's unreasonable and it seems cleaner
to me than having DrawPass bind and upload uniforms for all of the
intrinsics.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Release-Graphite
Bug: skia:12466
Change-Id: Id91e9ffc31688886c5bf3ee6134567070820207a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478656
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Passes the Transform for each draw to the RenderStep, to both
writeVertices and writeUniforms, since any given RenderStep could
choose to transform vertices on the CPU, pack the matrix as instance
attributes, or upload it as a uniform.
Also updates UniformManager to take the source data as const void*
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Release-Graphite
Bug: skia:12466
Change-Id: I7ac40af0b7c123d068478f5672dda455c0bbbfb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478376
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: Id17222170984731eb36b8158c5c97b9880d3a814
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478496
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
DrawWriter was using == to compare buffer bindings, but that hadn't
actually been added yet.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Release-Graphite
Bug: skia:12466
Change-Id: I769cd3cb9f58f9ffc1558da9f24b2b6000c27388
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478262
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: I85d23e73a37a368ed68c81191d072014df110080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475645
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12466
Change-Id: If1d4c29a434a1ad3445ceadb98bd7f3b8abb5ee4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475639
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12633
Change-Id: Ida78c4145423376dc0267096a1d758b74144fd0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/477139
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
To make the atomic rules a bit easier to work with, in many
of the folders, this adds in cc_library rules to group
together the sources from that folder (and subfolders
where prudent). We only needs sources because those atoms
should have their headers as deps.
One issue that was pointed out is that there is currently
no way to restrict the inclusion of certain packages,
a la, `gn check`. For example, there is no mechanism from
stopping a dev from adding
#include "modules/canvaskit/WasmCommon.h"
to something in //src/core (except circular dependencies).
We can probably address that using Bazel's visibility
rules as needed:
https://docs.bazel.build/versions/main/visibility.htmlhttps://docs.bazel.build/versions/main/be/functions.html#package_group
It is recommended to look at this CL patchset by patchset.
PS1: Update gazelle command to generate rules in more folders.
PS2: A few changes to make generation work better.
PS3: The result of running make generate in //bazel
PS4: Adding the rules to build sksllex, the simplest binary I
could find in the Skia repo.
PS5: Adding the rules to build skdiff, a more complex binary.
I tried a few approaches, but ended up gravitating back
towards the layout where we have each folder/package
group up the sources. I imagine at some point, we'll have
skdiff depend on skia_core or something, which will
have things like //src/core, //src/codecs, //src/pathops
all bundled together.
PS7: Added in the groupings of sources, similar to what we had
earlier. I liked these for readability. These helped fix
up the //:skia_core build, and by extension, the CanvasKit
build.
Change-Id: I3faa7c4e821c876b243617aacf0246efa524cbde
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/476219
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Also adds a helper class to upload uniform data the first time it's
seen, and then remember the BufferBindInfo for use after sorting.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12466
Change-Id: I922166a24c5f8417020c0a3288cddf6043573c79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475637
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I7fa9b4da48f993143ade3b8030e2c67831cf0ffd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475257
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12633
Change-Id: I47310b08f76afc29db56968c4a1abe6567ee40c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/477136
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: I84d017eda7964a19ddd36570cd46e8d98ba2f50f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474936
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
RenderSteps expose the uniforms they use for their portion of the
program, and assume will be bound independently of the other uniform
sets needed for the paint, etc.
This wires them up in DrawPass, although the RenderSteps currently don't
define any. At the moment this CL is really just laying out the API and
then it will be tested more thoroughly in a follow up when
CommandBufferTest moves its hard-coded test shaders into the RenderStep
paradigm.
Bug: skia:12466
Change-Id: I8287dadb9a458127ba9f376ba351ca1932788c71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474137
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Also renames UniformCache::findOrCreate() to insert(), and has it return
the assigned id. ExtractCombo() now does not take a UniformCache, since
it just has to return the CPU data extracted from the PaintParams. The
caching/id assignment is the responsibility of the DrawPass.
Updates unit tests and DrawPass to use this instead.
Bug: skia:12466
Change-Id: Ib363fcad799f62d0ad31bb9d3e4c995e191cae80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475798
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This adds a simple go program to test the installed go
toolchain, and a Make rule to codify the arguments to
our gazelle binary, built with extensions.
I could not figure out how to get the .json file to work
with the gazelle() Bazel rule, but this works ok for now.
Bug: skia:12541
Change-Id: I5067b15c7518951aeb69559d3871799d3b5745f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475716
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This uses the gazelle extension from
https://skia-review.googlesource.com/c/buildbot/+/473357
Review Tips:
- Ignore any changes to .h or .cpp files. Those have been
pulled out into their own CLs.
- Start with bazel/macros.bzl.
- Read the CL with the generation code, if you haven't already.
- Look at third_party/file_map_for_bazel.json.
- See experimental/bazel_test for an idea of how a cc_binary
would be made.
- Spot check one or two of the BUILD.bazel files.
This CL generates the "atomic" rules for src/, include/ and
modules/skshaper, as a starting point.
`bazel build --config clang //include/...` works
`bazel build --config clang //src/...` starts compiling,
(which verifies that the BUILD.bazel files are all valid),
but runs into errors because not all third_party deps have
been resolved, and there are some files missing from the
toolchain still (e.g. EGL headers).
Change-Id: Ib7e0fb0efdb9f08655f06cbc56e9bb4cf416294b
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474240
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Bug: skia:12466
Change-Id: Ie7414d7417e88249dd9f6421f8069be898adaece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474217
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Moves Attribute into its own header. I did not move AttributeSet/Iter
out of GraphicsPipelineDesc because RenderStep should be able to just
rely on SkSpan<Attribute>. Since they are fixed definitions, there
shouldn't be a need to support skipping over uninitialized attrs. Once
GraphicsPipelineDesc just points to a RenderStep, AttributeSet/Iter can
be deleted.
Bug: skia:12466
Change-Id: I3b01b6283669fc02dc9cd0521bb236a9d0daa5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474136
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I94ded218e822fe50687e1efff7d46bcc4c1f1293
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471780
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
All of the draw variants except drawIndexed support all base arguments
as part of the draw call that is recorded. Updated drawIndexed to use
the "instance" version and draw 1 instance if the baseVertex is not 0.
Previously, if we bound the buffer at a non-zero offset, but then
passed in 0 for the base vertex/instance relative to that, it would
reset the vertex offset to 0. This also cuts down on the number of
commands recorded since draws will only correspond to one command.
Bug: skia:12466
Change-Id: I3eb95b02d33f2d1e9b36991a8b824012383bc192
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474058
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Previously, while BindBufferInfo had the right offset for binding the
buffers, the writer would always overwrite the contents at the
beginning. Never encountered it because the CommandBufferTest made its
VertexWriters directly, and DrawPass isn't end-to-end yet.
Bug: skia:12466
Change-Id: Ib874006d80a7286fcc3710cd38b3c6141ff928ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474057
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12633
Change-Id: I3e4542e560a2c876b4b35bf340bdb949c4922c65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472556
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Draws that take a primitive with colors (vertices, patch, atlas) allow
the user to specify how the primitive color is blended with SkShader.
At the public level the blend is specified as SkBlendMode. This change
moves the implementation at SkDevice level over to SkBlender.
Future changes to the existing APIs or future APIs could allow clients
to specify SkBlenders instead of SkBlendMode. THis would would allow for
programmable blending between shader and primitive color.
SkShader_Blend now recognizes if it was constructed with a Mode blender
and extracts the mode enum.
SkBlender_Base::asFragmentProcessor no longer assumes that the dstFP's
input color should be args.fDestColor. Instead the caller
must configure that if desired. (We don't want this for drawAtlas, etc).
Change-Id: I44085da4ec9f4873428f38d629565f7f42c6be91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:12466
Change-Id: Iafd680901e10d1007a16da0112e41af4bf2f2703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472445
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I6d45f297db4be7e41158d87886ef03905e13eb66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472437
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This is split out of Michael's CL:
https://skia-review.googlesource.com/c/skia/+/468459
The CommandBufferTest gets a bit shortchanged in this CL but most of those changes should wait until the GraphicsPipelineDesc is expanded anyways.
Bug: skia:12466
Change-Id: Idba20354a4ab158c2bc46f490da23b8f5fcd55b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472336
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
We should only be using include/private for types that actually are
needed in include/ files. I moved everything that was just in src to
new src/*Types.h files. This actually left nothing in GraphiteTypesPriv
for now, so I deleted it. If we actually need private types that are
part of include/ we can add it back later.
Bug: skia:12466
Change-Id: I180fc2032afd47bc6c5e8b9ccd4954b5d2451fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471758
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
There are definitely some missing getters on other functions we'll need
on BackendTexture. But for this CL I just wanted to get the basics and
ctor working. Other functions can be added as they are needed.
Bug: skia:12633
Change-Id: I668828138df943a432efcec6b1134756e681a582
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469820
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I266ee1ae865e85f778191c7812b690e203bb4df4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471096
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: Ie8bbacd22375b4cb4a5fe7e39055cdba3a3d0896
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469519
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
RenderPassTask should only represent a single RenderPass with possible
subpasses (represented by DrawPasses). This reconstructs the RenderPass
setup to match this thinking. RenderPassDesc now stores TextureProxys for
the attachments, since we may not have instantiated the Textures by the
time we create the RenderPassTask.
Bug: skia:12466
Change-Id: I4f8cab77a297aaf76bea7dd1cc3afd00143b8103
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Replaced by Graphite.
Change-Id: Iac0ba212b078904a591677c9ce839a90562d0240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470305
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:12466
Change-Id: Icf59f2412a66f3f339635014f4b1e4c44d3c1619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469523
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I1e92dcf66c117ca351cebf20722524672c88e5cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469178
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
These rules can be used to build our GMs on WASM+WebGL and
libskia.a with just the CPU backend (and most other features
turned off).
This can be done with the following commands:
- bazel build //modules/canvaskit:gm-bindings-wasm --gpu_backend=gl_backend --with_gl_standard=webgl_standard
- bazel build :skia-core --config clang
This pivots slightly from http://review.skia.org/463517
by using config_settings [1] instead of platforms for
the optional features that we control. This pivot was
suggested in [2]
We have BUILD.bazel files in many of the subdirectories
that specify filegroups for the appropriate files. In
an effort to make //BUILD.bazel more readable, it is
the responsibility of these subfolders to deal with
conditionally including certain .h or .cpp files.
This is done using select statements and config_settings
or platform constraints as necessary.
For example, src/gpu/BUILD.bazel will different private
filegroups for each of the supported gpu backends [3]
and a more-visible filegroup called "srcs" that has
the right selection of the private files to be used
for compilation.
An effort has been made to avoid using glob() in our
BUILD.bazel files. These file lists were made by using
`ls -1` and some regex to add in quotes. We might want
to make a helper script to assist with that, if necessary.
To specify which options we have, the settings in
//bazel/common_config_settings/BUILD.bazel have been
redesigned. They make use of a macro `string_flag_with_values`
that removes the boilerplate. Patchset 36 shows what the
file looks like w/o the macro.
The top level BUILD.bazel file will still need to use
some logic to handle defines, because local_defines is
a list of strings, not a list of labels [4].
Suggested Review Order:
- WORKSPACE.bazel to see the new dependencies on the
emsdk toolchain and bazel_skylib
- bazel/common_config_settings/* to see the few settings
defined (we have more to define, see BUILD.gn and
//gn/skia.gni for ideas)
- BUILD.bazel to see the "skia-core" cc_library rule.
See also "gms" and "tests"
- modules/canvaskit/BUILD.bazel to see the use of
the emscripten "wasm_cc_binary" rule, which depends
on the "skia-core", "gms", and "tests" rule. Note that
it only builds some of the gms as a proof of concept.
- The other BUILD.bazel files. Some of these are not
platform or feature dependent (e.g. pathops). Others
are (e.g. gpu).
- All other files.
[1] https://docs.bazel.build/versions/4.2.1/skylark/config.html#user-defined-build-settings
[2] https://github.com/emscripten-core/emsdk/pull/920
[3] In this CL, that's just the webgl one.
[4] https://docs.bazel.build/versions/main/be/c-cpp.html#cc_library.local_defines
Change-Id: Ieecf9c106d5e3a6ae97d13d66be06b4b3c207089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458637
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
Also updates MtlRenderPipeline to be MtlGraphicsPipeline to match the
type it extends, although we could choose to have it stay matched with
the backend object (MTLRenderPipeline) that it wraps instead.
Bug: skia:12466
Change-Id: Ida118e68a93d737d21edca15a59f5e64e17b5fd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467780
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: Icd23abfa9ab1197a03e5d0f177747ea77b6b77e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465391
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: Id1e8311cbe5bfbc7a2c9aa9cc106ebef1d363e63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467459
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This is a reland of b95c83353f
Original change's description:
> [graphite] Fill in basic vertex and index buffers.
>
> Bug: skia:12466
> Change-Id: I2398fcabc6c797a0bfc2ebccc0289cbf8fd8c72f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466436
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: Iac083c75d15f46ede1c8337da2914ad0161909e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466774
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
If our shaders pass a halfN uniform to Metal, we need to put SkHalf data
into the uniform buffer.
Change-Id: I92324715e7fb64f3b342fdf2c6994ebb86ba1773
Bug: skia:12339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465756
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Uint was inconsistent--we had UByte and UShort, so ints should be UInt.
Change-Id: I71fdc3db902cdf62ab1de705dca2b0d069e9effb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466499
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I2398fcabc6c797a0bfc2ebccc0289cbf8fd8c72f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466436
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This adds check to make sure that the results in the last
add of the lerp are in range. Also, Smooth out types.
Change-Id: I853835e530f6b6790e16464db12964d68ab9ef8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453718
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Herb Derby <herb@google.com>
This flag is no longer needed, so remove it and the code it protected.
Change-Id: I679eb3cb4cee81c4205309012931e134e108f232
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465696
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Additionally, the default clip state was quick rejecting all the draws.
Bug: skia:12466
Change-Id: I8eaa95418bf24af2a5718c8cf21e97cdd7f80a34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465476
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This will hopefully improve performance on lower-end GPUs.
Change-Id: I9c2ee6dc31acd08bec0bfb5f59edc3cf90163f9e
Bug: skia:12339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465078
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:12466
Change-Id: Ia0da94fc300ab678712e9bb79a011694fea8595e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464677
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: Ib23a501664ebba581376fa0cb1ce5c6537e5d349
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465136
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I12c64396791d8e0b8891b82927b1c8811a6e164f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464385
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The SortKey will only hold the uniqueID of the program and uniform data. When actually executing the draw we will need to reconnect with the actual data.
Bug: skia:12466
Change-Id: Iea7f0a99d471ea7fe2a3864bdd60255b09289088
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464926
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I3c3eda26d0c09a58108a5b7bdd1bca0e63973f17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462887
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: If31d25a1f4a4805069f6556c6802f33fa0bdfcc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464380
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Make sure graphite compiles standalone and not just if ganesh is also
enabled.
Bug: skia:12466
Change-Id: Ic843881a2a88c8d4b62f3a2ea38a10b6a86a12d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464817
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
On low memory machines a common cause of crashes is when a draw
operation requires a large layer (or many large layers) because an
implementation of SkSurface_Base::onCopyOnWrite does not actually have
the resources available to do the copy when required by a draw. Allow
this method to fail and percolate up the call chain so that the draw
simply does not happen instead of crashing.
It appears some users are creating their own subclasses of
SkSurface_Base for their tests. Add SK_SURFACE_COPY_ON_WRITE_CRASHES to
keep the old crashy behavior until they can be updated.
Bug: chromium:1116362
Revert: 5b19ebe0c5.
Revert-Change-Id: I2873589f996ded9c9fd6d27b19155ca18d5b5326
Revert-Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463956
Change-Id: Id06d1e6d3aacb409a3b00b9a862bd8ddd1aaa22f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464456
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Adds Attributes and supporting types to RenderPipelineDesc so they can
be created for the RenderPipeline.
Bug: skia:12466
Change-Id: I7ed920ea6d44f27f7dace81d35cd967a8dea55de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464377
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 2e228bb72c.
Reason for revert: breaks android roll
Original change's description:
> Avoid crash when surface CoW allocation fails
>
> On low memory machines a common cause of crashes is when a draw
> operation requires a large layer (or many large layers) because an
> implementation of SkSurface_Base::onCopyOnWrite does not actually have
> the resources available to do the copy when required by a draw. Allow
> this method to fail and percolate up the call chain so that the draw
> simply does not happen instead of crashing.
>
> Bug: chromium:1116362
> Change-Id: I2873589f996ded9c9fd6d27b19155ca18d5b5326
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463956
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: chromium:1116362
Change-Id: I5ab590b6fc14bcb6712c00dda75d1e7cdc931447
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464077
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
On low memory machines a common cause of crashes is when a draw
operation requires a large layer (or many large layers) because an
implementation of SkSurface_Base::onCopyOnWrite does not actually have
the resources available to do the copy when required by a draw. Allow
this method to fail and percolate up the call chain so that the draw
simply does not happen instead of crashing.
Bug: chromium:1116362
Change-Id: I2873589f996ded9c9fd6d27b19155ca18d5b5326
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463956
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This class will manage and suballocate all buffers used for draws. This
includes vertex, index, and uniform buffers.
Bug: skia:12466
Change-Id: I30f498fe3465e4cc693b974019dcef27efaa8073
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462097
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: If633ce39c8f45b1ee3c042b5b72d7e0f95ca5c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459597
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I3f29f403a3ac91e81f54b0ec3bad19df8dd58739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462885
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
The original values assumed that `half` types would be sized the same as
a `float`. This is still the case (as skia:12339 is not yet fully
implemented) but this CL now contains the expected half values as well.
Change-Id: I94ff73446d29318f127600fb681c222a759936cc
Bug: skia:12339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463736
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This makes use of Bazel's pre-defined platforms
https://github.com/bazelbuild/platforms
and some of our own defined values (see
//bazel/common_config_settings/BUILD.bazel) to customize
the build rules.
I verified this by building bazel_test locally for
linux x64 as well as using the third_party deps for
a WASM build (using build files not seen in this CL).
Suggested Review Order:
- https://docs.bazel.build/versions/main/platforms.html if not
already familiar with Bazel Platforms
- third_party/BUILD.bazel to see that 1) all globs have
been removed and 2) select() targets various
platform constants or groups of constants to control
sources, headers, and local_defines.
- common_config_settings/ to see the groups of constraints
created, as well as new constraint_settings defined
(skdebug_impl)
- supported_combinations/ to see how we can define supported
sets of the constraint values (aka Bazel platforms).
I imagine expanding this more, so we might have platforms
named "linux_x64_emptyfontmgr_vulkan" or such.
- //BUILD.bazel and bazel_test.cpp to see use of SkDebugf.
- Everything else.
Change-Id: I49e4abdbcf7b76f0674efdbb1f53dc8823d110ee
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463517
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
Bug: skia:12466
Change-Id: I1e7812e3600cacc8fe678e924d48c27fb8b88138
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463716
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Gerrit didn't do so well on this CL. What's changed in the UniformManager is:
a lot of unused stuff was pared out of the UniformDataManager
the Write methods now return the number of bytes written in the call (incl. padding)
all the "#ifdef SK_DEBUG" stuff is new to validate against the prior way of writing uniforms
Bug: skia:12466
Change-Id: I172a74273c774257f751750aef37f4bd4c4e7e7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463458
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Byte types were removed from SkSL in http://review.skia.org/404219.
Change-Id: Iec726de0be2ce371a20e21638638a495fae282a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463498
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12466
Change-Id: Ie4c1973427e96d84b77f28edb5a4d6f1d53ef8aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463316
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: Ic312ce41b5eb0ae0c20e6b76032b984d9a406d89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462884
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I734c3a9595948dfb74f8ec72684183fe743bfefb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462883
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Keep RenderPass-related routines together
* Rename setRenderPipeline to bindRenderPipeline
* Pass resources as const& to platform-specific routines, to avoid
copies.
Bug: skia:12466
Change-Id: I4c3ea006263ace4a050b6c86f70163f5fd5e254a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
With this you should be able to set skia_enable_gpu=false in your gn
args and still be able to compile and run graphite.
Bug: skia:12466
Change-Id: Ibffc8774a8c46afad3f717dabc54fa831338a807
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463317
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I8a31cd8480199a941dfc1d9d1092f8a1dafdb0da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462882
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I794de6af814ab1b3e9517e139582e06382ecf957
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462881
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I273fbb51730d85cda6921747e72ace2b9d7601e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462880
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: If90c17634de9caa2ac3a928187226339523d53eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462879
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: Ifd70300896504f8567e6395c3d3683f0d37c905b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463056
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Also adds test of texture copyback to CommandBufferTest, and
endEncoding() to BlitCommandEncoder.
Bug: skia:12466
Change-Id: I57e4646aacc1d950cc16b70d7feeced1a04e6867
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462078
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I5c0c919d4523258a11b4545346093953a4f09c7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461597
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Jul started. It does not work yet.
Change-Id: Ie2c3d943f281dae86befff64f7342c097a5bc7b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455257
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Bug: skia:12466
Change-Id: I7be58aca7eedf18e4157d9473216785eead8c89a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461700
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This can successfully build a C library:
bazel build --config=clang //third_party:libpng
This can build and run a statically-linked executable:
bazel test --config=clang //:bazel_test
For more verbose compile and linking output, add the
`--features diagnostic`
flag to a Bazel command (see _make_diagnostic_flags() in
toolchain/clang_toolchain_config.bzl. Similarly, a
`--features print_search_dirs` can be used to show where
clang is looking for libraries etc to link against.
These features are made available for easier debugging.
Suggested review order:
- Read https://docs.bazel.build/versions/4.2.1/tutorial/cc-toolchain-config.html
if unfamiliar with setting up C++ toolchains in Bazel
- .bazelrc and WORKSPACE.bazel that configure use and download
of the toolchain (Clang 13, musl 1.2.2)
- toolchain/build_toolchain.bzl which downloads and assembles
the toolchain (w/o installing anything on the host machine)
- toolchain/BUILD.bazel and toolchain/*trampoline.sh to see
the setup of the toolchain rules.
- toolchain/clang_toolchain_config.bzl to see the configuration
of the toolchain. Pay special attention to the various
command line flags that are set.
- See that tools/bazel_test.cc has made a new home in
experimental/bazel_test/bazel_test.cpp, with a companion
BUILD.bazel. Note the addition of some function calls
that test use of the C++ standard library.
The number being used to test the PNG library is the latest
and greatest that verifies we are compiling the one brought
in via DEPS (and not a local one).
- third_party/* to see how png (and its dependent zlib) have
been built. Pay special attention to the musl_compat hack
to fix static linking (any idea what the real cause is?)
- //BUILD.bazel to see definition of the bazel_test executable.
Change-Id: I7b0922d0d45cb9be8df2fd5fa5a1f48492654d5f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461178
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Bug: skia:12466
Change-Id: I7eb240985ce0c267bbc7be040e0f812407d31435
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461699
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Except that applyClipToDraw doesn't actually evaluate any clip shapes,
and the BoundsManager is the slow/naive one, I think all the changes to
Device fully implement the tracking/work needed for color/depth sorting.
Bug: skia:12466
Change-Id: I74f38e56d34d822c2be35f1ebedfb7c00b87f04c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460616
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Thise should have been aligned properly already due to their
placement, but it doesn't hurt to make it more explicit.
Change-Id: Idb6a03e93d86df7727324987f166d197d5e708a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461377
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Bug: skia:12466
Change-Id: Id0419836ca96d99836879d509ca2cd1c9244d76f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461598
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I44bd3899dea817318f83444f023c1c8adcfc2d1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459881
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
While we won't be transforming shapes, we do need an accurate way to
transform bounding boxes to device space. Right now this just uses
SkM44's mapRect function and converts to/from an SkRect. However,
under the hood SkM44 uses a similar negation trick as skgpu::Rect so
I need to explore if using Rect's internal structure directly will let
us compute the bounding box with fewer operations.
Additionally, SkM44's mapRect clips to a fixed w=epsilon plane, and I
think Transform::mapRect should just do the right thing and handle
w clipping/projection as accurately as possible.
Bug: skia:12466
Change-Id: I08c9df6c40cbcdcd8f622baae222bdf361d59070
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460578
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Switches Shape to store kRect types as skgpu::Rect instead of SkRect,
although it can be constructed or set from an SkRect. It returns a Rect
from rect() and bounds() now.
Also switches out the line to be constructed from float2's, and re-use
the fRect storage to store the first segment vertex in topLeft and
the second vertex in botRight.
Bug: skia:12466
Change-Id: I1032fb6f222b0853305186c0e34091b014ae0cea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460577
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This step was missing from the previous CL.
Bug: skia:12466
Change-Id: I3da0082efefbabf6008fc8962d706f75f0743ecc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461176
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Implements a BSP tree with NEON/SSE optimizations that tracks
non-overlapping regions. This object can be used batch sets of paths
into non-overlapping draws. Performance on AppleM1 with our existing
benchmarks looks very promising:
desk_motionmarkarcs.skp 1227 paths -> 69 draws 450us
desk_motionmarksuits.skp 1417 paths -> 26 draws 201us
desk_chalkboard.skp 1940 paths -> 11 draws 84us
desk_ynevsvg.skp 859 paths -> 10 draws 31us
desk_micrographygirl.skp 318 paths -> 29 draws 11us
Bug: skia:12466
Change-Id: I847a93ed726dea10cb403cb76e578bd81eb920d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460298
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Bug: skia:12466
Change-Id: I89d41509b8158aabac5250f035115954e8ae7f4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460655
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: Ibbb4894c6a46dd8853909214da85314f9abc3959
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459880
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This attempts to salvage the reuseable portion of:
https://skia-review.googlesource.com/c/skia/+/440841 (New approach to GrProcessor uniforms)
It also removes the old code's Gr- dependencies.
Bug: skia:12466
Change-Id: I7f7f3a9f9b4f3e282af1caeb02d2b305e6756025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460556
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I69222b60d421d8deebcb977124ee0f5cb06f34dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460638
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Adds test of command buffer submission with GPU recording (if enabled).
Also adds programmatic GPU recording support.
Bug: skia:12466
Change-Id: I85aba9f7e5e09f62f2ddc7040d1ff84bb9b4ae09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460337
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I98acab4bbab2fdc1c359161956c3f0aa29ad7adc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459884
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Transform.h is named Transform_graphite.h to avoid collision with
Transform.h in skottie/src
Bug: skia:12466
Change-Id: I017eee2bffe1a0aad605221e67540f732c2ee6b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459719
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I4c80d5438d95562ef42531b4f66a9eaa6ff75d1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459877
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I6b15d099f3853b392f3763cd1100d89ff4e4fd1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459122
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I3252f36c3f78642c55f127379ceba99b4845822e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458717
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This makes the SkDevice interface and code simpler, and also opens the
door to a version of drawAtlas that takes a more complex SkShader (on
the SkPaint), rather than just a single SkImage.
Bug: skia:11942
Change-Id: I557bd2f03b85940b29954cb994916d5566bd7747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458980
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
With this CL we can run as:
dm --src gm skp tests --config grmtl -v --nocpu --nogpu
and not get all the non-Graphite unit tests.
Bug: skia:12466
Change-Id: Ib3f04f315fe4b5731a54e4c72979a0c1e00baf24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457898
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: I49e1ec8308a0cde2b5d43901281d60a6f70be5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457119
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Adds a line primitive back to geom::Shape since I just couldn't tolerate
drawPoints mallocing a path for every line. When Shape provides a path
like iterator, it will look equivalent to an SkPath that is a line, so
there won't be any reason to analyze an incoming path for a line, but
if we know we want a line, there's no reason to wrap it in a path.
DrawList and DrawContext now take Shapes for their path rendering funcs,
but are documented to use path rendering. It won't be like GrSDC that
tries to choose the algorithm under the hood from you.
Device has been heavily updated to funnel all the draw calls into a
new drawShape(), so the primitive functions do not malloc skpaths any
longer, even if they still end up using path renderering.
Additionally, instead of making new paints that have updated styles or
removed components, drawShape() takes an SkStrokeRec and ignores what's
on the paint, and has additional flags that tell it to ignore aspects
of the paint. This is used when it recurses, or for cases like drawPaint
where path effects and mask filters should be ignored (and eventually
other things like drawImage will ignore path effects and force a fill
style).
Bug: skia:12466
Change-Id: I4700c895ce3fefe2e437f3b4d329fd381593e037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457398
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I965417fc1de471af33a31155abf2760d5d1b4f62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457317
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Implements a Rect type whose standard operations use float4. The intent
of this class is to make calculations on draw bounds as fast as
possible.
Change-Id: I3bdb219b242bb7097809507c345b613670ff386e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457136
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Just having an skpu namespace should be enough.
Change-Id: I3026ece828aee7a57f8c5de2252ebc79d97baf7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458636
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Classes of issues addressed:
1. static constexpr class variables aren't automatically inline. Already handled in a separate CL
2. Lack of C++17 copy elision means classes of objects constructed at function return need a copy or move constructor even if RVO will mean it isn't called.
3. Nested braced init no longer allowed for base classes of subclasses without constructors.
4. template static constexpr var in template class throws error about redundant initialization. Adding inline and removing defn outside of class fixes it.
5. Some places that should have been including std headers now actually need to include them.
6. No auto template parameters.
7. No lambdas in constexpr funcs.
Bug: chromium:1257145
Change-Id: Icb24c6b4ed039287fb4cf27a21a1bb7dc9821728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457298
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is in prep for compiling with -std=c++14 and -Wno-c++17-extensions
when building with clang. Chrome has encountered problems with
third_party headers that are included both in Skia and other Chrome
sources that produce different code based on whether preprocessor macros
indicate a C++14 or C++17 compilation.
In C++17 they are already inline implicitly. When compiling with C++14
we can get linker errors unless they're explicitly inlined or defined
outside the class. With -Wno-c++17-extensions we can explicitly inline
them in the C++14 build because the warning that would be generated
about using a C++17 language extension is suppressed.
We cannot do this in public headers because we support compiling with
C++14 without suppressing the C++17 language extension warnings.
Bug: chromium:1257145
Change-Id: Iaf5f4c62a398f98dd4ca9b7dfb86f2d5cab21d66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:12466
Change-Id: I401a185d818a964327d323b9ebcd0850ec0b1c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457318
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Makes the Make() method consistent with other methods by passing in
Gpu, and adds hooks for command buffer tracking.
Bug: skia:12466
Change-Id: If93c2126b1296dcbf788b5471916051fe90dafdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457319
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Rename TFlagsMask<> to Mask<>
* Make Mask<> implicitly convertible to bool
* Rename SKGPU_MAKE_BITFIELD_CLASS_OPS to SKGPU_MAKE_MASK_OPS
* Remove the macro for non-class enums
Change-Id: I86059335d731f34c9c9c20a4cd6d5491543aa3b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456816
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
With this change it should now be safe to start using Proxys and Textures
everywhere. There is no caching the Proxys/Textures will live as long as
someone holds a ref.
Bug: skia:12466
Change-Id: I3c657b65b44b9dca0a77a255d6a4fc89e3862124
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456916
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is basically GrShape except that I removed some of the API that
GrStyledShape used. I also changed the set of types that Shape can
represent to be better match what I imagine our final set will be in
graphite: {empty,point,line,rect,rrect,path,arc}
-> {empty,rect,rrect,path,convex-polygon}
The convex polygon is used to store points and lines as well. I also
imagine that it will subsume the need for migrating GrQuad over.
I'm doing this on its own in preparation for moving the ClipStack over
and consolidating the draw handling in Device/DrawList, all of which
get a lot easier if there is a single type that stores the geometry.
For the first milestone, actual rendering will still likely use
Shape::asPath() for the path renderer, but it's not a lot of extra work
to preserve the logical type at the high level, so may as well do that.
There are a few functions internal to Shape that still need to be
implemented (converting a path to a list of vertices, and doing point
containment), but those can come in a later CL.
Bug: skia:12466
Change-Id: I1040c54e3b8004f3bc1767d72ded60b572b39596
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456257
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I1224ad193bb9d866439673161075e29adedc0008
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456475
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Adds in test pipeline state object creation and shader compilation
routine.
Bug: skia:12466
Change-Id: Ie8d99078a2cebf1da37576e5a50a798fc79c295b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456472
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I730c227a78040ea8747d11437032504527b3ee81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456463
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I9165e5f49e4b897f4b315662221b944e362b7b41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456456
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
The caller to ResourceProvider should be passing in the TextureInfo
they want. Thus we don't need all the specialized factores on
mtl::Texture.
Also removes UsageFlags from Texture which aren't needed.
Bug: skia:12466
Change-Id: Iad51a7da6efe481382a3f5fbaefc6d2504d1c013
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456236
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I97d8743057199abd88948f0804cceb4180ad8b74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455997
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Copied from GrMtlResourceProvider, and stripped down to the barest minimum.
Bug: skia:12466
Change-Id: I63cb52ee4bbc4c6ce5a1de16312bd4c69911d32c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455619
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: If4a06bc0ab8befab8a155276c316ba9378b90a48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455658
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Adds factory for SampledTextures and MSAA textures
Bug: skia:12466
Change-Id: Ia8aa7fa874e8256fe4dea8a16ceb459dbb02547d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455618
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I9828c59f0406e457e723f78940b1f42ff343fa2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455500
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Every command that's in a DrawList will produce 1-3 SortKeys (depending
on its type of draw and the number of steps involved). For example a
large non-convex path fill requires a stencil draw for the curves, a
stencil draw of its inner triangles, and a covering draw for shading.
Since the SortKeys are only temporary and can be discarded once the
list has finished being converted into the DrawPass itself, they are
defined in the cpp file. However, I could see exposing them if only so
that the conceptual model is more apparent, since this is a key part
of the new approach in graphite.
Related to the details of the SortKey, the DrawList and SDC APIs have
been updated to reflect the differences in stencil-and-fill path
rendering that needs to be ordered based on both its color-depth
intersections and stencil buffer intersections, and convex filled
paths that don't require stenciling at all.
As a little cleanup, these parameters have been named something to
reflect their semantics even though they stay uint16_t's.
Bug: skia:12466
Change-Id: I02d6361f2889c0a6b341623131e4abda00a11145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: I38f3469c53414c36b05f3bdbc266b50783cfa676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455496
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I3a22d03e5042a94f2bf6d379b2fff17f0b48edb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455217
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
For reasons I don't understand, rewrite-includes suddenly started
detecting these experimental files as needing their includes rewritten.
Change-Id: Ie62e8861169dfb988840e74976248992633874e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455160
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Bug: skia:12466
Change-Id: Iee62164899742356abf15ae3bc3dec0e724a365d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454743
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I6207af8bb34ccab28265ced733e1930f42e2db8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I3299940af72cffde3904cf5f6262955807d6d1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453637
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: If708d8a4bd00802e60a860215edcb64db179e573
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454616
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Adds the interface between C++ and Objective-C code so we can create
the Gpu.
Bug: skia:12466
Change-Id: I0c4b5d21ddaa119c21682105dc84d75769f069f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453952
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12466
Change-Id: I90ebec9ee744de3822bd82d474858015d2490d72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453636
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: Ida0113701b7ba2b45b5bddcc76d2729c8658fb14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453948
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: Ibe9f09c3801ca22a9b390b0e7a7623a6b73da162
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453944
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Also adds the Mtl subclass as well
Bug: skia:12466
Change-Id: Ia3a81f33a00374a96765fde3a3442c5e13188ad1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453719
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Allocates and initializes the caps with GpuFamily and Group info.
Bug: skia:12466
Change-Id: I7abb8b6df2acf2ac70f3fbe56e935f44815776dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453796
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is mainly to make make MtlBackendContext available.
GrTypes has to go to GraphiteTypes due to a name collision with Types.h in in sktext.
Bug: skia:12466
Change-Id: If073d5540c3dbf3fbfb404808d80deab42c40aa6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453497
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I2ba1f1541c273ba90032c93a92ed3770dc5b0080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453756
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Updates SDC's state to be a current DL and a list of pending passes,
RenderPassTask then takes over the DrawPasses.
Does not rename SDC to DrawContext as discussed in 9/27 meeting.
Bug: skia:12466
Change-Id: I358d15bc93663729438e5b6f7163eee22dc6769f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453296
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I83ebf7dbea0d67b3c121b011f62e7b729f5e5257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453577
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
A test of GREATER, as opposed to GEQUAL, allows us to avoid double
blends during stroking.
Change-Id: I1d39b54416934ee354146fe42c58299f00f7a6e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453616
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12466
Change-Id: Ie949a17166b3ab5c529b74a6762c8a6f8ca8052f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453061
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Renames SDCTask -> RenderPassTask and adds comments describing its
purpose. Has SDC use a DrawList and expose similar drawing functions.
Stubs out all Device methods that will eventually need to be supported,
but groups them into in-scope and out-of-scope sections. Implements the
drawing functions in terms of drawPath() and has drawPath() invoke the
SDC functions (with untested support for path effects, hairline, etc.).
Bug: skia:12466
Change-Id: Id661fc987aeb35f0dfa536c0cb0b6210742cf32c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452233
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I51dc73a213e672578767b41c01c487c942465964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452722
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I30b53802d706406faf8045264c09a75ee3bf9126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452232
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I1267d3a387e74dc510ee4d00925049a4e7ac9edd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452557
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This makes "dm --config grgl --src gm skp" generate a lot of green pngs and adds a stub class for Image_Graphite.
Bug: skia:12466
Change-Id: Ia7cf891ad278434f473cf6c9c4673bf8fa085adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451740
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Device will own and manage a BoundsManager, which it will use to decide
the sort and test Z's that it passes to the DrawCommandList in its
draw() implementations.
DrawCommandList might end up being owned by the SDC, with the SDC
exposing a similar drawing API. There will need to be some mechanism to
end a DrawCommandList and start a new one (the list moves into an
SDCTask). This would either happen from an external flush call, or in
the rare case where the representable Z values are exhausted and we
have to insert a depth buffer clear and start a new task that depends
on the prior one.
Bug: skia:12466
Change-Id: I892b631037dc801eb94da2462683c9701afa281b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451599
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
and fix up the #include guards
Bug: skia:12466
Change-Id: I865ebb00827001b2cf0f7d871e872a7be0f36c22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: Ice0826af0b64fa8dd92975f879af8ab0f71740fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451039
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This should at least get something compiling.
Change-Id: I617fd4d6e4f0a3fdd6dedbe66f3a4448bb913b2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit efb7ae16dd.
Reason for revert: Excluding all non-linux tests
Original change's description:
> Revert "The very first version of a new SkText API."
>
> This reverts commit 8a20cea604.
>
> Reason for revert: Breaking some tests
>
> Original change's description:
> > The very first version of a new SkText API.
> >
> > SkText public API added.
> > Interface.h updated.
> >
> > Change-Id: I82a87f33e6cf1394fa2520387f6895d33601376e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442003
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I879b198bc6fb44c46d11d967118f8d69eb74fee0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449296
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: Ieb65b45532d8c7455f091cf7a9e21fa7dea47606
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449297
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This reverts commit 8a20cea604.
Reason for revert: Breaking some tests
Original change's description:
> The very first version of a new SkText API.
>
> SkText public API added.
> Interface.h updated.
>
> Change-Id: I82a87f33e6cf1394fa2520387f6895d33601376e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442003
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: I879b198bc6fb44c46d11d967118f8d69eb74fee0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This reverts commit 481a58dfe0.
Reason for revert: Fixing the build
Original change's description:
> Revert "Small changes for SkText that are not in experimental directory"
>
> This reverts commit 92f1bc0083.
>
> Reason for revert: Blocking Android roll.
>
> Original change's description:
> > Small changes for SkText that are not in experimental directory
> >
> > (also made utf 8<->16 conversion static on SkUnicode)
> >
> > Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
> Auto-Submit: Brian Osman <brianosman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Change-Id: I1e5859c9dd943c701d4c4e648bdc3e44412eca54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This reverts commit 92f1bc0083.
Reason for revert: Blocking Android roll.
Original change's description:
> Small changes for SkText that are not in experimental directory
>
> (also made utf 8<->16 conversion static on SkUnicode)
>
> Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
(also made utf 8<->16 conversion static on SkUnicode)
Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Add a lerp that uses full 32-bit resolution for the multiply.
This gives the same answers as the floating point, and
demonstrates the error introduced by using the faster
16-bit multiply.
Change-Id: I90c46b350fae09f74d9c9cf2af7ef3d3d1d0f202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448102
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Because the [-1, 1) lerp can handle a higher sampling rate in t,
decrease the t step to ensure everything is covered. The
limit needs to be trimmed by a 1/65536 to allow the older lerps
to run properly.
Remove the scaled test cases. They no longer make sense.
Change-Id: Ida841d65ebe794ba5d0ae67dfb145268764ec6a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448101
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Using the extra bit improves the difference rate from .38% to .19%.
I think this uses the full resolution of all the values, and there
is no more accuracy by trying to get more bits in use. The maximum
difference is still 1.
This gives the same answer with the neon_vqrdmulhq_s16 and
ssse3_mm_mulhrs_epi16 instructions.
Change-Id: Ie801b68aead408c5e1845aaf94ea660121e414b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447719
Reviewed-by: Brian Osman <brianosman@google.com>
Study that compares scaled integer lerp to float lerp. This
shows an error rate of 0.38% with a max difference of 1.
Study to compare scaled values the would result as the
intermediate values of a bilerp. This shows an error rate
of 24% with a max difference of 1.
Change-Id: Id27b6baa9ce56efedb30f490a3f84ccf808315fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447183
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I75e93820bd1df57d076560f1b2991f1756ca5389
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446996
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I530373e9b53e76a7cd1c0b3a5a1b05354975790c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I31dd90b2f09876d37c2c202d620cef4028af6266
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446183
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I5f0c36b44cd5bfd3f978d892a342a1d008baceb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446176
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 9a0302cd9d.
Reason for revert: layout tests suppressed
Original change's description:
> Revert "Simplify SkRasterClip now that it's only intersect/diff"
>
> This reverts commit 75bab9249d.
>
> Reason for revert: Experiment to see if blocking Chrome roll
>
> Original change's description:
> > Simplify SkRasterClip now that it's only intersect/diff
> >
> > Bug: skia:10205
> > Change-Id: Id29a63783bd38e5977e94bf8e8d7fbb4fe16cb51
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442279
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I1ceeccf880a139dc9236b7df17e3599f8cae611f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10205
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443414
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:10205
Change-Id: I13a49190c67e5e32431ea268312ede60c55798b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443897
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
These scripts are useful when testing WebAssembly locally
because the mimetype impacts how the binaries are loaded.
The porting was achieved by doing the following:
python -m lib2to3 -w -n serve.py
Change-Id: I09673fa881339a9b157c5fc993e190766efcd85e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443884
Reviewed-by: Erik Rose <erikrose@google.com>
This reverts commit 75bab9249d.
Reason for revert: Experiment to see if blocking Chrome roll
Original change's description:
> Simplify SkRasterClip now that it's only intersect/diff
>
> Bug: skia:10205
> Change-Id: Id29a63783bd38e5977e94bf8e8d7fbb4fe16cb51
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442279
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I1ceeccf880a139dc9236b7df17e3599f8cae611f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443414
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:10205
Change-Id: Id29a63783bd38e5977e94bf8e8d7fbb4fe16cb51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442279
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Insert/Delete/Backspace
Status line
Change-Id: I38727ddb86bf20cdd6c64363c33ffda03ab3c2c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431179
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Introduce a build config option where ICU symbols are resolved at
runtime, against existing system libs.
Change-Id: I2325537438de0063fcc4a7c0f8411764cf550f09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431037
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This is a reland of e58831cd95
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit e58831cd95.
Reason for revert: looks like breaking a few build bots
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.
Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.
Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Adding ovals reveals the clipping failure. The "actual" results with the
oval clips are currently incorrect.
Bug: skia:11837
Change-Id: I0789d5f758457425250ff6cecc0a5bb44f6e82ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I76e1cfdf7d2f7ca649612c8155571425684cf2d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420236
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I07c7b3e3b55be8b0340a012e965bd23b92d27e1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420218
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is a reland of 7bf6bc0d06
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: If0be86902e7cc4755eba91a89be1ec1a6a4b54b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419720
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 7bf6bc0d06.
Reason for revert: Android build references kCoverageCounting
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I01d99287978f848eb8bf900c07cba90ceb3b6edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419898
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Now that the clip atlas has been successfully migrated to
tessellation, we don't need this code anymore!
Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:11837
Change-Id: Icd80503b16776e821ae2a5491b554eea7094cd9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I9f338279ce2648c788c4eb011639ac6d27c946ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418696
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
In this iteration none of these commands appear in the sorted Cmds (and
the Save and Restore Cmds never will) but it sets things up for ClipCmds
being sorted.
Bug: skia:11837
Change-Id: Ia8be433cb01215c55a8b61de2ec24f5c456a0b10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417416
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The very first version:
1. Moves cursort up, down, left, right by grapheme/glyph clusters
2. Breaks lines by grapheme/glyph cluster
3. Just started!
Change-Id: Ib2881794ff33af9e428828f3a9e2d3b54946fa8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417476
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:11837
Change-Id: I038aee81e41201668f891df9d589459553b757b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417259
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I44b8f02555c1ed7e2f1bf0872bf41f78d1eb5d25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417003
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: I4fa19c46b38659d160de92de90e80a23ee8e5fcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415461
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: I72dfef62f497af417d3f7248a58aad272f095398
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415171
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
First try, all tests work.
Change-Id: Ifb1b102b3fc45d714d706e9c123d3ca0aeafd600
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415156
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Debugger had been including some egl code, which started throwing
an error about eglGetProcAddress not being linked in.
Change-Id: I2e930dc5064b6fc238d3399fe8aba5fe105a3097
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412986
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: Ic972dfcf13b9807669d0fb29c73dca8d6a9cd939
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410816
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ib73dd51f3f558aa6c6b98aa611da116d8906bf7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397284
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a reland of a3262aa1d2
Original change's description:
> Switching SkText to UTF16
>
> Required some changes in SkUnicode to support it
> SkShaper still works on UTF8
>
> Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: Ib21898d4acda8ab78e5e6fd1c7b9b0da41c3fa83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407396
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This adds some initial features for generating the ambient
namespace files (the TS equivalent of .h files) for the
C++ binding files. There are a few tests and it works on
the sample code in tskit.
I split the bindings/ folder into bindings/ and interface/
(for C++ and TS code, respectively).
This can be tested locally by running
make generate && make debug && make serve
and verifying that everything compiles and runs in the browser.
One thing I changed for easier parsing was making a @type
annotation required, with an @optional tag for making a field
or constant optional.
Change-Id: If9c5a664e84fac4c734277cddd7774989a1f7bf8
Bug: skia:11826
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407476
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This reverts commit a3262aa1d2.
Reason for revert: I believe this is blocking the Flutter roll
Original change's description:
> Switching SkText to UTF16
>
> Required some changes in SkUnicode to support it
> SkShaper still works on UTF8
>
> Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
TBR=bungeman@google.com,reed@google.com,jlavrova@google.com
Change-Id: I68b66dfbc4f3668a8fb765d5f557699e396cd3f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407177
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Required some changes in SkUnicode to support it
SkShaper still works on UTF8
Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>