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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 1336733002: Re-land: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android build fix Created 5 years, 3 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 | « content/child/child_thread_impl.cc ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698