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

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

Issue 13746002: Force GPU switch with CGLSetVirtualScreen only for compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 d72d5d241ee6ad18d6d046139476dea4fe4301fa..8a0641f6f836cd29c4d42ad007ea8640006aa947 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -58,6 +58,9 @@
#include "gpu/command_buffer/service/vertex_array_manager.h"
#include "ui/gl/async_pixel_transfer_delegate.h"
#include "ui/gl/gl_bindings.h"
+#if defined(OS_MACOSX)
jbauman 2013/04/06 01:52:02 Put this at the end of the list (with a blank line
ccameron 2013/04/08 17:25:14 Done. There were lots of instances of this in the
+#include "ui/gl/gl_context_cgl.h"
+#endif
#include "ui/gl/gl_image.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
@@ -2573,6 +2576,11 @@ bool GLES2DecoderImpl::Initialize(
glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
}
+#if defined(OS_MACOSX)
+ if (feature_info_->workarounds().force_cgl_set_virtual_screen)
+ gfx::GLContextCGL::ForceCGLSetVirtualScreen();
+#endif
+
// Create a delegate to perform async pixel transfers.
async_pixel_transfer_delegate_ =
gfx::AsyncPixelTransferDelegate::Create(context.get());

Powered by Google App Engine
This is Rietveld 408576698