aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpList.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrOpList.h')
-rw-r--r--src/gpu/GrOpList.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gpu/GrOpList.h b/src/gpu/GrOpList.h
index 1f98ddc41b..7a97961b19 100644
--- a/src/gpu/GrOpList.h
+++ b/src/gpu/GrOpList.h
@@ -23,6 +23,7 @@
class GrAuditTrail;
class GrCaps;
class GrOpFlushState;
+class GrPrepareCallback;
class GrRenderTargetOpList;
class GrResourceAllocator;
class GrResourceProvider;
@@ -38,10 +39,8 @@ public:
GrOpList(GrResourceProvider*, GrSurfaceProxy*, GrAuditTrail*);
~GrOpList() override;
- // These four methods are invoked at flush time
+ // These three methods are invoked at flush time
bool instantiate(GrResourceProvider* resourceProvider);
- // Instantiates any "threaded" texture proxies that are being prepared elsewhere
- void instantiateDeferredProxies(GrResourceProvider* resourceProvider);
void prepare(GrOpFlushState* flushState);
bool execute(GrOpFlushState* flushState) { return this->onExecute(flushState); }
@@ -60,6 +59,8 @@ public:
virtual void reset();
+ void addPrepareCallback(std::unique_ptr<GrPrepareCallback> callback);
+
// TODO: in an MDB world, where the OpLists don't allocate GPU resources, it seems like
// these could go away
virtual void abandonGpuResources() = 0;
@@ -118,9 +119,6 @@ protected:
GrColor fLoadClearColor = 0x0;
GrLoadOp fStencilLoadOp = GrLoadOp::kLoad;
- // List of texture proxies whose contents are being prepared on a worker thread
- SkTArray<GrTextureProxy*, true> fDeferredProxies;
-
private:
friend class GrDrawingManager; // for resetFlag, TopoSortTraits & gatherProxyIntervals
@@ -183,6 +181,9 @@ private:
// 'this' GrOpList relies on the output of the GrOpLists in 'fDependencies'
SkSTArray<1, GrOpList*, true> fDependencies;
+ // These are used rarely, most clients never produce any
+ SkTArray<std::unique_ptr<GrPrepareCallback>> fPrepareCallbacks;
+
typedef SkRefCnt INHERITED;
};