aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-06 11:18:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-06 20:03:40 +0000
commitd7cda9a6f050c30e65b0744b3cfb45cecdc40834 (patch)
tree0c1cca24a20927e155ad306aa5ff43bca4713bcc /src/gpu/GrTextureContext.cpp
parentcf1b022c53afda781ff76fe206d8c93966b1c267 (diff)
Make GrCopySurfaceOp friendlier to GrSurfaceProxy
Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de Reviewed-on: https://skia-review.googlesource.com/11325 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrTextureContext.cpp')
-rw-r--r--src/gpu/GrTextureContext.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/gpu/GrTextureContext.cpp b/src/gpu/GrTextureContext.cpp
index f946290795..ca6f7a20bd 100644
--- a/src/gpu/GrTextureContext.cpp
+++ b/src/gpu/GrTextureContext.cpp
@@ -84,20 +84,9 @@ bool GrTextureContext::onCopy(GrSurfaceProxy* srcProxy,
fContext->contextPriv().flushSurfaceWrites(srcProxy);
#endif
- // TODO: defer instantiation until flush time
- sk_sp<GrSurface> src(sk_ref_sp(srcProxy->instantiate(fContext->resourceProvider())));
- if (!src) {
- return false;
- }
-
- // TODO: this needs to be fixed up since it ends the deferrable of the GrTexture
- sk_sp<GrTexture> tex(sk_ref_sp(fTextureProxy->instantiate(fContext->resourceProvider())));
- if (!tex) {
- return false;
- }
-
GrTextureOpList* opList = this->getOpList();
- bool result = opList->copySurface(tex.get(), src.get(), srcRect, dstPoint);
+ bool result = opList->copySurface(fContext->resourceProvider(),
+ fTextureProxy.get(), srcProxy, srcRect, dstPoint);
#ifndef ENABLE_MDB
GrOpFlushState flushState(fContext->getGpu(), nullptr);