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

Unified Diff: src/gpu/GrGpu.cpp

Issue 533883004: Remove GrDrawTarget::AutoRenderTargetRestore. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pass rt to clearStencilClip Created 6 years, 3 months 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
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 6ada03b62dab0ddc799219948e6d0a81a91b8a6a..2ceef609e8877ed5c837268b982e673919cd0362 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -125,8 +125,7 @@ bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) {
// We used to clear down in the GL subclass using a special purpose
// FBO. But iOS doesn't allow a stencil-only FBO. It reports unsupported
// FBO status.
- GrDrawState::AutoRenderTargetRestore artr(this->drawState(), rt);
- this->clearStencil();
+ this->clearStencil(rt);
return true;
} else {
return false;
@@ -180,16 +179,15 @@ void GrGpu::clear(const SkIRect* rect,
GrColor color,
bool canIgnoreRect,
GrRenderTarget* renderTarget) {
- GrDrawState::AutoRenderTargetRestore art;
- if (NULL != renderTarget) {
- art.set(this->drawState(), renderTarget);
+ if (NULL == renderTarget) {
+ renderTarget = this->getDrawState().getRenderTarget();
}
- if (NULL == this->getDrawState().getRenderTarget()) {
+ if (NULL == renderTarget) {
SkASSERT(0);
return;
}
this->handleDirtyContext();
- this->onClear(rect, color, canIgnoreRect);
+ this->onClear(renderTarget, rect, color, canIgnoreRect);
}
bool GrGpu::readPixels(GrRenderTarget* target,
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrRODrawState.h » ('j') | src/gpu/gl/GrGpuGL.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698