From e2f7d1899d890c2f08571e1bd6c7fa2c5ea1be0b Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Thu, 15 Dec 2016 09:23:05 -0500 Subject: Add a deferred copy surface (take 3) This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd Reviewed-on: https://skia-review.googlesource.com/6109 Reviewed-by: Brian Salomon Reviewed-by: Brian Osman Commit-Queue: Robert Phillips --- src/gpu/GrRenderTargetProxy.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gpu/GrRenderTargetProxy.cpp') diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp index 03637cf9af..882acf660c 100644 --- a/src/gpu/GrRenderTargetProxy.cpp +++ b/src/gpu/GrRenderTargetProxy.cpp @@ -8,6 +8,7 @@ #include "GrRenderTargetProxy.h" #include "GrCaps.h" +#include "GrGpuResourcePriv.h" #include "GrRenderTargetOpList.h" #include "GrRenderTargetPriv.h" #include "GrTextureProvider.h" @@ -63,3 +64,10 @@ size_t GrRenderTargetProxy::onGpuMemorySize() const { return GrSurface::ComputeSize(fDesc, fDesc.fSampleCnt+1, false, SkBackingFit::kApprox == fFit); } +bool GrRenderTargetProxy::refsWrappedObjects() const { + if (!fTarget) { + return false; + } + + return fTarget->resourcePriv().refsWrappedObjects(); +} -- cgit v1.2.3