diff options
author | 2017-09-28 12:39:18 -0400 | |
---|---|---|
committer | 2017-09-28 17:19:58 +0000 | |
commit | e8b8397664666bfcba8f088ea073ede915da8a41 (patch) | |
tree | 62a0bffe27d5ac0735b423a8fa6feb447c55fb6b /src/gpu/GrTextureProxyPriv.h | |
parent | 8477144e75329b146feb2a14cc04696aa53e0a90 (diff) |
Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
This reverts commit 837c6c7c0cc76bdb9d61a05244ca5f31e7573c37.
Bug: skia:
Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
Reviewed-on: https://skia-review.googlesource.com/52744
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrTextureProxyPriv.h')
-rw-r--r-- | src/gpu/GrTextureProxyPriv.h | 12 |
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) {} |