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

Unified Diff: src/gpu/GrContext.cpp

Issue 696293004: Rename and clarify semantics of GrContext::resolveRenderTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@fix
Patch Set: Created 6 years, 1 month 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
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 9d684aa1357a8ce86e227e8cee9262d69e8df321..d95b4fe088aa1baf655ac2a8d4e319f677db9351 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1534,12 +1534,15 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
return true;
}
-void GrContext::resolveRenderTarget(GrRenderTarget* target) {
- SkASSERT(target);
- ASSERT_OWNED_RESOURCE(target);
- this->flush();
- if (fGpu) {
- fGpu->resolveRenderTarget(target);
+void GrContext::prepareSurfaceForExternalRead(GrSurface* surface) {
+ SkASSERT(surface);
+ ASSERT_OWNED_RESOURCE(surface);
joshualitt 2014/11/03 21:47:45 The original code had a check for needing resolve,
bsalomon 2014/11/03 21:54:16 I did that to try to avoid the flush if the surfac
+ if (surface->surfacePriv().hasPendingIO()) {
+ this->flush();
+ }
+ GrRenderTarget* rt = surface->asRenderTarget();
+ if (fGpu && rt) {
+ fGpu->resolveRenderTarget(rt);
}
}
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrRenderTarget.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698