Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: src/gpu/GrRenderTargetContext.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrRenderTargetContextPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrRenderTargetContextPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698