Index: services/gles2/command_buffer_driver.cc |
diff --git a/services/gles2/command_buffer_driver.cc b/services/gles2/command_buffer_driver.cc |
index 6ba980f01fc3b7ca8047bf088ec6e4ce1b891fe1..8d0e0a67df599bfdcc94758d1e7fda061a22bf95 100644 |
--- a/services/gles2/command_buffer_driver.cc |
+++ b/services/gles2/command_buffer_driver.cc |
@@ -99,10 +99,15 @@ void CommandBufferDriver::Initialize( |
bool CommandBufferDriver::DoInitialize( |
mojo::ScopedSharedBufferHandle shared_state) { |
- if (widget_ == gfx::kNullAcceleratedWidget) |
+ if (widget_ == gfx::kNullAcceleratedWidget) { |
+ // This is a dummy surface, so attempt to skip actual surface |
+ // allocation by passing size 0. |
surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
+ gfx::Size(0, 0), requested_configuration_); |
+ if (!surface_) |
jamesr
2015/09/11 21:34:59
add { }s since the body of this conditional is mul
cdotstout
2015/09/11 21:52:54
Done.
|
+ surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
gfx::Size(1, 1), requested_configuration_); |
jamesr
2015/09/11 21:34:59
i think indentation is now wrong on this line
cdotstout
2015/09/11 21:52:54
Done.
|
- else { |
+ } else { |
surface_ = |
gfx::GLSurface::CreateViewGLSurface(widget_, requested_configuration_); |
if (auto vsync_provider = surface_->GetVSyncProvider()) { |