Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(672)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1618383002: Don't dirty MIP chain when damage bounds is empty (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: squash a line Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698