Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index f6c5916e198bec66ef77b65ba17b3988f8d5858c..f905150914dc9b513738a3901fcc9cca35ecff90 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -16776,6 +16776,17 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL( |
} |
void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { |
+ Framebuffer* bound_framebuffer = |
+ GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER); |
+ // TODO(dshwang): support it even after glBindFrameBuffer(GL_FRAMEBUFFER, 0). |
+ // skia will need to render to the window. crbug.com/656618 |
+ if (!bound_framebuffer) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, |
+ "glApplyScreenSpaceAntialiasingCHROMIUM", |
+ "no bound framebuffer object"); |
+ return; |
+ } |
+ |
// Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the |
// color attachments of currently bound draw framebuffer. |
// Reference GL_INTEL_framebuffer_CMAA for details. |
@@ -16798,8 +16809,7 @@ void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { |
return; |
} |
apply_framebuffer_attachment_cmaa_intel_ |
- ->ApplyFramebufferAttachmentCMAAINTEL( |
- this, GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER)); |
+ ->ApplyFramebufferAttachmentCMAAINTEL(this, bound_framebuffer); |
} |
} |