Every op that updates dynamic state between draws has now been
migrated to explicit binding.
Change-Id: Ibd13c9c0ffb16a205c073dfb4fd21d93f496dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277493
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Renames GrQuadPerEdgeAA::ConfigureMesh to "IssueDraw", and modifies it
to call draw*() directly on an opsRenderPass. Updates GrFillRectOp and
GrTextureOp to bind their own pipelines, buffers, and textures, and
then call IssueDraw. Removes DynamicStateArrays and FixedDynamicState
from GrTextureOp, in favor of directly re-binding textures during
onExecute.
Bug: skia:9455
Change-Id: Ia4a7a467061bfd0e35d363295ef1821ed2ed4e9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277496
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
For API simplicity, if the rectangle is to be omitted, the client
should only provide the paint. (emscripten already does parameter
count checking, so let's use that instead of doing it ourselves).
This also adds tests to help verify the new behavior.
Revert "Revert "Allow null rect for saveLayer""
This reverts commit 7957d53c80.
Bug: skia:10043
Change-Id: I9ed8caabbfc77deab1ca3d9b1a415489e012528f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277399
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
This avoids the allocation of many small staging buffers for uniform
uploads.
Change-Id: I81ddc0f2b72435a3eabfc51f925b8ea24c0a585f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275438
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We are removing dynamic state from the ProgramInfo, so the Ops will
need to invoke visits on their own primProc proxies.
Change-Id: I7ab227ab71208b7c7bcb7a9deb56b9abd556d6aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277236
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Everyone is responsible to set up their own scissor and textures now.
Change-Id: Ic3547f00c0e7908409631951de4b7237b9bce23b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This moves the byte block linked list structure outside of GrMemoryPool
into a new type, GrBlockAllocator. This new type is solely responsible
for managing the byte blocks, tracking where the next allocation
occurs, and creating/destroying the byte blocks. It also tries to
encapsulate all of/most alignment related math, while making it
convenient for clients to add per-allocation padding/metadata.
It has added functionality compared to the original block linked list
that was embedded in GrMemoryPool:
- Supports resetting the entire allocator
- Supports resizing the last allocation
- Is able to rewind an entire stack of allocations, instead of just the
last allocation.
- Supports multiple block growth policies instead of just a fixed size.
- Supports templated alignment, and variable alignment within a single
GrBlockAllocator
- Query the amount of available memory
- Performs as much math as possible in 32-bit ints with static asserts
that ensure overflow won't happen.
Some of this flexibility was added so that the GrBlockAllocator can be
used to implement an arena allocator similar to SkArenaAlloc, or to
replace the use of SkTArray in GrQuadBuffer. It is also likely possible
that GrAllocator can be written on top of GrBlockAllocator. I will try
to perform these consolidations in later CLs.
Change-Id: Ia6c8709642369b66b88eb1bc46264fb2aa9b62ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262216
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Add a version tag at the start, reject any cache blobs without it
Bug: chromium:1062018
Change-Id: I18bb668e6b836e1247640e9286a69a3e745babfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
cb9a86a9d8..d24752e63a
git log cb9a86a9d867..d24752e63ae4 --date=short --first-parent --format='%ad %ae %s'
2020-03-17 jmadill@chromium.org Capture/Replay: Write to single binary data file.
2020-03-17 jmadill@chromium.org Re-enable optimization for angle_perftests.
2020-03-16 jmadill@chromium.org Move perf test common files to a source set.
2020-03-16 jmadill@chromium.org Refactor ANGLE common test utils.
2020-03-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src dd3d91691f1e..25ede1ced679 (5 commits)
2020-03-16 jmadill@chromium.org Fix documentation typo.
2020-03-16 jmadill@chromium.org Add more documentation on testing infrastructure.
2020-03-16 xiaoxuan.liu@arm.com GLES: Skip tests if vertex SSBO were not supported
2020-03-16 jmadill@chromium.org Fix running trace tests in non-standard directories.
2020-03-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 18daa81e3d3d..3a50a43df988 (14 commits)
Created with:
gclient setdep -r third_party/externals/angle2@d24752e63ae4
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 egdaniel@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/skia.primary:Build-Debian9-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
Bug: None
Tbr: egdaniel@google.com
Change-Id: I73041ec64875b2feb4ee5391a9cccf3d12eabdd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277417
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Whether we should shrink at the end of mutate() turns out to be moot.
:)
Change-Id: Ic29df5734e3057f165f695b2d03f8e7eb0eeb4dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277299
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
In the old code, the cache was checked and perged on every reattach
of a strike. That was left out of the multi-threaded code. Add the
check and purge back in to maintain cache size.
* Removed minimum cache size from setCacheSizeLimit.
Bug: skia:10046
Change-Id: I2438c83f04b6da8133c161a29604c3c3d7f58cd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277066
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The only vaguely tricky thing to adapt from templating on T to T*.
Don't think there's a need for the unit tests now right?
Bug: skia:9703
Change-Id: Ib8fcebd9e0e35bea5ef23e6fd5962654a28d587b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277214
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This was the remaining tricky use of Iter,
removing elements from the table while iterating.
In this case, since we're removing everything, it looks
unnecessary... we can just clear the table when we're done.
Bug: skia:9703
Change-Id: I5333d9fade1e52bd82b5d9c6ac494aad068d5dd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277207
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I76fb1e5da5dd162e8245758ccae8effac2f21c0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277179
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Bug: skia:
Change-Id: Ia83f2b69948eeb747ecc171fb8677c8e22cc8ba7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277176
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Fuses the relevant functionality into the set() calls.
Change-Id: I3a764219425c35967942366c60a6b9ee6ec48e11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The biggest mismatch between these and SkTHash{Map,Set,Table}
is the old ones provide Iter and ConstIter, the new ones foreach().
This CL,
- adds foreach() methods to the old types,
- replaces all uses of ConstIter with foreach(),
- replaces most uses of Iter with foreach(),
I'm leaving one spot using Iter to walk the table and remove its
elements for its own CL... it'll be a little more complicated to get
that right.
From there it should be straightforward to turn SkTDynamicHash
into a thin wrapper over an SkTHashTable.
Bugs: skia:9703
Change-Id: Ia6ba87c35b89585c42b5b9f118f4cbf3abd04f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277098
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Since we grow when size >= 3/4 cap, shrink when size <= 1/4 cap?
Keeping a minimum table size of 4 preserves the invariant that tables
with non-zero capacity always have at least one empty slot, allowing
find() to determine a particular key is not in the table by stumbling
upon that empty slot on the key's hash chain. That's effectively what
we're asserting at SkTHash.h:84.
Bug: skia:10041
Change-Id: I4247e4ff155fd11561086547525354365bc69f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277096
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
6963f58c76..cb9a86a9d8
git log 6963f58c7678..cb9a86a9d867 --date=short --first-parent --format='%ad %ae %s'
2020-03-15 ynovikov@chromium.org Skip SwANGLE GLES31 tests which crash with 32-bit Subzero.
2020-03-15 jmadill@chromium.org Format perf_test.cc.
2020-03-15 jmadill@chromium.org Temporarily disable optimizations in angle_perftests.
2020-03-15 jmadill@chromium.org Trace Tests: Rebase path to relative dir.
2020-03-13 m.maiya@samsung.com EGL: populate EGL_NATIVE_VISUAL_ID values for Android
2020-03-13 ynovikov@chromium.org Revert "Skip crashing dEQP-GLES3.functional.samplers.*_tex_3d.* on SwANGLE"
2020-03-13 lexa.knyazev@gmail.com Implement ScanForward64 on 32-bit platforms
2020-03-13 timvp@google.com Add ANGLE_FOR_ANDROID_TOAST_MESSAGE to AndroidManifest.xml
2020-03-13 jmadill@chromium.org Vulkan: Timestamp internal RenderPasses in perf tests.
2020-03-13 jmadill@chromium.org Update export_targets to fix presubmit on Windows.
2020-03-13 courtneygo@google.com Vulkan: Disable robustness support
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 16ae92a4ee52..18daa81e3d3d (15 commits)
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 29adf277cb19..f1d9f12a19de (2 commits)
Created with:
gclient setdep -r third_party/externals/angle2@cb9a86a9d867
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 egdaniel@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/skia.primary:Build-Debian9-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
Bug: None
Tbr: egdaniel@google.com
Change-Id: I2c8d687cdc0ab3c8993ce706bf9591916b2399f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277119
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Move (x,y) up front for shaders, Color for color filters.
I did think about wrapping the other params in a struct, but
for now I still find it less error prone (while admittedly
more tedious) to have all those params in my face when adding,
removing, or refactoring parameters or effects.
Change-Id: I5e124f1ecea3eff9366872d5e77ddfbadc0302e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277111
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Small diffs in affected gms, but doesn't seem wrong.
Change-Id: I6577943f924d682e9ad4ff195ab98ca2168fd527
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277064
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
If we like this, will follow with a CL to change colorFilters to take
a color and return a color.
Change-Id: Ibd99d18dd7c21fa592500bf371d94a90a01f48b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277062
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Also, move blendmode helpers into SkBlendModePriv.h
Change-Id: I2695c9dabd255b58616e4febb3e53190267cdb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277061
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of 79007c9309
Original change's description:
> Clear out atlases if they haven't been used in a while.
>
> This will stage out atlas pages one at a time with an interval of
> 256 flushes between them. Also removes the last page to help
> conserve memory if text or other atlas-using systems are not in use.
>
> Bug: 1058905
> Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
Bug: 1058905
Change-Id: I25b0037cb1608ae0bda641e0d0588afaf3dd47e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276960
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The Dawn backend also requires a live render target to create a
GrProgramDesc.
Bug: chromium:1059890, chromium:1059939
Change-Id: I48490de3aa7dcbe653c3911b269304cb13bb15b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276985
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
(follow-up to https://skia-review.googlesource.com/c/skia/+/276576)
Force drawing of text as path in the presence of path effects.
Additionally, ensure that all glyph runs are rendered as a single path
(instead of one path per run).
Change-Id: Ibc69b0f93ff09af349f3376f79ed3fce18151a14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276956
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit 79007c9309.
Reason for revert: MSAN and fontregen issues
Original change's description:
> Clear out atlases if they haven't been used in a while.
>
> This will stage out atlas pages one at a time with an interval of
> 256 flushes between them. Also removes the last page to help
> conserve memory if text or other atlas-using systems are not in use.
>
> Bug: 1058905
> Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,herb@google.com,robertphillips@google.com,backer@google.com
Change-Id: I5aa4326b490b66a4bb272069487311fc622a9711
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1058905
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276959
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I1dfb6b98c237ff916f478c39d925e775c2c1bb74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276957
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This will stage out atlas pages one at a time with an interval of
256 flushes between them. Also removes the last page to help
conserve memory if text or other atlas-using systems are not in use.
Bug: 1058905
Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This is, somewhat, interesting bc it has >=1 mesh.
Bug: skia:9455
Change-Id: I608856f469e145057e4170e4bf045f6669825522
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276646
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>