diff options
author | Brian Osman <brianosman@google.com> | 2017-10-02 16:38:32 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-02 21:04:08 +0000 |
commit | 099fa0fb9801a138f12cf7cdf46b6581d81acce8 (patch) | |
tree | 2c3fcfa090c75737f528591095db6604d1f3ccce /include | |
parent | 74a8296d7c47efc6e23bd978efd1fdf4dbe29eb9 (diff) |
Revert^6 "Make threaded proxy generation MDB-friendly, and defer instantiation"
ANGLE bots were getting lots of corrupted GMs - we set fPreferVRAMUseOverFlushes
to false. In that case, multiple deferred proxies were instantiating to the same
scratch resource. Any proxy that we're going to fill with an ASAP upload needs
to have no pending IO - we hoist all those loads to the front of the flush, so
normal IO tracking doesn't really help.
Bug: skia:
Change-Id: Id36fd8700e522db412a3c992b93c778e2ebb1188
Reviewed-on: https://skia-review.googlesource.com/53940
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrTextureProxy.h | 7 |
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 |