aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-07 10:08:53 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-07 15:33:58 +0000
commitbf25d433f48bb336f1f7f8bcb0a4a357ac08bb16 (patch)
treea8edb6dd3582b6d7e647ad9602e6df560101fe10 /src/gpu/GrTextureContext.cpp
parent2d61e7170067129ca5dbf8fead23d9f2ae5947b5 (diff)
Make GrCopySurfaceOp friendlier to GrSurfaceProxy (take 2)
Reland of: https://skia-review.googlesource.com/c/11325/ (Make GrCopySurfaceOp friendlier to GrSurfaceProxy) Change-Id: Ibe7312cebe7793af5803353a1499fbe7874c558f Reviewed-on: https://skia-review.googlesource.com/11780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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);