aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetOpList.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-05-22 16:17:48 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-23 13:27:41 +0000
commitf104fec6d745540019556823f849535fe8872653 (patch)
tree49a7fb44c37f7e8b333f259714d14a2f5eefa3e3 /src/gpu/GrRenderTargetOpList.h
parent3087c1f382f1cd547598dc75f47ccbc8fe1e6e0f (diff)
Delete GrDrawOp::wasRecorded
Bug: skia:7988 Change-Id: I8d12beec835767f22302a1e167fcef46ee5e5ffc Reviewed-on: https://skia-review.googlesource.com/129555 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.h')
-rw-r--r--src/gpu/GrRenderTargetOpList.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 938f69aba6..af9b4a4670 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -60,6 +60,10 @@ public:
void onPrepare(GrOpFlushState* flushState) override;
bool onExecute(GrOpFlushState* flushState) override;
+ /**
+ * Returns this opList's id if the Op was recorded, or SK_InvalidUniqueID if it was combined
+ * into an existing Op or otherwise deleted.
+ */
uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps) {
auto addDependency = [ &caps, this ] (GrSurfaceProxy* p) {
this->addDependency(p, caps);
@@ -67,11 +71,13 @@ public:
op->visitProxies(addDependency);
- this->recordOp(std::move(op), caps);
-
- return this->uniqueID();
+ return this->recordOp(std::move(op), caps);
}
+ /**
+ * Returns this opList's id if the Op was recorded, or SK_InvalidUniqueID if it was combined
+ * into an existing Op or otherwise deleted.
+ */
uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps,
GrAppliedClip&& clip, const DstProxy& dstProxy) {
auto addDependency = [ &caps, this ] (GrSurfaceProxy* p) {
@@ -81,9 +87,7 @@ public:
op->visitProxies(addDependency);
clip.visitProxies(addDependency);
- this->recordOp(std::move(op), caps, clip.doesClip() ? &clip : nullptr, &dstProxy);
-
- return this->uniqueID();
+ return this->recordOp(std::move(op), caps, clip.doesClip() ? &clip : nullptr, &dstProxy);
}
void discard();
@@ -147,8 +151,10 @@ private:
void gatherProxyIntervals(GrResourceAllocator*) const override;
- void recordOp(std::unique_ptr<GrOp>, const GrCaps& caps,
- GrAppliedClip* = nullptr, const DstProxy* = nullptr);
+ // Returns this opList's id if the Op was recorded, or SK_InvalidUniqueID if it was combined
+ // into an existing Op or otherwise deleted.
+ uint32_t recordOp(std::unique_ptr<GrOp>, const GrCaps& caps,
+ GrAppliedClip* = nullptr, const DstProxy* = nullptr);
void forwardCombine(const GrCaps&);