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

Unified Diff: src/image/SkSurface_Gpu.cpp

Issue 1212613005: remove premature discard optimization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/image/SkSurface_Gpu.cpp
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 34532f7cb95d4c62435f3b6c149b715c99ff2696..71bed3a9b9083a70bbc1afc9603f61df66ee0ea5 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -33,13 +33,11 @@ GrBackendObject SkSurface_Gpu::onGetTextureHandle(TextureHandleAccess access) {
rt->prepareForExternalRead(); // todo: rename to prepareForExternalAccess()
break;
case kFlushWrite_TextureHandleAccess:
+ case kDiscardWrite_TextureHandleAccess:
+ // for now we don't special-case on Discard, but we may in the future.
this->notifyContentWillChange(kRetain_ContentChangeMode);
rt->flushWrites();
break;
- case kDiscardWrite_TextureHandleAccess:
- this->notifyContentWillChange(kDiscard_ContentChangeMode);
- rt->discard();
- break;
}
return rt->asTexture()->getTextureHandle();
}
« 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