| Index: content/browser/gpu/compositor_util.cc
|
| diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
|
| index e587d751a3dedd59c33351b8add42aa139af5961..8d4091741dc9635142d921ff4a6121946ad9797a 100644
|
| --- a/content/browser/gpu/compositor_util.cc
|
| +++ b/content/browser/gpu/compositor_util.cc
|
| @@ -7,6 +7,7 @@
|
| #include <stddef.h>
|
|
|
| #include "base/command_line.h"
|
| +#include "base/feature_list.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/metrics/field_trial.h"
|
| @@ -17,6 +18,7 @@
|
| #include "cc/base/switches.h"
|
| #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
|
| #include "content/browser/gpu/gpu_data_manager_impl.h"
|
| +#include "content/public/common/content_features.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "gpu/config/gpu_feature_type.h"
|
|
|
| @@ -281,6 +283,22 @@ int GpuRasterizationMSAASampleCount() {
|
| }
|
| }
|
|
|
| +bool IsMainFrameBeforeActivationEnabled() {
|
| + if (base::SysInfo::NumberOfProcessors() < 4)
|
| + return false;
|
| +
|
| + const base::CommandLine& command_line =
|
| + *base::CommandLine::ForCurrentProcess();
|
| +
|
| + if (command_line.HasSwitch(cc::switches::kDisableMainFrameBeforeActivation))
|
| + return false;
|
| +
|
| + if (command_line.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation))
|
| + return true;
|
| +
|
| + return base::FeatureList::IsEnabled(features::kMainFrameBeforeActivation);
|
| +}
|
| +
|
| base::DictionaryValue* GetFeatureStatus() {
|
| GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
|
| std::string gpu_access_blocked_reason;
|
|
|