summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 16:38:56 +0000
committervangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 16:38:56 +0000
commitb7c4f0378030eaacfc3a52218517d9340137ca59 (patch)
treecf15f0608a2aab97645ca4ec06c7ecba19bef128
parent8677b19f1ab9262c43949ca038690d5943e19fe3 (diff)
downloadchromium_src-b7c4f0378030eaacfc3a52218517d9340137ca59.zip
chromium_src-b7c4f0378030eaacfc3a52218517d9340137ca59.tar.gz
chromium_src-b7c4f0378030eaacfc3a52218517d9340137ca59.tar.bz2
Cleaned up compositing mode field trial code by:
1. Move the code that checks whether FCM and/or ThreadedCompositing is enabled to a separate file (compositor_utils) that can be accessed from all the spots that need the info. 2. Cache results results for checks so that we don't have to check them every frame (string compares were actually showing up in profile results) 3. Some cosmetic changes to variable names to keep them consistent. 4. Re-arranged to code that decides what trials run in which channels. This CL also enables FCM on beta/stable by default but keeps the previous 1/3 experiment running on the other channels. BUG= Review URL: https://chromiumcodereview.appspot.com/10824168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150359 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_browser_field_trials.cc2
-rw-r--r--chrome/browser/chrome_content_browser_client.cc4
-rw-r--r--chrome/browser/gpu_util.cc77
-rw-r--r--chrome/browser/gpu_util.h8
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc16
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.h3
-rw-r--r--content/common/compositor_util.cc45
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc23
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h1
-rw-r--r--content/content_common.gypi2
-rw-r--r--content/public/common/compositor_util.h20
-rw-r--r--content/public/common/content_constants.cc2
-rw-r--r--content/public/common/content_constants.h3
-rw-r--r--content/renderer/render_thread_impl.cc12
14 files changed, 129 insertions, 89 deletions
diff --git a/chrome/browser/chrome_browser_field_trials.cc b/chrome/browser/chrome_browser_field_trials.cc
index 1d71dde..7099830 100644
--- a/chrome/browser/chrome_browser_field_trials.cc
+++ b/chrome/browser/chrome_browser_field_trials.cc
@@ -120,7 +120,7 @@ void ChromeBrowserFieldTrials::SetupFieldTrials(bool proxy_policy_is_set) {
PredictorFieldTrial();
DefaultAppsFieldTrial();
AutoLaunchChromeFieldTrial();
- gpu_util::InitializeForceCompositingModeFieldTrial();
+ gpu_util::InitializeCompositingFieldTrial();
SetupUniformityFieldTrials();
AutocompleteFieldTrial::Activate();
DisableNewTabFieldTrialIfNecesssary();
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index d45f4df..d41f143 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -37,7 +37,6 @@
#include "chrome/browser/extensions/message_handler.h"
#include "chrome/browser/geolocation/chrome_access_token_store.h"
#include "chrome/browser/google/google_util.h"
-#include "chrome/browser/gpu_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/net/chrome_net_log.h"
@@ -93,6 +92,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/child_process_host.h"
+#include "content/public/common/compositor_util.h"
#include "content/public/common/content_descriptors.h"
#include "grit/generated_resources.h"
#include "grit/ui_resources.h"
@@ -1493,7 +1493,7 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
extension, view_type, web_prefs);
}
- if (gpu_util::InForceCompositingModeOrThreadTrial())
+ if (content::IsForceCompositingModeEnabled())
web_prefs->force_compositing_mode = true;
if (view_type == chrome::VIEW_TYPE_NOTIFICATION) {
diff --git a/chrome/browser/gpu_util.cc b/chrome/browser/gpu_util.cc
index 258a6d0..2af41916 100644
--- a/chrome/browser/gpu_util.cc
+++ b/chrome/browser/gpu_util.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/gpu_blacklist.h"
#include "chrome/common/chrome_version_info.h"
#include "content/public/browser/gpu_data_manager.h"
+#include "content/public/common/compositor_util.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/gpu_info.h"
@@ -169,27 +170,15 @@ int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) {
}
#endif // OS_WIN
-bool InForceThreadedCompositingModeTrial() {
- base::FieldTrial* trial =
- base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
- return trial && trial->group_name() ==
- content::kGpuCompositingFieldTrialThreadEnabledName;
-}
-
} // namespace
namespace gpu_util {
-void InitializeForceCompositingModeFieldTrial() {
+void InitializeCompositingFieldTrial() {
// Enable the field trial only on desktop OS's.
#if !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
return;
#endif
- chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
- // Only run the trial on the Canary and Dev channels.
- if (channel != chrome::VersionInfo::CHANNEL_CANARY &&
- channel != chrome::VersionInfo::CHANNEL_DEV)
- return;
#if defined(OS_WIN)
// Don't run the trial on Windows XP.
if (base::win::GetVersion() < base::win::VERSION_VISTA)
@@ -208,9 +197,7 @@ void InitializeForceCompositingModeFieldTrial() {
// Don't activate the field trial if force-compositing-mode has been
// explicitly disabled from the command line.
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableForceCompositingMode) ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableThreadedCompositing))
+ switches::kDisableForceCompositingMode))
return;
const base::FieldTrial::Probability kDivisor = 3;
@@ -221,29 +208,43 @@ void InitializeForceCompositingModeFieldTrial() {
// Produce the same result on every run of this client.
trial->UseOneTimeRandomization();
- // 1/3 probability of being in the enabled or thread group.
- const base::FieldTrial::Probability kEnableProbability = 1;
- int enable_group = trial->AppendGroup(
- content::kGpuCompositingFieldTrialEnabledName, kEnableProbability);
+
+ base::FieldTrial::Probability force_compositing_mode_probability = 0;
+ base::FieldTrial::Probability threaded_compositing_probability = 0;
+
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+ if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
+ channel == chrome::VersionInfo::CHANNEL_BETA) {
+ // Stable and Beta channels: Non-threaded force-compositing-mode on by
+ // default (mac and windows only).
+#if defined(OS_WIN) || defined(OS_MACOSX)
+ force_compositing_mode_probability = 3;
+#endif
+ } else if (channel == chrome::VersionInfo::CHANNEL_DEV ||
+ channel == chrome::VersionInfo::CHANNEL_CANARY) {
+ // Dev and Canary channels: force-compositing-mode and
+ // threaded-compositing on with 1/3 probability each.
+ force_compositing_mode_probability = 1;
+
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableThreadedCompositing))
+ threaded_compositing_probability = 1;
+ }
+
+ int force_compositing_group = trial->AppendGroup(
+ content::kGpuCompositingFieldTrialForceCompositingEnabledName,
+ force_compositing_mode_probability);
int thread_group = trial->AppendGroup(
- content::kGpuCompositingFieldTrialThreadEnabledName, kEnableProbability);
+ content::kGpuCompositingFieldTrialThreadEnabledName,
+ threaded_compositing_probability);
- bool enabled = (trial->group() == enable_group);
+ bool force_compositing = (trial->group() == force_compositing_group);
bool thread = (trial->group() == thread_group);
- UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", enabled);
+ UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial",
+ force_compositing);
UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread);
}
-bool InForceCompositingModeOrThreadTrial() {
- base::FieldTrial* trial =
- base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
- if (!trial)
- return false;
- return trial->group_name() == content::kGpuCompositingFieldTrialEnabledName ||
- trial->group_name() ==
- content::kGpuCompositingFieldTrialThreadEnabledName;
-}
-
GpuFeatureType StringToGpuFeatureType(const std::string& feature_string) {
if (feature_string == kGpuFeatureNameAccelerated2dCanvas)
return content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS;
@@ -417,16 +418,10 @@ Value* GetFeatureStatus() {
(command_line.HasSwitch(switches::kDisableAcceleratedCompositing) ||
(flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)))
status += "_readback";
- bool has_thread =
- (command_line.HasSwitch(switches::kEnableThreadedCompositing) &&
- !command_line.HasSwitch(switches::kDisableThreadedCompositing)) ||
- InForceThreadedCompositingModeTrial();
+ bool has_thread = content::IsThreadedCompositingEnabled();
if (kGpuFeatureInfo[i].name == "compositing") {
bool force_compositing =
- (command_line.HasSwitch(switches::kForceCompositingMode) &&
- !command_line.HasSwitch(
- switches::kDisableForceCompositingMode)) ||
- InForceCompositingModeOrThreadTrial();
+ content::IsForceCompositingModeEnabled();
if (force_compositing)
status += "_force";
if (has_thread)
diff --git a/chrome/browser/gpu_util.h b/chrome/browser/gpu_util.h
index 6587e87..89924cf 100644
--- a/chrome/browser/gpu_util.h
+++ b/chrome/browser/gpu_util.h
@@ -70,12 +70,8 @@ base::DictionaryValue* GpuInfoAsDictionaryValue();
// Send UMA histograms about the enabled features.
void UpdateStats();
-// Returns whether this client has been selected for the force-compositing-mode
-// or threaded-compositor trial.
-bool InForceCompositingModeOrThreadTrial();
-
-// Sets up the force-compositing-mode field trial.
-void InitializeForceCompositingModeFieldTrial();
+// Sets up force-compositing-mode and threaded compositing field trials.
+void InitializeCompositingFieldTrial();
} // namespace gpu_util
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index b577332b..31cbeb4 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -36,6 +36,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/common/compositor_util.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -172,6 +173,8 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
DCHECK(surface_id_);
}
+ is_threaded_compositing_enabled_ = IsThreadedCompositingEnabled();
+
process_->Attach(this, routing_id_);
// Because the widget initializes as is_hidden_ == false,
// tell the process host that we're alive.
@@ -1991,18 +1994,7 @@ void RenderWidgetHostImpl::AcknowledgeBufferPresent(
}
void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() {
- base::FieldTrial* trial =
- base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
- bool is_thread_trial = trial && trial->group_name() ==
- content::kGpuCompositingFieldTrialThreadEnabledName;
- bool has_enable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableThreadedCompositing);
- bool has_disable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableThreadedCompositing);
- DCHECK(!is_thread_trial || !has_disable);
- bool enable_threaded_compositing =
- is_thread_trial || (has_enable && !has_disable);
- if (!enable_threaded_compositing)
+ if (!is_threaded_compositing_enabled_)
Send(new ViewMsg_SwapBuffers_ACK(routing_id_));
}
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 572c520..6171b4c 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -631,6 +631,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// True when a page is rendered directly via the GPU process.
bool is_accelerated_compositing_active_;
+ // True if threaded compositing is enabled on this view.
+ bool is_threaded_compositing_enabled_;
+
// Set if we are waiting for a repaint ack for the view.
bool repaint_ack_pending_;
diff --git a/content/common/compositor_util.cc b/content/common/compositor_util.cc
new file mode 100644
index 0000000..ee14c05
--- /dev/null
+++ b/content/common/compositor_util.cc
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/compositor_util.h"
+
+#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
+#include "content/public/common/content_constants.h"
+#include "content/public/common/content_switches.h"
+
+namespace content {
+
+bool IsThreadedCompositingEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kEnableThreadedCompositing) &&
+ !command_line.HasSwitch(switches::kDisableThreadedCompositing))
+ return true;
+
+ base::FieldTrial* trial =
+ base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
+ return trial &&
+ trial->group_name() ==
+ content::kGpuCompositingFieldTrialThreadEnabledName;
+}
+
+bool IsForceCompositingModeEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kForceCompositingMode) &&
+ !command_line.HasSwitch(switches::kDisableForceCompositingMode))
+ return true;
+
+ base::FieldTrial* trial =
+ base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
+
+ // Force compositing is enabled in both the force compositing
+ // and threaded compositing mode field trials.
+ return trial &&
+ (trial->group_name() ==
+ content::kGpuCompositingFieldTrialForceCompositingEnabledName ||
+ trial->group_name() ==
+ content::kGpuCompositingFieldTrialThreadEnabledName);
+}
+
+} // compositor_util
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index aedd8c7..89a0a52 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -26,6 +26,7 @@
#include "content/common/gpu/gpu_memory_allocation.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
+#include "content/public/common/compositor_util.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
@@ -151,7 +152,12 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
transfer_buffer_(NULL),
gl_(NULL),
frame_number_(0),
- bind_generates_resources_(false) {
+ bind_generates_resources_(false),
+ use_echo_for_swap_ack_(true) {
+#if defined(OS_MACOSX) || defined(OS_WIN)
+ // Get ViewMsg_SwapBuffers_ACK from browser for single-threaded path.
+ use_echo_for_swap_ack_ = content::IsThreadedCompositingEnabled();
+#endif
}
WebGraphicsContext3DCommandBufferImpl::
@@ -521,20 +527,7 @@ void WebGraphicsContext3DCommandBufferImpl::prepareTexture() {
if (command_buffer_->GetLastState().error == gpu::error::kNoError)
gl_->SwapBuffers();
- bool use_echo_for_swap_ack = true;
-#if defined(OS_MACOSX) || defined(OS_WIN)
- // Get ViewMsg_SwapBuffers_ACK from browser for single-threaded path.
- base::FieldTrial* trial =
- base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
- bool thread_trial = trial && trial->group_name() ==
- content::kGpuCompositingFieldTrialThreadEnabledName;
- use_echo_for_swap_ack = thread_trial ||
- (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableThreadedCompositing) &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableThreadedCompositing));
-#endif
- if (use_echo_for_swap_ack) {
+ if (use_echo_for_swap_ack_) {
command_buffer_->Echo(base::Bind(
&WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
index fd5dbbc..33ac3c7 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -713,6 +713,7 @@ class WebGraphicsContext3DCommandBufferImpl
Error last_error_;
int frame_number_;
bool bind_generates_resources_;
+ bool use_echo_for_swap_ack_;
};
#endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 577a088..b85bf05 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -35,6 +35,7 @@
'public/common/child_process_host_delegate.cc',
'public/common/child_process_host_delegate.h',
'public/common/child_process_sandbox_support_linux.h',
+ 'public/common/compositor_util.h',
'public/common/content_constants.cc',
'public/common/content_constants.h',
'public/common/content_descriptors.h',
@@ -138,6 +139,7 @@
'common/child_trace_message_filter.h',
'common/clipboard_messages.cc',
'common/clipboard_messages.h',
+ 'common/compositor_util.cc',
'common/content_message_generator.cc',
'common/content_message_generator.h',
'common/content_export.h',
diff --git a/content/public/common/compositor_util.h b/content/public/common/compositor_util.h
new file mode 100644
index 0000000..4451b43
--- /dev/null
+++ b/content/public/common/compositor_util.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_COMPOSITOR_UTIL_H_
+#define CONTENT_PUBLIC_COMMON_COMPOSITOR_UTIL_H_
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+// Returns true if the threaded compositor is on (via flags or field trial).
+CONTENT_EXPORT bool IsThreadedCompositingEnabled();
+
+// Returns true if force-compositing-mode is on (via flags or field trial).
+CONTENT_EXPORT bool IsForceCompositingModeEnabled();
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_COMPOSITOR_UTIL_H_
diff --git a/content/public/common/content_constants.cc b/content/public/common/content_constants.cc
index 63490fd..66cd854 100644
--- a/content/public/common/content_constants.cc
+++ b/content/public/common/content_constants.cc
@@ -33,7 +33,7 @@ const int kStatsMaxCounters = 3000;
const int kHistogramSynchronizerReservedSequenceNumber = 0;
const char kGpuCompositingFieldTrialName[] = "ForceCompositingMode";
-const char kGpuCompositingFieldTrialEnabledName[] = "enabled";
+const char kGpuCompositingFieldTrialForceCompositingEnabledName[] = "enabled";
const char kGpuCompositingFieldTrialThreadEnabledName[] = "thread";
} // namespace content
diff --git a/content/public/common/content_constants.h b/content/public/common/content_constants.h
index d8eb0bc..9097181 100644
--- a/content/public/common/content_constants.h
+++ b/content/public/common/content_constants.h
@@ -54,7 +54,8 @@ extern const int kStatsMaxCounters;
CONTENT_EXPORT extern const int kHistogramSynchronizerReservedSequenceNumber;
CONTENT_EXPORT extern const char kGpuCompositingFieldTrialName[];
-CONTENT_EXPORT extern const char kGpuCompositingFieldTrialEnabledName[];
+CONTENT_EXPORT extern const char
+ kGpuCompositingFieldTrialForceCompositingEnabledName[];
CONTENT_EXPORT extern const char kGpuCompositingFieldTrialThreadEnabledName[];
} // namespace content
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 0be789f..59af873 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());