aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-03 12:08:42 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-03 12:08:42 -0800
commit89c62980c1eb50b2090f33312086c7e8c66739b4 (patch)
tree846c75103b62a28d6382e96a8a571306c449c8b1 /src/gpu/gl
parente672e9fca93dab58089b4f3b2c8f0f9efbe35034 (diff)
Don't allow renderTarget==NULL to GrContext::clear() and friends.
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 6c35e9f2d3..621bef8f87 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) {