aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProxyPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-09-29 09:22:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-29 13:48:54 +0000
commitfdd2cb52b781dd68f515a1eb9fe6d054a0ebc226 (patch)
treebe3eb525ce37c3df6c4150ed1e210632b3ec7b13 /src/gpu/GrTextureProxyPriv.h
parent5fdee443e750b16dabfe3b1aa61b77207660457a (diff)
Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
This reverts commit 9f8d4d36b514ffe3cc3a4a48900e3dc1fecb2a96. Bug: skia: Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0 Reviewed-on: https://skia-review.googlesource.com/52920 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
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) {}