diff options
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.h')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.h | 22 |
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&); |