skia2/include/gpu
Brian Salomon 8cabb327e7 Make it safe to enter the cache from a GrTexture idle proc.
This fixes an issue in Chrome where Skia is calling a promise SkImage
texture release proc from ~SkImage that in turn flushes a SkSurface.
Prior to this change this caused an assert because we had already
decremented the GrTexture's ref count priot to calling the release
proc. This made the GrTexture purgeable, but the cache had not yet
been notified that the texture was purgeable and still had it in its
array of non-purgeable resources. This triggered an assert in the
cache's self-validation checks during the flush.

Now we call the release proc just prior to decrementing the ref count.
This also makes it legal to re-ref the resources from the release proc.

Bug: chromium:933526
Change-Id: I8cd921b77ca3dfe112089f9a553c1a625160d16d
Reviewed-on: https://skia-review.googlesource.com/c/194000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-02-22 16:12:35 +00:00
..
gl Infer GL null buffer hint usage from whether on command buffer or WebGL. 2018-12-19 20:28:05 +00:00
mock Enable wide color support in CCPR 2019-01-10 13:53:31 +00:00
mtl added Metal support to GrBackendSurface 2018-06-29 13:32:17 +00:00
vk Remove another semicolon. 2019-02-21 15:19:11 +00:00
GrBackendDrawableInfo.h Add ability for an SkDevice to handle the drawing of an SkDrawable. 2018-10-19 15:21:54 +00:00
GrBackendSemaphore.h Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
GrBackendSurface.h Reduce the number of backend->pixelconfig GrCaps virtuals. 2018-12-14 17:12:36 +00:00
GrBlend.h Reland "make enum santizer fatal" 2018-11-06 17:31:00 +00:00
GrConfig.h Add cap to number of oplists we execute before flushing to the gpu. 2018-12-07 17:57:07 +00:00
GrContext.h Move StrikeCache and TextBlobCache to RecordingContext 2019-02-21 23:01:32 +00:00
GrContextOptions.h Add option to force GLSL string caching rather than program binaries. 2019-02-15 15:32:09 +00:00
GrContextThreadSafeProxy.h Move "matches" from GrContextThreadSafeProxy to GrContext_Base 2019-02-07 19:26:50 +00:00
GrDriverBugWorkarounds.h Reland "Add driver bug workarounds to GrCaps" 2018-05-14 23:46:49 +00:00
GrDriverBugWorkaroundsAutogen.h Add disable_texture_storage workaround 2018-08-22 23:56:23 +00:00
GrGpuResource.h Make it safe to enter the cache from a GrTexture idle proc. 2019-02-22 16:12:35 +00:00
GrRenderTarget.h Revert "Move some Gr headers from include/gpu to include/private and src/gpu." 2018-12-11 19:01:41 +00:00
GrSamplerState.h Revert "Move some Gr headers from include/gpu to include/private and src/gpu." 2018-12-11 19:01:41 +00:00
GrSurface.h Move texture release proc to GrSurface so that render targets can also have releases. 2019-02-05 00:37:54 +00:00
GrTexture.h Move texture release proc to GrSurface so that render targets can also have releases. 2019-02-05 00:37:54 +00:00
GrTypes.h Remove a few semicolons. 2019-02-11 14:40:37 +00:00