diff options
author | bsalomon <bsalomon@google.com> | 2016-01-23 10:41:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-23 10:41:41 -0800 |
commit | a9909121ebdd35fb8d8694103a443f230ffa3a3a (patch) | |
tree | 8eab627265208ea5fd7441869c8499bc8df0cce5 /src/gpu | |
parent | fac684502b6047ffc7dc2e59bd7e5a7cbfa5bf78 (diff) |
Don't dirty MIP chain when damage bounds is empty
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1618383002
Review URL: https://codereview.chromium.org/1618383002
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 10 |
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); + } } } |