aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index af50d873cc..a40473f566 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -133,20 +133,12 @@ GrRenderTargetOpList* GrRenderTargetContext::getOpList() {
return fOpList;
}
-// TODO: move this (and GrTextContext::copy) to GrSurfaceContext?
-bool GrRenderTargetContext::onCopy(GrSurfaceProxy* srcProxy,
- const SkIRect& srcRect,
- const SkIPoint& dstPoint) {
+bool GrRenderTargetContext::copySurface(GrSurface* src, const SkIRect& srcRect,
+ const SkIPoint& dstPoint) {
ASSERT_SINGLE_OWNER
RETURN_FALSE_IF_ABANDONED
SkDEBUGCODE(this->validate();)
- GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::copy");
-
- // TODO: defer instantiation until flush time
- sk_sp<GrSurface> src(sk_ref_sp(srcProxy->instantiate(fContext->textureProvider())));
- if (!src) {
- return false;
- }
+ GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::copySurface");
// TODO: this needs to be fixed up since it ends the deferrable of the GrRenderTarget
sk_sp<GrRenderTarget> rt(
@@ -155,7 +147,7 @@ bool GrRenderTargetContext::onCopy(GrSurfaceProxy* srcProxy,
return false;
}
- return this->getOpList()->copySurface(rt.get(), src.get(), srcRect, dstPoint);
+ return this->getOpList()->copySurface(rt.get(), src, srcRect, dstPoint);
}
void GrRenderTargetContext::drawText(const GrClip& clip, const GrPaint& grPaint,