aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/gl/GrGLGpu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 84f2bdda8e..bf0b297c8c 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2239,13 +2239,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);
+ }
}
}