aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxyPriv.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-09 16:36:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-10 15:02:11 +0000
commitb726d58efc91c4eefa5cea0881a823ee108db8fd (patch)
tree2d43fa8827137d7491f6030c8f99d138e7100d5d /src/gpu/GrSurfaceProxyPriv.h
parentf7005200725f1a96c7174be3e9a3175f9aa19151 (diff)
Partially defer SkImage_Gpu
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options. Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d Reviewed-on: https://skia-review.googlesource.com/9488 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxyPriv.h')
-rw-r--r--src/gpu/GrSurfaceProxyPriv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxyPriv.h b/src/gpu/GrSurfaceProxyPriv.h
index 4e43daea9d..390806f0c0 100644
--- a/src/gpu/GrSurfaceProxyPriv.h
+++ b/src/gpu/GrSurfaceProxyPriv.h
@@ -23,6 +23,18 @@ public:
// Don't abuse this!!!!!!!
bool isExact() const { return SkBackingFit::kExact == fProxy->fFit; }
+ // These next two are very specialized and wacky - don't use them!
+
+ // In the case where an unbudgeted, deferred SkSurface_Gpu has snapped a budgeted, deferred
+ // SkImage_Gpu, this serves to propagate the budgeting forward in time. For now, and
+ // presumably forever, this will not change any flushing decisions but may make Ganesh
+ // appear to have gone over budget. In the case of non-deferred proxies this will immediately
+ // propagate the budget decision to the resource, which in itself is dubious.
+ void makeBudgeted();
+ // In the case where a budgeted, deferred SkSurface_Gpu has snapped an unbudgeted, deferred
+ // SkImage_Gpu, this serves to propagate the lack of budgeting forward in time.
+ void makeUnbudgeted();
+
private:
explicit GrSurfaceProxyPriv(GrSurfaceProxy* proxy) : fProxy(proxy) {}
GrSurfaceProxyPriv(const GrSurfaceProxyPriv&) {} // unimpl