aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-06-29 09:00:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-29 09:00:20 -0700
commit884200ef76bbd25ab31e061a24cc8c8268dacca0 (patch)
tree36414a7ab6a837955426527ec25994fcab2cc79b /src/image
parent3e47d49b46b3ab62071218ef3dd44642c9713e04 (diff)
remove premature discard optimization
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkSurface_Gpu.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 34532f7cb9..71bed3a9b9 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();
}