Index: src/gpu/gl/GrGpuGL.cpp |
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp |
index 6c35e9f2d3f888b626e8a1f8eb3375c6408dba80..621bef8f87517e3c18f5066d72d01f46c245783e 100644 |
--- a/src/gpu/gl/GrGpuGL.cpp |
+++ b/src/gpu/gl/GrGpuGL.cpp |
@@ -1401,15 +1401,10 @@ void GrGpuGL::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color |
} |
void GrGpuGL::discard(GrRenderTarget* renderTarget) { |
+ SkASSERT(renderTarget); |
if (!this->caps()->discardRenderTargetSupport()) { |
return; |
} |
- if (NULL == renderTarget) { |
- renderTarget = this->drawState()->getRenderTarget(); |
- if (NULL == renderTarget) { |
- return; |
- } |
- } |
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(renderTarget); |
if (renderTarget->getUniqueID() != fHWBoundRenderTargetUniqueID) { |