aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetOpList.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2017-05-26 01:16:04 +0000
committerGravatar Mike Klein <mtklein@google.com>2017-05-26 01:38:31 +0000
commitfb65a9f400d11b7c6351c96425951b1bd22804dc (patch)
treecdf16be5a2c7a53a177d0de2d4f147ec2cb5f757 /src/gpu/GrRenderTargetOpList.h
parentc020f17127cd1c2c9503f3cbc58a331551502a80 (diff)
Revert "Update clearOp for split-OpList world (take 2)"
This reverts commit 3fdd0bf2d90b1b82c1ac3aa982bdca600de7f4a8. Reason for revert: Chrome roll dryrun? Original change's description: > Update clearOp for split-OpList world (take 2) > > It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it. > > Reland of: https://skia-review.googlesource.com/c/17323/ (Update clearOp for split-OpList world) > > Change-Id: I97f3fb81e6258d430e7f7cf1ea8bd51a392f9f47 > Reviewed-on: https://skia-review.googlesource.com/17830 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib70285bb484a1ed8babaa519c74bfdf619313806 Reviewed-on: https://skia-review.googlesource.com/18024 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.h')
-rw-r--r--src/gpu/GrRenderTargetOpList.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index e9850698f3..7f407824db 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -65,18 +65,19 @@ public:
void prepareOps(GrOpFlushState* flushState) override;
bool executeOps(GrOpFlushState* flushState) override;
- uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps) {
- this->recordOp(std::move(op), caps, nullptr, nullptr);
+ uint32_t addOp(std::unique_ptr<GrOp> op, GrRenderTargetContext* renderTargetContext) {
+ this->recordOp(std::move(op), renderTargetContext, nullptr, nullptr);
return this->uniqueID();
}
- uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps,
+ uint32_t addOp(std::unique_ptr<GrOp> op, GrRenderTargetContext* renderTargetContext,
GrAppliedClip&& clip, const DstTexture& dstTexture) {
- this->recordOp(std::move(op), caps, clip.doesClip() ? &clip : nullptr, &dstTexture);
+ this->recordOp(std::move(op), renderTargetContext, clip.doesClip() ? &clip : nullptr,
+ &dstTexture);
return this->uniqueID();
}
/** Clears the entire render target */
- void fullClear(const GrCaps& caps, GrColor color);
+ void fullClear(GrRenderTargetContext*, GrColor color);
/**
* Copies a pixel rectangle from one surface to another. This call may finalize
@@ -126,8 +127,8 @@ private:
// If the input op is combined with an earlier op, this returns the combined op. Otherwise, it
// returns the input op.
- GrOp* recordOp(std::unique_ptr<GrOp>, const GrCaps& caps,
- GrAppliedClip* = nullptr, const DstTexture* = nullptr);
+ GrOp* recordOp(std::unique_ptr<GrOp>, GrRenderTargetContext*, GrAppliedClip* = nullptr,
+ const DstTexture* = nullptr);
void forwardCombine(const GrCaps&);
@@ -135,20 +136,22 @@ private:
bool combineIfPossible(const RecordedOp& a, GrOp* b, const GrAppliedClip* bClip,
const DstTexture* bDstTexture, const GrCaps&);
- GrClearOp* fLastFullClearOp = nullptr;
+ GrClearOp* fLastFullClearOp = nullptr;
+ GrGpuResource::UniqueID fLastFullClearResourceID = GrGpuResource::UniqueID::InvalidID();
+ GrSurfaceProxy::UniqueID fLastFullClearProxyID = GrSurfaceProxy::UniqueID::InvalidID();
std::unique_ptr<gr_instanced::InstancedRendering> fInstancedRendering;
- int32_t fLastClipStackGenID;
- SkIRect fLastDevClipBounds;
+ int32_t fLastClipStackGenID;
+ SkIRect fLastDevClipBounds;
// For ops/opList we have mean: 5 stdDev: 28
SkSTArray<5, RecordedOp, true> fRecordedOps;
// MDB TODO: 4096 for the first allocation of the clip space will be huge overkill.
// Gather statistics to determine the correct size.
- SkArenaAlloc fClipAllocator{4096};
- SkDEBUGCODE(int fNumClips;)
+ SkArenaAlloc fClipAllocator{4096};
+ SkDEBUGCODE(int fNumClips;)
typedef GrOpList INHERITED;
};