aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProxyPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTextureProxyPriv.h')
-rw-r--r--src/gpu/GrTextureProxyPriv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrTextureProxyPriv.h b/src/gpu/GrTextureProxyPriv.h
index c3ddb9460c..e961493179 100644
--- a/src/gpu/GrTextureProxyPriv.h
+++ b/src/gpu/GrTextureProxyPriv.h
@@ -10,11 +10,23 @@
#include "GrTextureProxy.h"
+class GrDeferredProxyUploader;
+class GrOpFlushState;
+
/**
* This class hides the more specialized capabilities of GrTextureProxy.
*/
class GrTextureProxyPriv {
public:
+ // Attach a deferred uploader to the proxy. Holds data being prepared by a worker thread.
+ void setDeferredUploader(std::unique_ptr<GrDeferredProxyUploader>);
+ bool isDeferred() const { return SkToBool(fTextureProxy->fDeferredUploader.get()); }
+ // For a deferred proxy (one that has a deferred uploader attached), this schedules an ASAP
+ // upload of that data to the instantiated texture.
+ void scheduleUpload(GrOpFlushState*);
+ // Clears any deferred uploader object on the proxy. Used to free the CPU data after the
+ // contents have been uploaded.
+ void resetDeferredUploader();
private:
explicit GrTextureProxyPriv(GrTextureProxy* textureProxy) : fTextureProxy(textureProxy) {}