aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxyPriv.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-08 15:05:44 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-08 20:33:40 +0000
commit457469c7a0c879b9d8ff8ed9fabe3f3dcab06097 (patch)
tree92ef5dcb793bbe9406730b1576c51bcc6042b86c /src/gpu/GrSurfaceProxyPriv.h
parent5635631c8887db678e6123c191ae68456b60d2a7 (diff)
Make non-ddl lazy proxys clean-up and delete their callbacks immediately after instanstation.
This makes sure resources are released and free'd as soon as possible if we no longer need them. Bug: skia: Change-Id: Ic216987649c54183f8cbbff90a633860a97754b3 Reviewed-on: https://skia-review.googlesource.com/105721 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxyPriv.h')
-rw-r--r--src/gpu/GrSurfaceProxyPriv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxyPriv.h b/src/gpu/GrSurfaceProxyPriv.h
index 2de820d625..e5d1f906a2 100644
--- a/src/gpu/GrSurfaceProxyPriv.h
+++ b/src/gpu/GrSurfaceProxyPriv.h
@@ -70,6 +70,14 @@ public:
bool doLazyInstantiation(GrResourceProvider*);
+ GrSurfaceProxy::LazyInstantiationType lazyInstantiationType() const {
+ return fProxy->fLazyInstantiationType;
+ }
+
+ void testingOnly_setLazyInstantiationType(GrSurfaceProxy::LazyInstantiationType lazyType) {
+ fProxy->fLazyInstantiationType = lazyType;
+ }
+
static bool AttachStencilIfNeeded(GrResourceProvider*, GrSurface*, bool needsStencil);
private: