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

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: Clean up branching mess 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
« no previous file with comments | « gpu/command_buffer/service/gl_context_virtual.cc ('k') | ui/gl/gl_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32e90e5dd61092afbbfda56d35febd016282a743..8aea5738b018741ac4096e04bdaba716ac730e5f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2573,6 +2573,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();
+
// Create a delegate to perform async pixel transfers.
async_pixel_transfer_delegate_ =
gfx::AsyncPixelTransferDelegate::Create(context.get());
« no previous file with comments | « gpu/command_buffer/service/gl_context_virtual.cc ('k') | ui/gl/gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698