Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are deleted.
Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs.
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/376703009
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index 25c13ec..78b6174 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -56,7 +56,7 @@
fCurrTexture = NULL;
fCurrVertex = 0;
- fEffectTextureGenID = 0;
+ fEffectTextureInstanceID = 0;
fVertices = NULL;
fMaxVertices = 0;
@@ -94,11 +94,11 @@
SkASSERT(fCurrTexture);
GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kNone_FilterMode);
- uint32_t textureGenID = fCurrTexture->getGenerationID();
+ uint64_t textureInstanceID = fCurrTexture->getInstanceID();
- if (textureGenID != fEffectTextureGenID) {
+ if (textureInstanceID != fEffectTextureInstanceID) {
fCachedEffect.reset(GrCustomCoordsTextureEffect::Create(fCurrTexture, params));
- fEffectTextureGenID = textureGenID;
+ fEffectTextureInstanceID = textureInstanceID;
}
// This effect could be stored with one of the cache objects (atlas?)