diff options
author | reed <reed@google.com> | 2015-06-29 09:00:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-29 09:00:20 -0700 |
commit | 884200ef76bbd25ab31e061a24cc8c8268dacca0 (patch) | |
tree | 36414a7ab6a837955426527ec25994fcab2cc79b /src/image | |
parent | 3e47d49b46b3ab62071218ef3dd44642c9713e04 (diff) |
remove premature discard optimization
BUG=skia:
Review URL: https://codereview.chromium.org/1212613005
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 6 |
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(); } |