diff options
author | 2014-11-03 12:08:42 -0800 | |
---|---|---|
committer | 2014-11-03 12:08:42 -0800 | |
commit | 89c62980c1eb50b2090f33312086c7e8c66739b4 (patch) | |
tree | 846c75103b62a28d6382e96a8a571306c449c8b1 /src/gpu/gl | |
parent | e672e9fca93dab58089b4f3b2c8f0f9efbe35034 (diff) |
Don't allow renderTarget==NULL to GrContext::clear() and friends.
Review URL: https://codereview.chromium.org/680413005
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 7 |
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) { |