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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 680413005: Don't allow renderTarget==NULL to GrContext::clear() and friends. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 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/GrGpu.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index b671742309f862783f77b07a53b18795305f36cb..04ce17b8b6d2f55ed3291144493dbc4c76fdb37d 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -450,13 +450,10 @@ void GrInOrderDrawBuffer::clearStencilClip(const SkIRect& rect,
}
void GrInOrderDrawBuffer::discard(GrRenderTarget* renderTarget) {
+ SkASSERT(renderTarget);
if (!this->caps()->discardRenderTargetSupport()) {
return;
}
- if (NULL == renderTarget) {
- renderTarget = this->drawState()->getRenderTarget();
- SkASSERT(renderTarget);
- }
Clear* clr = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, Clear, (renderTarget));
clr->fColor = GrColor_ILLEGAL;
this->recordTraceMarkersIfNecessary();
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698