Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index 7ebd553495ffca7c3e2ff1194c1b5f6910f6a037..4252523d86347dab7d185ab0aff3b2b22b4fb7e4 100644 |
--- a/content/common/gpu/gpu_channel.cc |
+++ b/content/common/gpu/gpu_channel.cc |
@@ -70,6 +70,15 @@ const int64 kStopPreemptThresholdMs = kVsyncIntervalMs; |
const uint32_t kOutOfOrderNumber = static_cast<uint32_t>(-1); |
+// Virtualize contexts by defualt on OS X to prevent performance regressions |
+// when enabling FCM. |
+// http://crbug.com/180463 |
+#if defined(OS_MACOSX) |
+const bool kUseVirtualizedGLContext = true; |
+#else |
+const bool kUseVirtualizedGLContext = false; |
+#endif |
+ |
} // anonymous namespace |
struct GpuChannelMessage { |
@@ -765,20 +774,12 @@ CreateCommandBufferResult GpuChannel::CreateViewCommandBuffer( |
return CREATE_COMMAND_BUFFER_FAILED; |
} |
- // Virtualize compositor contexts on OS X to prevent performance regressions |
- // when enabling FCM. |
- // http://crbug.com/180463 |
- bool use_virtualized_gl_context = false; |
-#if defined(OS_MACOSX) |
- use_virtualized_gl_context = true; |
-#endif |
- |
scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( |
this, task_runner_.get(), share_group, window, mailbox_manager_.get(), |
subscription_ref_set_.get(), pending_valuebuffer_state_.get(), |
gfx::Size(), disallowed_features_, init_params.attribs, |
- init_params.gpu_preference, use_virtualized_gl_context, stream_id, |
- route_id, surface_id, watchdog_, software_, init_params.active_url)); |
+ init_params.gpu_preference, kUseVirtualizedGLContext, stream_id, route_id, |
+ surface_id, watchdog_, software_, init_params.active_url)); |
if (preempted_flag_.get()) |
stub->SetPreemptByFlag(preempted_flag_); |
@@ -1018,7 +1019,7 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( |
this, task_runner_.get(), share_group, gfx::GLSurfaceHandle(), |
mailbox_manager_.get(), subscription_ref_set_.get(), |
pending_valuebuffer_state_.get(), size, disallowed_features_, |
- init_params.attribs, init_params.gpu_preference, false, |
+ init_params.attribs, init_params.gpu_preference, kUseVirtualizedGLContext, |
reveman
2015/09/18 14:51:35
Not sure exactly why non-virtualized contexts are
ccameron
2015/09/18 20:18:53
When we initially switched to virtualized contexts
|
init_params.stream_id, route_id, 0, watchdog_, software_, |
init_params.active_url)); |