Chromium Code Reviews| 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 d72d5d241ee6ad18d6d046139476dea4fe4301fa..d9f0ff89f6bdef762bb1a09b211adf957d8d6797 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -18,9 +18,6 @@ |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/debug/trace_event.h" |
| -#if defined(OS_MACOSX) |
| -#include "base/mac/scoped_cftyperef.h" |
| -#endif |
| #include "base/memory/scoped_ptr.h" |
| #include "base/string_number_conversions.h" |
| #include "base/stringprintf.h" |
| @@ -61,7 +58,9 @@ |
| #include "ui/gl/gl_image.h" |
| #include "ui/gl/gl_implementation.h" |
| #include "ui/gl/gl_surface.h" |
| + |
| #if defined(OS_MACOSX) |
| +#include "base/mac/scoped_cftyperef.h" |
|
Ken Russell (switch to Gerrit)
2013/04/09 00:48:58
This change is not necessary for this CL; please u
ccameron
2013/04/09 17:28:55
Done.
|
| #include "ui/surface/io_surface_support_mac.h" |
| #endif |
| @@ -2573,6 +2572,13 @@ bool GLES2DecoderImpl::Initialize( |
| glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); |
| } |
| + // Only compositor contexts are known to use only the subset of GL |
| + // that can be safely migrated between the iGPU and the dGPU. Mark |
| + // those contexts as safe to forcibly transition between the GPUs. |
| + // http://crbug.com/180876, http://crbug.com/227228 |
| + if (!offscreen) |
| + context_->SetSafeToForceGpuSwitch(); |
|
Ken Russell (switch to Gerrit)
2013/04/09 00:48:58
Does this work when virtual contexts are being use
ccameron
2013/04/09 17:28:55
Good point -- I added support for virtual contexts
Ken Russell (switch to Gerrit)
2013/04/09 17:42:03
A TODO is needed. It is clear that if we virtualiz
|
| + |
| // Create a delegate to perform async pixel transfers. |
| async_pixel_transfer_delegate_ = |
| gfx::AsyncPixelTransferDelegate::Create(context.get()); |