Some unused var and pessimizing move warnings, e.g.
../../experimental/sktext/src/Text.cpp:316:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
return std::move(shapedText);
^
../../experimental/sktext/src/Text.cpp:316:12: note: remove std::move call here
return std::move(shapedText);
^~~~~~~~~~
Change-Id: Id5c220b7a850b2013e2bf065a87d4a296bd0369c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542522
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
I had to copy some config_settings out of //bazel/common_config_settings
because these are now treated as separate entities and cannot
see that file.
For libpng, note that we use a genrule to create the
pnglibconf.h instead of pointing to one somewhere else.
This ended up being easier than other things I tried.
Another approach would be to not depend on the version
in third_party/externals, but to clone it via
new_git_repository [1] and apply a patch that creates
the configuration file.
[1] https://bazel.build/rules/lib/repo/git#new_git_repository
Bug: skia:12541
Change-Id: I9a284775dc0f2bdabb145518d5f0803c74fb99fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545368
Reviewed-by: Ben Wagner <bungeman@google.com>
The primary goal of this organization structure is to keep
our top level BUILD.bazel file short, with as little logic
as feasible. The logic required to control which files to
include, which third_party deps are needed, what system libraries
should be linked again, etc, should be in the BUILD.bazel
file best should be as close to the affected files as feasible.
In essence, we use filegroup() rules to bubble up the files
needed to build Skia (all as one big cc_library call) and
cc_library rules to bubble up the other components needed to build.
For example, //src/ports/SkFontHost_FreeType.cpp needs FreeType,
but only if we are compiling Skia with that type of font
support. With the new organization structure in this CL,
//src/ports/BUILD.bazel should have the logic that determines
if the cpp file should be included in the build of Skia and
if it is, that the Skia build should depend on //third_party:freetype2
Another example is //src/gpu/ganesh/BUILD.bazel, which
chooses which of the dawn, gl, vulkan, etc backend sources,
and the associated dependencies to include in the build.
It does not specify what those are, but delegates to the
BUILD.bazel files in the subdirectories housing the
backend-specific code.
The structure guidelines for BUILD.bazel files are as follows:
- Have a filegroup() called "hdrs" (for public headers) or
"srcs" (for private headers and all .cpp files) that is
visible to the parent directory. This should list the
files from the containing directory to include in the
build.
See //include/core/BUILD.bazel and //src/effects/BUILD.bazel
as examples.
- filegroup() rules can list a child directory's "hdrs"
or "srcs" in their "srcs" attributes, but should not contain
select statements pertaining to child directory files.
See //include/gpu/BUILD.bazel and //src/gpu/ganesh/BUILD.bazel
as examples.
- May have a cc_library() called "deps". This can specify
dependencies, cc_opts, and linkopts, but not srcs or hdrs. [1]
See //src/codec/BUILD.bazel as an example. These should
be visible to the parent directory.
- "hdrs", "srcs", and "deps" for the primary Skia build
(currently called "skia_core") should bubble up through
//include/BUILD.bazel and //src/BUILD.bazel, one directory
at a time.
This CL demonstrates a very basic build of Skia with many features
turned off (CPU only, no fonts, no codecs). Follow-on CLs will
add to these rules as more targets are supported. See bazel/Makefile
for the builds that work with just this CL.
Suggested Review Order:
- //BUILD.bazel to see the very small skia_core rule which
delegates all the logic down stack. Note that it has a
dependency on //bazel:defines_from_flags which will set
all the defines listed there when compiling all the
.cpp and .h files in skia_core *and* anything that depends
on skia_core, but *not* //src:deps.
- //include/BUILD.bazel and other BUILD.bazel files in the
subdirectories of that folder. Note that the filegroups in
//include/private/... are called "srcs" to be similar to
how Bazel wants "private headers" to be in the "srcs" of
cc_library, cc_binary, etc. and only public headers are
to be in "hdrs" [2].
- //src/BUILD.bazel and other BUILD.bazel files in the
subdirectories of that folder. //src/gpu/ganesh/...
will be filled in for dawn, vulkan, and GL in the next CL.
- //PRESUBMIT.py, which adds a check that runs buildifier [3]
on modified BUILD.bazel files to make sure they stay
consistently formatted.
- //bazel/... to see the new option I added to make sksl
opt-in or opt-out, so one could build Skia with sksl,
but not with a gpu backend.
- Misc .h and .cpp files, whose includes were removed if
unnecessary or #ifdef'd out to make the minimal build
work without GPU or SkSL includes.
- //bazel/Makefile to see the builds that work with this CL.
[1] Setting srcs or hdrs is error-prone at best, because those
files will be compiled with a different set of defines than
the rest of skia_core, because they wouldn't depend on
//bazel:defines_from_flags.
[2] https://bazel.build/reference/be/c-cpp#cc_library.hdrs
[3] https://github.com/bazelbuild/buildtools/releases
Change-Id: I5e0e3ae01ad42d672506d5aad1239f2512188191
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543977
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
gazelle ended up being more liability than asset for our C++ rules.
It required devs to manually run the command frequently (and was
easy to forget until the CQ failed). The fact that we still had to
edit the source files (e.g. the "srcs" cc_libraries) meant that
the mixture between generated and hand-written caused some
tension (see include/third_party/vulkan for a good example).
The combination of gazelle and our IWYU enforcement added several
bits of churn without any real benefit. The generated rules
also didn't help identify cases where we were not keeping tight
boundaries (e.g. non-gpu code and gpu code).
Identifying third_party deps automatically ended up being trickier
than anticipated (see the deleted //third_party/file_map_for_bazel.json)
Using the "maximum set of dependencies" worked ok, but ended up
increasing build time unnecessarily. For example, compiling
CanvasKit for WebGL always needed to compile Dawn because
SkSLCompiler.cpp sometimes needs to include tint/tint.h.
Follow-up CLs will rebuild the BUILD.bazel rules without gazelle.
Note to Reviewers:
- The only file worth manually reviewing here is bazel/Makefile.
Change-Id: I36d6fc3747487fabaf699690780c95f1f6765770
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543976
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This is a reland of commit 167e608bb3
Original change's description:
> [infra] Remove old python scripts and urllib2 references
>
> I was searching for urllib2 while resolving issues with
> https://skia-review.googlesource.com/c/skia/+/538636
> when I found several old, apparently unused scripts.
>
> Rather than fix them, let's get rid of them. If they
> are still in use, the conversion to urllib.request is
> pretty easy.
>
> Change-Id: I27d419601e81c93a3d53e280188a379dfab927c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538936
> Auto-Submit: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I656b45cbcbde61c45d6d9daa0d6b97324d738631
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541077
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Some APIs have been const-ified.
Change-Id: I08699f219944057bd730d3f7a5f5466cdd829233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539064
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 167e608bb3.
Reason for revert: breaking Housekeeper-CheckGeneratedFiles
(fetch-clang-format)
Original change's description:
> [infra] Remove old python scripts and urllib2 references
>
> I was searching for urllib2 while resolving issues with
> https://skia-review.googlesource.com/c/skia/+/538636
> when I found several old, apparently unused scripts.
>
> Rather than fix them, let's get rid of them. If they
> are still in use, the conversion to urllib.request is
> pretty easy.
>
> Change-Id: I27d419601e81c93a3d53e280188a379dfab927c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538936
> Auto-Submit: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I139a3cd070da2e6fee2f8865138cf6a63441a8cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539201
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
I was searching for urllib2 while resolving issues with
https://skia-review.googlesource.com/c/skia/+/538636
when I found several old, apparently unused scripts.
Rather than fix them, let's get rid of them. If they
are still in use, the conversion to urllib.request is
pretty easy.
Change-Id: I27d419601e81c93a3d53e280188a379dfab927c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538936
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Due to a bug in the WebGPU emscripten bindings, the Dawn backend was
only mapping 0-size region of a GPU buffer when invoking
wgpu::Buffer::MapAsync. To map the entire buffer, we now call it with
wgpu::kWholeMapSize.
Note that due to the same Emscripten bug, wgpu::Buffer::GetMappedRange
must be invoked with "size = 0" to obtaine the entire mapped range. This
inconsistency was the root cause for the mapping failures described in
skia:13266.
Also removed the workaround in the webgpu-bazel demo and made the demo
default to rendering a runtime effect because it's cooler.
Bug: skia:13266
Change-Id: Ia42fd33a4c897a99d37f0a43b065c1dd2f45ec22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534944
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
G3 prefers license() first.
This was done mechanically with a big find/replace
Change-Id: I8c33c7bc10a6bec42e966cad81c259954e841811
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535898
Reviewed-by: Ben Wagner <bungeman@google.com>
Added a radial gradient and a RuntimeEffect to the WebGPU demo.
Both of these exercise shader creation and staging buffer allocation.
Also refactored the C++ code to reuse a GrDirectContext which highly
improves the per-frame performance when using runtime effects. However
this unfortunately triggers skbug.com/13266 so a work-around has been
provided in which the context can conditionally get re-created every
frame, as before.
Bug: skia:12512
Change-Id: Ic3e71679bf449bd8557577f74001f18e300e952a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534756
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
* Made several changes to the Bazel rules to work around an issue with
the Closure compiler and Asyncify and a WASM code-size issue on debug
builds.
* The native draw code now invokes Skia using the Dawn backend. The
example uses `SkSurface::flushAndSubmit` and Emscripten's Asyncify
feature to synchronize animation frames with the underlying WebGPU
command queue completion.
* Cosmetic changes to the HTML with CSS and an animation loop that
alternates the canvas color between cyan and magenta every second.
Bug: skia:12512
Change-Id: I9888bbec89c2fb01676898ffe4a7071d8690611e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530856
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Ran the following commands:
find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} +
buildifier --lint=fix --mode=fix -r .
This had the effect of making sure we can export all of our
files in G3 (until we no longer have legacy targets) and
making all of our cc_libraries shim-able.
bazel/macros.bzl has the human-contributed changes, the rest
were mechanical.
Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I3a9e9e90b0ac1b1099830eaca06506bcce794144
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530055
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is a reland of commit ae5e846047
Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12698
Change-Id: I326a4bc34fde675e9fc7ad7835558ce6f307d268
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527842
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I484067cb1f6025dc9e6770c51c99bfc2c5925652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528365
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I76a01cf18583fab619459f258119b780ff978be5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527840
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This means that the UniformManager w/in the SkPipelineDataGatherer will
now collect all the uniforms into a single block of memory.
Bug: skia:12701
Change-Id: I504a014d37662619191d9b519b4e1add69eac8bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527837
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This removes the use of the dubious void* 'srcs' array.
Bug: skia:12701
Change-Id: I5078d48c119d4e84e83a78b10d0bd4a9a1d8cd8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527777
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is moving to the world where the SkPipelineDataGatherer holds
a UniformManager. In that world the UniformManager will need to
incrementally allocate the uniforms it is collecting.
Bug: skia:12701
Change-Id: I6ed26948d7d0f2979130c4908d0c34c32604cd75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527736
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12698
Change-Id: I3744b281a3d22bde5adeea4f909ca65e4e4d3cfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527279
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
With UniformData being stored in a arena and TextureData still being
held by unique pointer, the PipelineDataCache needs to be able to handle
both.
Longer term, TextureData will also be held in an arena and this
split will go away.
Bug: skia:12701
Change-Id: Iab6c6542fbce4f886410f985e6c93ddaa125152e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527504
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The clip isn't actually applied, but clip stack manipulation is wired
up. This may have a slight impact on how things draw because the device
clip bounds now reflect the clip actions, and that is currently used as
each draw's scissor.
Bug: skia:12698
Change-Id: I1d2e9cea49762dbfaa008c7c6af6034387b62519
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Once the UniformManager is moved into the SkPipelineDataGatherer, it
will need to be reset-able and write{Uniforms} will need to be able
to be called repeatedly. This CL starts setting up for that future.
Bug: skia:12701
Change-Id: Ia652c05b4eb508dce12c66b2298930d799d1e445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527280
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The internal ClipGeometry enum is moved to SimplifyResult in header.
The internal get_clip_geometry is renamed to Simplify and declared
header. This was so that the internal types (SaveRecord, Element, etc)
and TransformedShape could easily interoperate.
TransformedShape is a view that bundles references together instead
of requiring that all the internal types have some magical set of
functions that get_clip_geometry used.
The contains and intersect logic has all been consolidated into
TransformedShape instead of spread across many different contains()
functions. Intersect() is also more detailed because it can take
coordinate systems into account the coordinate systems, which will be
particularly useful when draw checking is added in a follow-up patch.
Bug: skia:12698
Change-Id: Ifac41a40715c7b0369fe31c273f12edc1efa956a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526736
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The SkPipelineDataGatherer is going to subsume all the UniformManagers
scattered across the code so it will need the Layout in its ctor and
be plumbed where ever there is a UniformManager (in order to replace it).
Bug: skia:12701
Change-Id: I4f42bf50023e9e66c90f9a14833b976e214e1cc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526275
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
These aren't currently used (we recompute them from the PaintParamsKey)
and are only getting in the way as we change how we accumulate uniforms.
We can always re-add them if the recomputation becomes a hot spot.
Bug: skia:12701
Change-Id: Id91ea0d27543666c75c154fc585d954c5f89aded
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526270
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bounds are stored as floats, preserving exact coords instead of trying
to round in or out for pixel bounds. This is the major functional
implication that now differentiates behavior from v1::ClipStack.
Most of the changes are just updating to the appropriate API. One thing
to note is that Rect::intersect() outputs an empty/negative rectangle
if the inputs do not intersect, which is what we want in ClipStack but
had to be explicitly checked for with SkRect/SkIRect's behavior.
Bug: skia:12698
Change-Id: I94e8c67eba5091406f8722f7f8b76938db9eac3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526458
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
PS1 is the exact contents of src/gpu/v1/ClipStack.* copied to
experimental/graphite/src.
PS2+ shows all the changes to remove v1-only features and update some of
the types over to what graphite uses. The major changes are:
1. FragmentProcessors, clip atlases, stencil mask writing, and SW mask
writing are gone.
2. SW mask caching and tracking are gone.
3. Graphite is effectively in the "forceAA" mode that the original clip
stack supported. So branches that focused on non-AA, or comparing AA
or handling cases where elements' AA mismatched could all be removed.
4. Updated to use Graphite's Shape and Transform classes. Did not go as
far as moving the bounds from SkIRect to Rect, but since everything
is AA, it will be much simpler to switch to comparing float bounds
directly and not worry about rounding in or out. That's a more
substantial change so will come later.
5. The original ClipStack had a "Draw" type that was used to compute
clip interactions between SaveRecords and Elements. It was always
just device-space bounds because of limitations of the GrClip API.
In Graphite, we can use the exact same set of info for Draws and
Elements, making interaction tests share code and be more accurate.
Since that's a more involved change, I just removed the simpler Draw
type from this version for now.
6. Tried to add TODOs for what logic and extra state will need to be
added to actually apply graphite's clip stack as depth-only draws.
Bug: skia:12698
Change-Id: I418703e8f759cd5e1ddd1e302a864bf2204cf040
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525516
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This doesn't reuse memory w/in the gatherer but sets us up to do so.
Bug: skia:12701
Change-Id: If5ed962e73609b113581ed2bd681e872fe3214c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526029
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Following the philosophy that DrawContext should be as simple as
possible, the work that sets up the upload should be done higher up.
If we need to share the code, that can be handled by a helper class or
function.
Bug: skia:12845
Change-Id: Ib0308ce816e545ccffb5ddbe3d9bcc302349397f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526025
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
ASAN detected this leak.
Change-Id: I7f54cbe35ac36d288d2fa676cf0192a793686ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526077
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This doesn't actually change the memory allocation but sets up to do so.
90% of the CL is just renaming SkPipelineData to SkPipelineDataGatherer.
The main interesting changes are those to:
ExtractPaintData
in DrawPass.cpp
and SkPipelineData.h/.cpp
Bug: skia:12701
Change-Id: I3e18f9b3f16166649de1bf1f4399d5521d817eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524763
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12845
Change-Id: I8e9d7dcfaf4f356b65638f0f8490edd8b0dd2644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
In nanobench we want to try and simulate a GPUs swapbuffering and not
get too far ahead on the CPU. Thus we use finished callbacks to know if
we get more than 3 frames ahead of the GPU. This CL adds support for
Graphite to do this.
Bug: skia:12974
Change-Id: I8be505c5769399dcc0f5954f9f999f4448633647
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525186
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This simplifies the IR and emits cleaner Metal code; Metal does not
directly support matrix-construction from a list of scalars.
Change-Id: I0f2415e4c84d4f999aaaeaec3623f0eae41c24dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525179
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Steps to run:
make -C bazel generate
bazelisk build //example:hello_world_gl --config=linux-rbe \
--features skia_enforce_iwyu
# manual fixes of the .h and .cpp files
make -C bazel generate
This will be followed up by a CQ job that checks the generated
Bazel files.
Bug: skia:12541
Change-Id: I7651f885e182a60177839cd78a2d4047e73a676a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525181
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
* Removes unnecessary static function (it's been copied elsewhere).
* Uses Caps info for colorTypeToFormat.
Bug: skia:12845
Change-Id: I557da58ec4456db1d8b1bb9a3d419e3330200a47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525178
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12845
Change-Id: If3ac2b6ba2c8e28328ee5805a29fc83353220364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524756
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Most of these are pretty mechanical generated changes.
IWYU noticed one issue with DSLCore.h, which was fixed here.
Change-Id: I5629565ad3c2817daa71907c62f932d93f9d78ab
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524617
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12701
Change-Id: Ib7e52f26b31cfed8fb4da1929755035a69951ca5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524220
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>