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 d5f1e354492b85bf9d8e25d93999fb3220ffc8f6..85c2ebe7c72d319c8d9ba5b663e45e99711950be 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -2688,7 +2688,10 @@ bool GLES2DecoderImpl::Initialize( |
// crbug.com/259023 for details. |
call_gl_clear = surface_->GetHandle(); |
#endif |
- if (call_gl_clear) { |
+ // It is possible for us to not have a framebuffer at this point. If we don't |
+ // then clearing will only generate an error. |
+ if (call_gl_clear && |
+ glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE) { |
alexst (slow to review)
2014/09/24 13:00:51
When does this happen? I'm not really familiar wit
achaulk
2014/09/24 14:16:18
This is done during initialization, before any reg
|
// Clear the backbuffer. |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); |
} |