Index: src/gpu/GrRenderTargetContext.cpp |
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp |
index 4c86cbc464d30e9752d25d2a26ecd198d99e4cbd..219929e8a7c4a66ac6589ea818534006274aad56 100644 |
--- a/src/gpu/GrRenderTargetContext.cpp |
+++ b/src/gpu/GrRenderTargetContext.cpp |
@@ -205,11 +205,7 @@ void GrRenderTargetContext::discard() { |
AutoCheckFlush acf(fDrawingManager); |
- // TODO: this needs to be fixed up since it ends the deferrable of the GrRenderTarget |
- sk_sp<GrRenderTarget> rt( |
- sk_ref_sp(fRenderTargetProxy->instantiate(fContext->textureProvider()))); |
- |
- this->getOpList()->discard(rt.get()); |
+ this->getOpList()->discard(fRenderTargetProxy.get()); |
} |
void GrRenderTargetContext::clear(const SkIRect* rect, |
@@ -264,9 +260,9 @@ void GrRenderTargetContext::internalClear(const GrFixedClip& clip, |
this->drawRect(clip, paint, SkMatrix::I(), clearRect); |
} else if (isFull) { |
- this->getOpList()->fullClear(this->accessRenderTarget(), color); |
+ this->getOpList()->fullClear(fRenderTargetProxy.get(), color); |
} else { |
- sk_sp<GrBatch> batch(GrClearBatch::Make(clip, color, this->accessRenderTarget())); |
+ sk_sp<GrBatch> batch(GrClearBatch::Make(clip, color, fRenderTargetProxy.get())); |
if (!batch) { |
return; |
} |
@@ -284,7 +280,6 @@ void GrRenderTargetContext::drawPaint(const GrClip& clip, |
// set rect to be big enough to fill the space, but not super-huge, so we |
// don't overflow fixed-point implementations |
- |
SkRect r = fRenderTargetProxy->getBoundsRect(); |
SkTCopyOnFirstWrite<GrPaint> paint(origPaint); |
@@ -588,7 +583,7 @@ void GrRenderTargetContextPriv::clearStencilClip(const GrFixedClip& clip, bool i |
AutoCheckFlush acf(fRenderTargetContext->fDrawingManager); |
fRenderTargetContext->getOpList()->clearStencilClip(clip, insideStencilMask, |
- fRenderTargetContext->accessRenderTarget()); |
+ fRenderTargetContext->fRenderTargetProxy.get()); |
} |
void GrRenderTargetContextPriv::stencilPath(const GrClip& clip, |