aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProxyPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-10-02 16:38:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-02 21:04:08 +0000
commit099fa0fb9801a138f12cf7cdf46b6581d81acce8 (patch)
tree2c3fcfa090c75737f528591095db6604d1f3ccce /src/gpu/GrTextureProxyPriv.h
parent74a8296d7c47efc6e23bd978efd1fdf4dbe29eb9 (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 '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) {}