Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index 902a5f23517fa1b18f8d5c1672b4de48a8991ca4..3c7c8124d142f3a4990919926f0f1760cc9625de 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 |
ccameron
2015/09/18 20:18:53
s/defualt/default
|
+// when enabling FCM. |
+// http://crbug.com/180463 |
+#if defined(OS_MACOSX) |
+const bool kUseVirtualizedGLContext = true; |
+#else |
+const bool kUseVirtualizedGLContext = false; |
+#endif |
+ |
} // anonymous namespace |
scoped_refptr<GpuChannelMessageQueue> GpuChannelMessageQueue::Create( |
@@ -737,20 +746,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_); |
@@ -961,7 +962,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, |
init_params.stream_id, route_id, 0, watchdog_, software_, |
init_params.active_url)); |