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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 10824168: Cleaning up compositing field trial code and enable FCM in beta/stable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: compositor_utils.cc moved to content\common Created 8 years, 4 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/public/common/content_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 0be789fa2921f9a5e17af98cbf080147fa725af5..59af8730bfac1c1b6cfa0b57f958d125fc52676f 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -40,6 +40,7 @@
#include "content/common/resource_messages.h"
#include "content/common/view_messages.h"
#include "content/common/web_database_observer_impl.h"
+#include "content/public/common/compositor_util.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
@@ -492,21 +493,12 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
WebKit::initialize(webkit_platform_support_.get());
- base::FieldTrial* thread_trial =
- base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
- bool is_thread_trial = thread_trial && thread_trial->group_name() ==
- content::kGpuCompositingFieldTrialThreadEnabledName;
- bool has_enable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableThreadedCompositing);
- bool has_disable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableThreadedCompositing);
// TODO(fsamuel): Guests don't currently support threaded compositing.
// This should go away with the new design of the browser plugin.
// The new design can be tracked at: http://crbug.com/134492.
bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kGuestRenderer);
- DCHECK(!is_thread_trial || !has_disable);
- bool enable = (is_thread_trial || (has_enable && !has_disable)) && !is_guest;
+ bool enable = content::IsThreadedCompositingEnabled() && !is_guest;
if (enable) {
compositor_thread_.reset(new CompositorThread(this));
AddFilter(compositor_thread_->GetMessageFilter());
« no previous file with comments | « content/public/common/content_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698