This ensures we never confuse a dead effect pointer in our cache for a
different live effect that happens to be allocated at the same address
as the old one. Never seen it happen yet, but it's possible.
Change-Id: If8aff141fb6d0a4e10f13a153b154bb14f5a8c1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251442
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Nothing too tricky, all spun off the other CL.
Diffs on the new emboss GM look good.
Change-Id: Ia46f106491e92c0cee4020200474ea5de2ca270d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I'm not hitting SkVMBlitter with a 3D mask
without also implementing support for SkColorShader.
Adding this green "World" tests that path with
a paint color, and should let me test and land 3D
mask support before adding shader support.
Change-Id: I9020a14a8a77dd2946c094308e5ad04beea20068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251439
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Dawn uses symbols in its API which Xlib.h #defines, which causes
compile-time conflicts. However, they do need to work in Chrome, so we
work around them the way Chrome does: by redefining them as static
constants (see https://cs.chromium.org/chromium/src/ui/gfx/x/x11.h).
Change-Id: Ibef0fd9976503cd606aa0fa646998df54675efb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250998
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
When rendering cross-context images, we can end up with a situation
where the image thinks it should be tiled because it won't fit in the
cache, but we can't tile it because getROPixels fails. In this case,
the image should be backed by the client, so we should be able to
render it through a TextureProducer.
Bug: skia:9562
Change-Id: I172e1008ca423f46b0c7b445bdf3eb573215adfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We were always testing the CPU backend.
Bug: skia:9582
Change-Id: I25ff1dc151c1be8a31ab09008393430a1fa85221
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251457
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:9556
Change-Id: Icbcc56c0eb0d0de0886874e0ed8c3f03c7318d02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249883
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We later compute the "width" of the filter as (2*radius)+1, so fail
early if that will overflow.
Bug: chromium:1018190
Change-Id: I6554693067be4b52b1304d9f6fd0376ce4b3be19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251364
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I believe GrFillRectOp wasn't handling AA-upgrading correctly. Both ops now also check that they aren't exceeding the index buffer limits for both AA and non-AA draws.
Change-Id: Iae586b92e1f27a908a54ae881f2b1db21ec1afc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251360
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We add a small cache of descriptor sets on each texture which only contain
one descriptor which a a texture/sampler using the given texture.
This helps to reduce the overhead of finding a new descriptor and re-writing
data to it every frame we want to use it.
Seeing about 25% gpu main thread performance win on linux vulkan
css_opacity_plus_n_layers.html?layer_count=1000&visible_layers=1000 test
Bug: skia:9574
Change-Id: I9979d7d874350e12caae0e5e70113c9347228e8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251243
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
It was easier to just add a few saveLayer overrides rather
than try to expose the struct of pointers. SkRect*
was hard/impossible because we have it as a value_object,
which does not support pointers in enscriptem.
Change-Id: Iad702593cca19f80d6ef9a319f8c80a087135e38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We are pretty comfy exposing this set for the long-term.
CanvasKit will generally support chains of image filters,
not necessarily arbitrary DAGs, just to simplify the
points needed to expose.
Change the naming around MaskFilters also, I like having
the factories be a class function, just to keep things
a bit better organized and minimize the amount of things
we want to keep on the top level CanvasKit object.
Change-Id: If32c630efa2fd8bc4bac84d0c3461ac3c0d21263
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250758
Reviewed-by: Robert Phillips <robertphillips@google.com>
I wanted to cleanup this file as much as possible before starting to add
caching logic to make the changes simpler.
Bug: skia:9574
Change-Id: I8280a81f17372680a488f7f7d28d78d68121b235
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251201
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is a reland of 620154a7dc
Now handles kGray_8.
Original change's description:
> Make GrFillInData use SkRasterPipeline
>
> Makes it easier to add new color types.
>
> Bug: skia:6718
> Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:6718
Change-Id: Id8b632242b87957f5b1e1a130eb26dafdf82a1cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251359
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This CL also increases the AAQuadIndexBuffer's size and centralizes the handling of index buffer constants.
Change-Id: I4fb679a1c5e4076cf249b612f798e9bf5a38cd0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251244
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 1e0f2f389f.
Reason for revert: I suspect this is blocking the Chrome roll
Original change's description:
> Implement refPinnedTextureProxy for SkImage_Lazy.
>
> Creating a cross-context texture exposed a hole in our lazyproxy
> texture generation. Despite having a wrapped texture we were falling
> back to drawing in tiled mode, which is incorrect. Filling in these
> methods allows us to draw with the wrapped texture.
>
> Bug: skia:9562
> Change-Id: Ia26c5d75b202aefdf720e6d1f7a201af23e40676
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251214
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,robertphillips@google.com
Change-Id: I2dd6f2cbe13dd3ac1f65890da366171572fb84e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251356
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 620154a7dc.
Reason for revert: Breaks Win10.
Original change's description:
> Make GrFillInData use SkRasterPipeline
>
> Makes it easier to add new color types.
>
> Bug: skia:6718
> Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I77b400fcb9a74b56f5b480c88e3d2340f26a6cf2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251349
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Only send the glyph images that will be used by the GPU process. If the image
is too big to fit in that atlas, it will never be placed in the strike cache.
So, don't send it.
Change-Id: I8b3c3138555cf73b370784b37360b0a283bb3e41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251239
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I487fb2e68de683301ce3d7ad19465b71d48c28e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251249
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Observed AE layer parenting semantics:
* layers are flagged as either 2D or 3D
* camera applies to 3D layers, but not to 2D layers
* parented 3D layers treat their ancestor transform chain as 3D (SkMatrix44)
* parented 2D layers treat their ancestor transform chain as 2D (SkMatrix, ignoring 3D components)
This means that for a given layer, we may need to build two distinct transform chains - depending
on the type of descendant layer being considered.
Furthermore, transforms are animatable and their animators are scoped to a layer controller. Since
we're potentially building two version of the transform node, we need to ensure all animators for
both of them are transferred to controller object (we still want to only instantiate a single layer
controller and render tree to avoid duplication). IOW, all dependent layer transforms need to be
considered before "sealing off" a given layer controller.
In order to avoid a layer dependency/topological sort, we can split off the transform tree
construction into a separate pass. High-level changes:
-- replace existing LayerAttachContext with CompositionBuilder
(holds LayerBuilders and other Composition-wide state)
-- replace LayerRec with LayerBuilder
(holds Layer-wide state and also caches transform nodes)
-- pass 1: for each LayerBuilder, transitively build and cache a transform chain
of a type (2d/3d) determined by the leaf (entry point) layer
-- pass 2: for each LayerBuilder, build the actual layer content render tree
and instantiate the layer controller objects
Bug: skia:8914
Change-Id: I9f7efcf4819424282fd3dda98f5621ba12fd001b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Creating a cross-context texture exposed a hole in our lazyproxy
texture generation. Despite having a wrapped texture we were falling
back to drawing in tiled mode, which is incorrect. Filling in these
methods allows us to draw with the wrapped texture.
Bug: skia:9562
Change-Id: Ia26c5d75b202aefdf720e6d1f7a201af23e40676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251214
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: chromium:1016183
Change-Id: I2fa470db3690f79d83fd17b01e421e7457f7c725
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251246
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Makes it easier to add new color types.
Bug: skia:6718
Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Chrome is now using the newer version.
Bug: skia:8962
Change-Id: I8c38bde63e1e032281d19b0cc7cb8cf301061a9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251198
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
When run on cooperative threads, we need to notify the threading system
when we're going to block (in any way, sleep or spin) so that it doesn't
wake that thread up expecting it to make forward progress.
This should cover SkOnce, SkSpinlock, SkSemaphore, and by extension
SkMutex. Not sure if there are others to hit, but really the only way
to find out is by deadlocked stack traces. This CL (obviously?) does
nothing to mark synchronization primitives used by Skia's dependencies,
and in general I don't think we can do anything about them.
See cr/275261423 for more background and discussion. It's not clear to
me that marking these symbols as weak is necessary, so I figured I'd
just try not doing that and seeing what breaks. I can always follow up
with weak symbols if proven necessary.
Bug: skia:9577
Change-Id: I2c03fe92c58ad506dd8a68bdc90a09b28f965149
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251221
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This CL doesn't use the new VertexSpec member variable but should clarify the path forward (i.e., we will determine the index buffer option at characterize time and enforce that decision at onPrepare time for all the meshes).
This also refactors the GrTextureOp::characterize call.
Change-Id: I7010385abf5a462c12fd47e314aad893bca85fb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251002
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit e63595dd85.
Reason for revert: Breaking the Perf tests:
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Command exited with code 139
#######################################
symbolized stacktrace follows
#######################################
build/nanobench BulkRectBench<1000, (RectangleLayout)1, (ImageMode)2, (DrawMode)2>::onPerCanvasPreDraw(SkCanvas*) at skia/bench/BulkRectBench.cpp:218
build/nanobench main at skia/bench/nanobench.cpp:1277
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f1213dad2e1]
build/nanobench _start at ??:?
Original change's description:
> Add variety of bulk API benchmarks
>
> Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
> a unique image, or as a solid color. Tests using the bulk APIs and regular
> one-at-a-time drawing.
>
> Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,egdaniel@chromium.org,michaelludwig@google.com
Change-Id: I3b26d5a04c472993585242a108c2764ea2b96940
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251213
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
a unique image, or as a solid color. Tests using the bulk APIs and regular
one-at-a-time drawing.
Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This new freetype lets us have emojis and brings in years
worth of bug fixes from the ancient version shipped in
the emscripten-ports
Change-Id: I0b8779dba3341a3ef73c715fde2e5fb37e45126a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247296
Reviewed-by: Ben Wagner <bungeman@google.com>
Also, create and use new service account for the Android compile bots.
NoTry: true
Bug: skia:9568
Change-Id: I974229a87f8c00bf6e4d0d5e49bbfdde6ca84e19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250978
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
77fba58c96..95a736bd33
git log 77fba58c9658..95a736bd3347 --date=short --no-merges --format='%ad %ae %s'
2019-10-26 jmadill@chromium.org Reland "Add more test_utils functions."
2019-10-26 jmadill@chromium.org Roll chromium_revision 60074bf9e0..5fe256ab5e (709436:709762)
2019-10-25 ianelliott@google.com SwiftShader: Update the expectations file according to latest testing
2019-10-25 jmadill@chromium.org Capture/Replay: Add ANGLE_get_image extension.
2019-10-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 883e817b14bf..f44f7c066a67 (4 commits)
2019-10-25 jmadill@chromium.org Capture/Replay: Fix capture build on Android.
2019-10-25 jmadill@chromium.org Update wrangling docs to link to SwiftShader roller.
2019-10-25 jmadill@chromium.org GN: Explicitly add several Windows libs.
2019-10-25 jmadill@chromium.org Fix warnings in xxhash.
2019-10-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src feb154921397..b34fa731931b (23 commits)
2019-10-25 jmadill@chromium.org Capture/Replay: Fix docs link.
2019-10-25 jmadill@chromium.org Use googletest nested DEPS file.
2019-10-25 jmadill@chromium.org Roll chromium_revision 9325340209..60074bf9e0 (704874:709436)
2019-10-25 jmadill@chromium.org Enable "-Wconditional-uninitialized".
2019-10-25 jmadill@chromium.org Enable "-Winconsistent-missing-destructor-override".
2019-10-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 7662586844f4..b131630e7c74 (1 commits)
2019-10-25 jmadill@chromium.org Enable "-Wundefined-reinterpret-cast".
Created with:
gclient setdep -r third_party/externals/angle2@95a736bd3347
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 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/+/master/autoroll/README.md
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=jcgregorio@google.com
Change-Id: I4fd8053d08eaa982396b29925815d608d94e252b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251177
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
The Pro Vega is used in the iMac Pro, and has the following
string:
"AMD Radeon Pro Vega 56 OpenGL Engine"
Make it behave like kAMDRadeonHD7xxx_GrGLRenderer.
Change-Id: I3eb60a56e0d10df6d5deab18302514d0ae3b2a56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251116
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reading back pixel values from protected memory into cpu memory is
not allowed. This CL adds early returns so they are not attempted.
Bug: skia:9016, fuchsia:38648
Change-Id: Icc0b51a62e87b7aebd0e7cb2a061fea084e7f754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>