diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-13 09:01:40 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-13 17:57:13 +0000 |
commit | 4431de6af930a8638c194b072558ea3a4b79d908 (patch) | |
tree | 49a3f17bb0abc6fcb43d8c7ce58061e0bb9822a7 /src/gpu/GrRenderTargetProxy.cpp | |
parent | 36aa176d0d32f9cea3d1998fac3c295d31e1d596 (diff) |
Add a deferred copy surface
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.
Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
Reviewed-on: https://skia-review.googlesource.com/5773
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetProxy.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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(); +} |