Index: src/gpu/gl/GrGLGpu.cpp |
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp |
index 8fffc4d917d85f58a4808da429ac925a3f39e62b..1b25402b4f480ccee81e1deb14894d81110e1567 100644 |
--- a/src/gpu/gl/GrGLGpu.cpp |
+++ b/src/gpu/gl/GrGLGpu.cpp |
@@ -2317,13 +2317,13 @@ void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bound) |
} |
} |
} |
+ |
+ // Mark any MIP chain and resolve buffer as dirty if and only if there is a non-empty bounds. |
if (nullptr == bound || !bound->isEmpty()) { |
target->flagAsNeedingResolve(bound); |
- } |
- |
- GrTexture *texture = target->asTexture(); |
- if (texture) { |
- texture->texturePriv().dirtyMipMaps(true); |
+ if (GrTexture *texture = target->asTexture()) { |
+ texture->texturePriv().dirtyMipMaps(true); |
+ } |
} |
} |