Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 592933003: Fix for surfaceless implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move new enum to different cl Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698