aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpList.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-10-02 13:40:26 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-02 14:00:07 +0000
commit9b1f4bd1766c8fd28405168746492b93d201463e (patch)
tree36b4f9eeba4f2f843cbae65109cf0dfd55e5cfe7 /src/gpu/GrOpList.h
parent5a2e50edc51006ce91366e177a9d21a16775d7fd (diff)
Revert "Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""""
This reverts commit fdd2cb52b781dd68f515a1eb9fe6d054a0ebc226. Reason for revert: ANGLE gold failures Original change's description: > 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> TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Ie461de167fbd37323cabd4adf064f99204ba4878 Reviewed-on: https://skia-review.googlesource.com/53801 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
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;
};