aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-01-23 10:41:40 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-23 10:41:41 -0800
commita9909121ebdd35fb8d8694103a443f230ffa3a3a (patch)
tree8eab627265208ea5fd7441869c8499bc8df0cce5
parentfac684502b6047ffc7dc2e59bd7e5a7cbfa5bf78 (diff)
Don't dirty MIP chain when damage bounds is empty
-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);
+ }
}
}