Use SkIDChangeListener and update GrBitmapTextureMaker to add listener
to key to deregister if texture is purged before genID changes.
Add a common listener list implementation and replace existing lists.
Change-Id: Ib0c78241eaf59b59b892d8b004b2bb095140bc6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274549
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Id38c51704c99810b2237d18c18163d9d776451bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274588
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
We've got this can_hoist analysis... why not use it?
I need to do some pen and paper work before I can do
this for the scalar loop, so that's TODO.
The tight part of a memset-from-uniforms loop becomes
0x1065c70e0: vmovdqu64 %zmm0, (%rdx)
0x1065c70e6: addl $-0x10, %edi
0x1065c70e9: addq $0x40, %rdx
0x1065c70ed: cmpl $0xf, %edi
0x1065c70f0: jg 0x1065c70e0
Change-Id: Iad8ee018ae65ee9f370980939a70f042ee3f9138
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274586
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit d3606518fa.
Reason for revert: DDL3 bots are red
Original change's description:
> Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp
>
> This CL also incidentally adds:
>
> 1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
>
> 2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
>
> Bug: skia:9455
> Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: I6e44ba3bc47df27479af9344af946e27f0a2e937
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
These don't get us to be able to hoist uniforms yet,
but I think they're required. Tests still pass.
The nullptrs in the CreateGEP calls were implied by
the old special cases we were calling before. They
mean, pick up the type from the pointer argument.
Change-Id: Idd2b5c4b782229ebf2640f87e0ed6ebb63809042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274583
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This CL also incidentally adds:
1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
Bug: skia:9455
Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Not sure about read/write pixels at this point, so left those as stubs.
Also commented out sections that apply to YCbCr formats, which will
be added later.
Bug: skia:9935
Change-Id: I715b5a2a894af9a4fbbfcd89a6eab284913293dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273608
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This should ensure that for users where the ANGLE git repo is present,
we correctly re-generate commit.h when rolling to a new revision.
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
Change-Id: Ib3c77a19d243896f4e7359dc4f14e87d4907739e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274498
Reviewed-by: Geoff Lang <geofflang@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Adds a bindBuffers() call and removes the GrBuffer arguments from the
draw calls.
Change-Id: I43c2dd8afe80c41e48c1d9d5210affcfe6f095fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273840
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
* Mainly updates to documentation.
* Fix some comments in PRESUBMIT.py.
* Delete tools/lua/trigger_ct_lua. It has not worked in many years.
Bug: skia:9962
Change-Id: If6f58f173f2c8bd3fc9bdfc4db440f42489fee08
Docs-Preview: https://skia.org/?cl=274597
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274597
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Bug: b/150353577
If malloc fails, don't let SkJpegCodec attempt to decode into it.
Return kInternalError, which is what we return for OOM.
Change-Id: I6750e907c5e649d9e12ba75e84c8d9e91a66dd61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273809
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Generalizes the system used on SkPathRef where a GrTexture's key
destructor signals that a listener on the image can be removed via
the unique key custom data.
Removes texturesAreCacheable() from SkImageGenerator. This was used to
prevent unbounded growth in a narrow situation related to
GrBackendTextureImageGenerator.
Change-Id: I3c605da099acfac94751e793331e356a0979d359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274038
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I294495f952c8310bf1518363778fda9690c8c83e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274202
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
This is a reland of b67081f9cb
Original change's description:
> Move setupGeometry() from GrGLGpu to GrGLOpsRenderPass
>
> Change-Id: I8788b96e07216be738c0ce1babb810b05bf46694
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273696
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: Ic30c9e1b1d9a3ae29623ff8239b9b1d7b2dad273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274057
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
AE supports dashing all strokes. Dashes are specified as an arbitrary
number of intervals (alternating dash/gap) plus a start offset.
All values can be animated independently (but of course!).
- implement a SkSG dash effect (based on SkDashPathEffect)
- expand the shape builder logic to allow local geometry adjustments
(kind of a bummer that dashing is a stroke/paint property as opposed
to a geometry effect in AE)
Change-Id: Ic9ff35f2f9a552a3c26f9e1596ce58ad81f7ced5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274550
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Each such op now has a base createProgramInfo method along with a helper version that just takes a flushState.
This CL also makes GrSimpleMeshDrawOpHelper::CreateProgramInfo a chokepoint for programInfo allocation.
Bug: skia:9455
Change-Id: Ibbf0e9cd6f24453e1b87a5e072a30248811a1237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274054
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Move justification shifts into Run
Change-Id: If1e7b87fd58ce791fc0e2ee9bdfb1b87ee6bb696
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274197
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Pass dm_properties separate from dm_flags so that the recipe can check
for properties with empty values.
Aside: we should look into changing the way properties are passed into
DM (or not pass them at all).
Change-Id: I47268506e63939e7a75256616bce947ada5e7e9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274540
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Instead pass wrap modes to createFragmentProcessor.
Rename GrTextureProducer::hasMixedResolutions() to
isPlanar() and use to determine whether to attempt
simple texture draw (that would flatten).
Change-Id: Ifca833a1ab02a98e4e24718bd8542e0ac48a4c74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274276
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I1a6410dc98deb0a0144118bdf52563115d91b75c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274539
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I9ef6e2e3ade1213045932fee453c51e0f6519909
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274537
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: Ic7b204a7ec8e4574cb89e9b18f3fdf051dbf1132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274496
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Change-Id: I3d82d78161373ec0536cbe6df196c753547501a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274200
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
This particular location was chosen because we can rely on it being
present in the recipe bundle. We'll soon run the script to generate
DM flags in gen_tasks, before finally porting the logic to Go inside
gen_tasks itself.
Change-Id: I36ec481cdabffe8d1da662cc813dda43fe7b21f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274053
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
In preparation for moving dm_flags out. Important behavioral change to
note: now we're passing issue, patchset, and patch_storage flags for all
runs of DM, including non-tryjobs. I don't think it should change any
behavior, but it's something to watch out for.
Change-Id: Ie45dbfa606b4325dc94c855dbc3531c7eeaacf9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274051
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Remove unused key from GrYUVAImageTextureMaker.
Remove outdated comment about width/height for image/bitmap key.
Change-Id: I76efd61725a0c63c058cdf480295f49dcfeab0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274238
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The only thing that affects the view returned is whether it ought to
be MIP mapped or not. So don't take a whole GrSamplerState.
The view() function won't ever change the colortype so just query
GrTextureProducer rather than having view() return a tuple.
The rest is transitively reaching through callers and callees of
GrTextureProducer::view() to only pass filter or GrMipMapped instead of
GrSamplerState. Also, some params that indicate whether MIPs are
requested are changed from bool to GrMipMapped. And some minor style
stuff (mainly de-yoda-ifying GrMipMapped checks, using
GrSurfaceProxyView operator bool()).
Change-Id: Ia184aa793cf51d42642ea3bb0521ce06da2efb10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
https://crrev.com/ca01a2f6cb0d44631e89064dfbcef954b81417e6 (gbeaty@chromium.org)
Change the behavior of debug with no arguments to debug recent failure.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I7598bf9c1266d059fc3a5c12e427e0a51fda83c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274262
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
https://crrev.com/695991201368bcca73189853a28f9679f2668da9 (atyfto@google.com)
[file] Add flag to skip logs on write_raw & write_text
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I6392bc3941fb652a87293b255b4dfcf9afd3ee3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274236
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Being thread_local, these destruct in an awkward order
with the other major thread_locals, the SkVMBlitter Program caches.
So, just leak them for now.
Change-Id: Ia45f65eba0a301e2a047458610d5fa3110dff006
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274220
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>