aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-09-28 12:39:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-28 17:19:58 +0000
commite8b8397664666bfcba8f088ea073ede915da8a41 (patch)
tree62a0bffe27d5ac0735b423a8fa6feb447c55fb6b /include
parent8477144e75329b146feb2a14cc04696aa53e0a90 (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 'include')
-rw-r--r--include/private/GrTextureProxy.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index 8e72eaddb9..e841baeb1f 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -12,6 +12,7 @@
#include "GrSurfaceProxy.h"
class GrCaps;
+class GrDeferredProxyUploader;
class GrResourceCache;
class GrResourceProvider;
class GrTextureOpList;
@@ -69,6 +70,7 @@ public:
protected:
friend class GrSurfaceProxy; // for ctors
+ friend class GrTextureProxyPriv;
// Deferred version
GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit, SkBudgeted,
@@ -89,6 +91,11 @@ private:
GrUniqueKey fUniqueKey;
GrResourceCache* fCache; // only set when fUniqueKey is valid
+ // Only used for proxies whose contents are being prepared on a worker thread. This object
+ // stores the texture data, allowing the proxy to remain uninstantiated until flush. At that
+ // point, the proxy is instantiated, and this data is used to perform an ASAP upload.
+ std::unique_ptr<GrDeferredProxyUploader> fDeferredUploader;
+
size_t onUninstantiatedGpuMemorySize() const override;
// Methods made available via GrTextureProxy::CacheAccess