aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpList.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-11 16:29:14 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-12 12:10:31 +0000
commit6cdc22cde8e6297d34fdaaa3ed5e69ae86c30a77 (patch)
treea2462bae16096f92b528d059ff1fb95881ed8d0d /src/gpu/GrOpList.h
parent5c7960be57010bf61db3d4ce879a3194687b5af9 (diff)
Split up opLists (take 3)
Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt. TBR=egdaniel@google.com Change-Id: I2a09729342bb035af3a16807c1895adbae432ade Reviewed-on: https://skia-review.googlesource.com/14186 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpList.h')
-rw-r--r--src/gpu/GrOpList.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/gpu/GrOpList.h b/src/gpu/GrOpList.h
index d6e1c30e4d..f0dc1c192c 100644
--- a/src/gpu/GrOpList.h
+++ b/src/gpu/GrOpList.h
@@ -8,6 +8,8 @@
#ifndef GrOpList_DEFINED
#define GrOpList_DEFINED
+#include "GrGpuResourceRef.h"
+
#include "SkRefCnt.h"
#include "SkTDArray.h"
@@ -30,24 +32,16 @@ public:
virtual bool executeOps(GrOpFlushState* flushState) = 0;
virtual void makeClosed(const GrCaps&) {
- // We only close GrOpLists when MDB is enabled. When MDB is disabled there is only
- // ever one GrOpLists and all calls will be funnelled into it.
-#ifdef ENABLE_MDB
this->setFlag(kClosed_Flag);
-#endif
}
- virtual void reset() = 0;
+ virtual void reset();
// TODO: in an MDB world, where the OpLists don't allocate GPU resources, it seems like
// these could go away
virtual void abandonGpuResources() = 0;
virtual void freeGpuResources() = 0;
- // TODO: this entry point is only needed in the non-MDB world. Remove when
- // we make the switch to MDB
- void clearTarget() { fTarget = nullptr; }
-
bool isClosed() const { return this->isSetFlag(kClosed_Flag); }
/*
@@ -85,8 +79,8 @@ public:
SkDEBUGCODE(virtual int numClips() const { return 0; })
protected:
- GrSurfaceProxy* fTarget;
- GrAuditTrail* fAuditTrail;
+ GrPendingIOResource<GrSurfaceProxy, kWrite_GrIOType> fTarget;
+ GrAuditTrail* fAuditTrail;
private:
friend class GrDrawingManager; // for resetFlag & TopoSortTraits
@@ -138,11 +132,11 @@ private:
void addDependency(GrOpList* dependedOn);
- uint32_t fUniqueID;
- uint32_t fFlags;
+ uint32_t fUniqueID;
+ uint32_t fFlags;
// 'this' GrOpList relies on the output of the GrOpLists in 'fDependencies'
- SkTDArray<GrOpList*> fDependencies;
+ SkTDArray<GrOpList*> fDependencies;
typedef SkRefCnt INHERITED;
};