aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetOpList.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-18 14:38:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-18 19:43:55 +0000
commit7f1ce29c9bb9be8b2d8dbf9a99f14f74d5dc6d80 (patch)
treed27215fedb9dd88f0742a3171448870979d959ad /src/gpu/GrRenderTargetOpList.h
parent72f4891bf8e11fed52cb4e524a537f8c8625f093 (diff)
Update clearOp for split-OpList world
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. Change-Id: Ieed56fa2a41a3fb20234e26552ae2d301147e4f2 Reviewed-on: https://skia-review.googlesource.com/17323 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.h')
-rw-r--r--src/gpu/GrRenderTargetOpList.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 7f407824db..e9850698f3 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -65,19 +65,18 @@ public:
void prepareOps(GrOpFlushState* flushState) override;
bool executeOps(GrOpFlushState* flushState) override;
- uint32_t addOp(std::unique_ptr<GrOp> op, GrRenderTargetContext* renderTargetContext) {
- this->recordOp(std::move(op), renderTargetContext, nullptr, nullptr);
+ uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps) {
+ this->recordOp(std::move(op), caps, nullptr, nullptr);
return this->uniqueID();
}
- uint32_t addOp(std::unique_ptr<GrOp> op, GrRenderTargetContext* renderTargetContext,
+ uint32_t addOp(std::unique_ptr<GrOp> op, const GrCaps& caps,
GrAppliedClip&& clip, const DstTexture& dstTexture) {
- this->recordOp(std::move(op), renderTargetContext, clip.doesClip() ? &clip : nullptr,
- &dstTexture);
+ this->recordOp(std::move(op), caps, clip.doesClip() ? &clip : nullptr, &dstTexture);
return this->uniqueID();
}
/** Clears the entire render target */
- void fullClear(GrRenderTargetContext*, GrColor color);
+ void fullClear(const GrCaps& caps, GrColor color);
/**
* Copies a pixel rectangle from one surface to another. This call may finalize
@@ -127,8 +126,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>, GrRenderTargetContext*, GrAppliedClip* = nullptr,
- const DstTexture* = nullptr);
+ GrOp* recordOp(std::unique_ptr<GrOp>, const GrCaps& caps,
+ GrAppliedClip* = nullptr, const DstTexture* = nullptr);
void forwardCombine(const GrCaps&);
@@ -136,22 +135,20 @@ private:
bool combineIfPossible(const RecordedOp& a, GrOp* b, const GrAppliedClip* bClip,
const DstTexture* bDstTexture, const GrCaps&);
- GrClearOp* fLastFullClearOp = nullptr;
- GrGpuResource::UniqueID fLastFullClearResourceID = GrGpuResource::UniqueID::InvalidID();
- GrSurfaceProxy::UniqueID fLastFullClearProxyID = GrSurfaceProxy::UniqueID::InvalidID();
+ GrClearOp* fLastFullClearOp = nullptr;
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;
};