aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpList.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-09-29 09:22:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-29 13:48:54 +0000
commitfdd2cb52b781dd68f515a1eb9fe6d054a0ebc226 (patch)
treebe3eb525ce37c3df6c4150ed1e210632b3ec7b13 /src/gpu/GrOpList.h
parent5fdee443e750b16dabfe3b1aa61b77207660457a (diff)
Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
This reverts commit 9f8d4d36b514ffe3cc3a4a48900e3dc1fecb2a96. Bug: skia: Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0 Reviewed-on: https://skia-review.googlesource.com/52920 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpList.h')
-rw-r--r--src/gpu/GrOpList.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gpu/GrOpList.h b/src/gpu/GrOpList.h
index 7a97961b19..1f98ddc41b 100644
--- a/src/gpu/GrOpList.h
+++ b/src/gpu/GrOpList.h
@@ -23,7 +23,6 @@
class GrAuditTrail;
class GrCaps;
class GrOpFlushState;
-class GrPrepareCallback;
class GrRenderTargetOpList;
class GrResourceAllocator;
class GrResourceProvider;
@@ -39,8 +38,10 @@ public:
GrOpList(GrResourceProvider*, GrSurfaceProxy*, GrAuditTrail*);
~GrOpList() override;
- // These three methods are invoked at flush time
+ // These four 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); }
@@ -59,8 +60,6 @@ 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;
@@ -119,6 +118,9 @@ 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
@@ -181,9 +183,6 @@ 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;
};