That would allow us not to query glyph bounds
Change-Id: Ibee53446e33fd6a54affc1ded438191186cd21be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526296
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@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>
This is a reland of commit 355f0f9fa2
Original change's description:
> Change GPU LOD bias to be just shy of -.5.
>
> We want to ensure that when a MIP level is 1:1 with device space
> that kNearest picks that level instead of a larger level.
>
> Bug: skia:13078
>
> Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13078
Change-Id: I7fc765a8718d770ebdac68adf9c59ff15d8c8451
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526517
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
3bdbfbf868..d3492eef5c
2022-04-01 m.maiya@samsung.com Vulkan: Handle border color for stencil component
2022-03-31 cclao@google.com Vulkan: Create buffer for vertex array if robust enabled
2022-03-31 lexa.knyazev@gmail.com Metal: Remove DrawBaseVertexVariantsTest suppressions
2022-03-31 m.maiya@samsung.com Fix Surface use-after-free bug
2022-03-31 kpiddington@apple.com Metal: Buffer data is not correctly updated
2022-03-31 m.maiya@samsung.com Vulkan: Support GL_EXT_EGL_image_storage extension
2022-03-31 syoussefi@chromium.org Vulkan: Fix deadlock in device loss
2022-03-31 syoussefi@chromium.org Vulkan: Don't reserve varyings for xfb if VK_EXT_depth_clip_control
2022-03-31 syoussefi@chromium.org SPIR-V Gen: Fix aliasing out parameters
2022-03-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f9e3d5a50ca2 to e37ba68c0fde (5 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC jcgregorio@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: jcgregorio@google.com
Test: Test: EGLSurfaceTest.SurfaceUseAfterFreeBug*
Test: Test: dEQP.GLES31/functional_texture_border_clamp_range_clamp_nearest_unorm_depth_uint_stencil_sample_stencil
Change-Id: I547d3d01a1ca52501cf7cdedd65db1b6e9b6143b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526537
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: skia:13114
Change-Id: I421fbddbe92cceac7454ceee4663a41aaae72929
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526026
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 355f0f9fa2.
Reason for revert: blocking chrome roll, should be #if defined(...) for the guard
Original change's description:
> Change GPU LOD bias to be just shy of -.5.
>
> We want to ensure that when a MIP level is 1:1 with device space
> that kNearest picks that level instead of a larger level.
>
> Bug: skia:13078
>
> Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13078
Change-Id: I42d6e99509a87f0354f104f2c0177e78cf0d0e21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526462
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
We already do this for cached SkSurface snapshot images. However,
sharing the SkPixelRef among any SkImage_Rasters with different
SkMipmaps interacts badly with SkImage texture caching and likely
other image caches.
Bug: skia:11983
Change-Id: I07bb7a93ffb79afb7f8268cd5159ee22f58da1e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526456
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13114
Change-Id: I653ab746927abdd1491e070e2e27252bf056d233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526024
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
We want to ensure that when a MIP level is 1:1 with device space
that kNearest picks that level instead of a larger level.
Bug: skia:13078
Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@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>
Pardon the duplicate test file, I have not yet finished
moving the CanvasKit tests to be on Bazel. When I do,
the duplicate (font.spec.js) will go away.
Change-Id: I6ad468f3f322280ffa25429fb8732e7266703e91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526297
Reviewed-by: Ben Wagner <bungeman@google.com>
Since the data for a glyph is always > 4, bound the count to
buffer.available() / 4.
Bug: oss-fuzz:45885
Change-Id: I5c7925487bf11c673c4375c69e8ee8cd4ff4b4a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525979
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Herb Derby <herb@google.com>
The fuzzer has produced a hint such the add sizeof(Slug) make the
value negative. Since this is just a hint, and the arena can always
add more blocks of needed. Just pick a nice size if the hint looks
to small or big.
Bug: oss-fuzz:45893
Change-Id: I196e93a441a586340da6f0626f00c660f3858c64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526030
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@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>
This fixes a bug with the following sequence:
Make SkSurface_Raster, draw to it
snap an image, A, from the surface
make image B by calling withDefaultMipmaps() on image A
Let image A be destroyed.
draw to surface again
snap another image, C, from the surface
Image C and image B would now share the same SkPixelRef, reflecting
the final contents of the SkSurface.
Add a GM that exercises the bug when run through either the pic- or
serialize- vias and DDL.
Bug: skia:13111
Change-Id: Ib079163c84f420baf62fa7960110386303b8fb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
SkSL::Operator was previously just a thin wrapper around Token::Kind and
everything was therefore written in terms of Token. Since Token is not
accessible from include/ (and we don't want it to be), this creates an
actual Operator enum and eliminates the dependence on Token. This will
enable followup changes to reference Operator from within the DSL
include files.
Change-Id: I49555c9151618fd15970a303d2284972c78c3f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525976
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
We needed to do a trick to convince GN to work with a file that had two
extensions (`.dsl.cpp`). We no longer compile fragment processors, and
we definitely don't compile them into DSL code, so this trick is
obsolete.
Change-Id: I918d37835e23071a4cb5143cb057f86a23b91152
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526031
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This flag was meant to control compilation of .fp files, which no longer
exist. Its only meaning now is a synonym for `skia_compile_sksl_tests`.
If you had `skia_compile_processors` enabled in your gn args, you can
replace it with `skia_compile_sksl_tests`.
Change-Id: I49fe58aaf0e60d3998ec43c51c1372a6acad980a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526028
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@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>
We were not freeing the memory allocated by copyToMask in
one place.
Change-Id: I4404395e8bc2beb43eca5226e947c42b22805ef7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526076
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The current setup for the iOS simulator keys off of the fact that iOS
runs on ARM CPUs, and Macs (prior to M1) ran on x64 CPUs. So setting
the target_os to "ios" and the target_cpu to "x64" will indicate use
of the simulator. On M1, they have the same CPU architecture, so we
need another method to indicate use of the simulator SDK.
Also added a check to disable code signing, which is not needed for
running on the simulator.
Bug: skia:12880
Change-Id: I668121010cc557546c4a4e4960601a732bb985c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526017
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Windows + Intel GLSL and Android + Adreno GLSL do not recognize aliasing
against the global and fail the test.
Change-Id: I4c1f950f7addf6691a8db989d93b727dbc97742e
Bug: skia:13115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526023
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:13114
Change-Id: I1e6552aaeee68eaf4e50e42da2a7761953b06415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526019
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
I'm considering migrating SkSL precompilation/dehydration into a
separate binary from skslc. It would need the exact same set of Skia
dependencies. So let's factor them out.
Change-Id: I9b000ef058f7253e142cf5a8a603e468beb4d6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526020
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The earlier implementation generated a very very long expression on a
single line. I split out the logic across into multiple lines, and
also realized that the majority of the logic was repeated two times. Now
we use a vec2 to avoid spelling out the math twice.
Change-Id: I1a60e3663de3d774c5abdcd166734b07ea3dbaaa
Bug: skia:13109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525841
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This lets most simple Porter-Duff based Compose operations share the
same shader text; the values in a uniform control which blend mode we
will use. This is only enabled in reduced-shader mode.
Best-case scenario I could find:
- Original: http://screen/EkXsnfNPC9CxiwE
- Uniforms: http://screen/9rJLe6JMrhteD24
Change-Id: I0edc7910a9a2ae7f4e5abbd57128d7b3b52971bf
Bug: skia:13109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525317
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@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>
Qcomm did some investigations of this workaround, and even though it was
giving some cpu savings, it was causing a big hit to GPU performance and
power. So we're removing this now to get back the various wins on the
GPU.
Change-Id: I01ba4e271dc02ae4ab6155fc794a5a1e3c796341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525638
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Icc6d1345c59d6f6529db39bf4b5bd8097f1f6b5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525837
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This moves the Build-Debian10-BazelClang-x86_64-Release-IWYU
job from experimental to on when a file in one of the
folders that we enforce IWYU is modified (currently
for svg, sksl, and now, debugger).
Change-Id: Ia6fe1e7b30fc486db3eb081b6a64bc4c250cbf0b
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525796
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
When `Make<BlendOp>(src, dst)` is used, the blend mode will always be
hard-coded into the shader, instead of using a uniform to apply a
generic Porter-Duff blend.
Change-Id: I59a05eea3417b1880cef63738c0116d19f01ee3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525641
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This should fix many issues that Chrome is seeing. The problem is the
picture recorder had no idea about Slug, so the canvas super class
would try to use the device to draw. This hooks up the recorder
to capture drawSlug into the picture.
I tested this with a specialized gl sink in DM which I'm struggling
to check in. But, it was functional enough to show that this works.
Bug: chromium:1302036
Bug: chromium:1307279
Bug: chromium:1306329
Bug: chromium:1307446
Change-Id: I6a27bf43702400c80b2044433e7b00347f522763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Local measurements show that using RBE (with a warm cache)
vs local can result in a 2x faster build.
No-Try: true
Change-Id: Ib900a90564f105de848c9aeb0b745e5fec77da53
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525637
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Because these tasks use RBE, the machines they run on do not
need to be as powerful. In practice, we are seeing a lot of
the build steps be a hit on the remote-cache, so we don't need
the number of Bazel jobs to be as high, so I've arbitrarily
set it to be 100. We can revisit this later if we notice
things are slow.
To facilitate this change, I had to add cloud-platform scope
to all our GCE VMs. There is a script in the infra repo [1]
that helped with this:
go run ./scripts/add_gce_scopes/add_gce_scopes.go \
--zone us-central1-c --project skia-swarming-bots \
--scope https://www.googleapis.com/auth/cloud-platform \
--instance skia-e-gce-100,skia-e-gce-101,...
[1] b103ea24f5/scripts/add_gce_scopes/add_gce_scopes.go
No-Try: true
Change-Id: I7f1e7b1e9e4a22f5383cf9ce1c8c0350e62b5283
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525577
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>