| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index b6add43b2398bd110164f66ccf3f2d956a8b068b..5b24d8a3829d9cfc8993817cab5a8b82bcf6b665 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -2176,55 +2176,6 @@ void GrGLGpu::clear(const SkIRect& rect, GrColor color, GrRenderTarget* target)
|
| GL_CALL(Clear(GR_GL_COLOR_BUFFER_BIT));
|
| }
|
|
|
| -void GrGLGpu::discard(GrRenderTarget* renderTarget) {
|
| - SkASSERT(renderTarget);
|
| - if (!this->caps()->discardRenderTargetSupport()) {
|
| - return;
|
| - }
|
| -
|
| - GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(renderTarget);
|
| - if (renderTarget->getUniqueID() != fHWBoundRenderTargetUniqueID) {
|
| - fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
|
| - fStats.incRenderTargetBinds();
|
| - GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, glRT->renderFBOID()));
|
| - }
|
| - switch (this->glCaps().invalidateFBType()) {
|
| - case GrGLCaps::kNone_InvalidateFBType:
|
| - SkFAIL("Should never get here.");
|
| - break;
|
| - case GrGLCaps::kInvalidate_InvalidateFBType:
|
| - if (0 == glRT->renderFBOID()) {
|
| - // When rendering to the default framebuffer the legal values for attachments
|
| - // are GL_COLOR, GL_DEPTH, GL_STENCIL, ... rather than the various FBO attachment
|
| - // types.
|
| - static const GrGLenum attachments[] = { GR_GL_COLOR };
|
| - GL_CALL(InvalidateFramebuffer(GR_GL_FRAMEBUFFER, SK_ARRAY_COUNT(attachments),
|
| - attachments));
|
| - } else {
|
| - static const GrGLenum attachments[] = { GR_GL_COLOR_ATTACHMENT0 };
|
| - GL_CALL(InvalidateFramebuffer(GR_GL_FRAMEBUFFER, SK_ARRAY_COUNT(attachments),
|
| - attachments));
|
| - }
|
| - break;
|
| - case GrGLCaps::kDiscard_InvalidateFBType: {
|
| - if (0 == glRT->renderFBOID()) {
|
| - // When rendering to the default framebuffer the legal values for attachments
|
| - // are GL_COLOR, GL_DEPTH, GL_STENCIL, ... rather than the various FBO attachment
|
| - // types. See glDiscardFramebuffer() spec.
|
| - static const GrGLenum attachments[] = { GR_GL_COLOR };
|
| - GL_CALL(DiscardFramebuffer(GR_GL_FRAMEBUFFER, SK_ARRAY_COUNT(attachments),
|
| - attachments));
|
| - } else {
|
| - static const GrGLenum attachments[] = { GR_GL_COLOR_ATTACHMENT0 };
|
| - GL_CALL(DiscardFramebuffer(GR_GL_FRAMEBUFFER, SK_ARRAY_COUNT(attachments),
|
| - attachments));
|
| - }
|
| - break;
|
| - }
|
| - }
|
| - renderTarget->flagAsResolved();
|
| -}
|
| -
|
| void GrGLGpu::clearStencil(GrRenderTarget* target) {
|
| if (nullptr == target) {
|
| return;
|
|
|