Index: src/gpu/batches/GrClearBatch.h |
diff --git a/src/gpu/batches/GrClearBatch.h b/src/gpu/batches/GrClearBatch.h |
index f11d485536ff37f2282ef405454cdb3689f10317..2c1c0253c6bd644b767a6f8250e28aa5178ff05e 100644 |
--- a/src/gpu/batches/GrClearBatch.h |
+++ b/src/gpu/batches/GrClearBatch.h |
@@ -19,9 +19,9 @@ class GrClearBatch final : public GrBatch { |
public: |
DEFINE_BATCH_CLASS_ID |
- static sk_sp<GrClearBatch> Make(const GrFixedClip& clip, GrColor color, GrRenderTarget* rt) { |
- sk_sp<GrClearBatch> batch(new GrClearBatch(clip, color, rt)); |
- if (!batch->renderTarget()) { |
+ static sk_sp<GrClearBatch> Make(const GrFixedClip& clip, GrColor color, GrRenderTargetProxy* rtp) { |
+ sk_sp<GrClearBatch> batch(new GrClearBatch(clip, color, rtp)); |
+ if (!batch->rtp()) { |
return nullptr; // The clip did not contain any pixels within the render target. |
} |
return batch; |
@@ -29,8 +29,8 @@ public: |
const char* name() const override { return "Clear"; } |
- uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()->uniqueID(); } |
- GrRenderTarget* renderTarget() const override { return fRenderTarget.get(); } |
+ uint32_t renderTargetUniqueID() const override { return fRenderTargetProxy.get()->uniqueID(); } |
+ GrRenderTargetProxy* rtp() const override { return fRenderTargetProxy.get(); } |
SkString dumpInfo() const override { |
SkString string("Scissor ["); |
@@ -38,7 +38,7 @@ public: |
const SkIRect& r = fClip.scissorRect(); |
string.appendf("L: %d, T: %d, R: %d, B: %d", r.fLeft, r.fTop, r.fRight, r.fBottom); |
} |
- string.appendf("], Color: 0x%08x, RT: %d", fColor, fRenderTarget.get()->uniqueID()); |
+ string.appendf("], Color: 0x%08x, RT: %d", fColor, fRenderTargetProxy.get()->uniqueID()); |
string.append(INHERITED::dumpInfo()); |
return string; |
} |
@@ -46,11 +46,11 @@ public: |
void setColor(GrColor color) { fColor = color; } |
private: |
- GrClearBatch(const GrFixedClip& clip, GrColor color, GrRenderTarget* rt) |
+ GrClearBatch(const GrFixedClip& clip, GrColor color, GrRenderTargetProxy* rtp) |
: INHERITED(ClassID()) |
, fClip(clip) |
, fColor(color) { |
- SkIRect rtRect = SkIRect::MakeWH(rt->width(), rt->height()); |
+ SkIRect rtRect = SkIRect::MakeWH(rtp->width(), rtp->height()); |
if (fClip.scissorEnabled()) { |
// Don't let scissors extend outside the RT. This may improve batching. |
if (!fClip.intersect(rtRect)) { |
@@ -62,7 +62,7 @@ private: |
} |
this->setBounds(SkRect::Make(fClip.scissorEnabled() ? fClip.scissorRect() : rtRect), |
HasAABloat::kNo, IsZeroArea::kNo); |
- fRenderTarget.reset(rt); |
+ fRenderTargetProxy.reset(rtp); |
} |
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { |
@@ -70,7 +70,7 @@ private: |
// contains the old clear, or when the new clear is a subset of the old clear and is the |
// same color. |
GrClearBatch* cb = t->cast<GrClearBatch>(); |
- SkASSERT(cb->fRenderTarget == fRenderTarget); |
+ SkASSERT(cb->fRenderTargetProxy == fRenderTargetProxy); |
if (!fClip.windowRectsState().cheapEqualTo(cb->fClip.windowRectsState())) { |
return false; |
} |
@@ -100,7 +100,7 @@ private: |
GrFixedClip fClip; |
GrColor fColor; |
- GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
+ GrPendingIOResource<GrRenderTargetProxy, kWrite_GrIOType> fRenderTargetProxy; |
typedef GrBatch INHERITED; |
}; |