Skip to content

Commit

Permalink
Remove kOzoneTestSingleOverlaySupport.
Browse files Browse the repository at this point in the history
kOzoneTestSingleOverlaySupport was originally added to test a single
overlay plane when using Ozone.

The code evolved and now passing that parameter enable overlays (not
only a single overlay).

This CL removes the command line flag and uses kEnableHardwareOverlays
instead to enable overlays on Ozone.

BUG=b/29430506

Review-Url: https://codereview.chromium.org/2122303003
Cr-Commit-Position: refs/heads/master@{#405606}
  • Loading branch information
DCastagna authored and Commit bot committed Jul 14, 2016
1 parent 25eb0c4 commit 8484d56
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 32 deletions.
8 changes: 0 additions & 8 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6567,14 +6567,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION" desc="Description for the flag that causes Chrome to use the sandbox (testing) server for Sync.">
Connects to the testing server for Chrome Sync.
</message>
<if expr="chromeos">
<message name="IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY" desc="Name of the 'Ozone hardware overlay' lab.">
Ozone hardware overlay
</message>
<message name="IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION" desc="Description of the 'Ozone hardware overlay' lab.">
Enables compositing with an addition of one hardware overlay when possible.
</message>
</if>
<message name="IDS_FLAGS_DATASAVER_PROMPT_NAME" desc="Title for the flag to enable a prompt to install Data Saver when a cellular network is detected." translateable="false">
Cellular Data Saver Prompt
</message>
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1512,12 +1512,6 @@ const FeatureEntry kFeatureEntries[] = {
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection,
switches::kDisableChildAccountDetection)},
#endif
#if defined(OS_CHROMEOS) && defined(USE_OZONE)
{"ozone-test-single-overlay-support",
IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY,
IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION, kOsCrOS,
SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport)},
#endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
{"v8-pac-mojo-out-of-process", IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME,
IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION, kOsDesktop,
ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess,
Expand Down
12 changes: 5 additions & 7 deletions content/browser/compositor/gpu_process_transport_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,12 @@ CreateOverlayCandidateValidator(gfx::AcceleratedWidget widget) {
std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
validator;
#if defined(USE_OZONE)
std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates =
ui::OzonePlatform::GetInstance()
->GetOverlayManager()
->CreateOverlayCandidates(widget);
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (overlay_candidates &&
(command_line->HasSwitch(switches::kEnableHardwareOverlays) ||
command_line->HasSwitch(switches::kOzoneTestSingleOverlaySupport))) {
if (command_line->HasSwitch(switches::kEnableHardwareOverlays)) {
std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates =
ui::OzonePlatform::GetInstance()
->GetOverlayManager()
->CreateOverlayCandidates(widget);
validator.reset(
new display_compositor::CompositorOverlayCandidateValidatorOzone(
std::move(overlay_candidates)));
Expand Down
4 changes: 0 additions & 4 deletions ui/ozone/platform/drm/host/drm_overlay_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const size_t kMaxCacheSize = 200;
DrmOverlayManager::DrmOverlayManager(GpuThreadAdapter* proxy,
DrmWindowHostManager* window_manager)
: proxy_(proxy), window_manager_(window_manager), cache_(kMaxCacheSize) {
is_supported_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kOzoneTestSingleOverlaySupport);
proxy_->RegisterHandlerForDrmOverlayManager(this);
}

Expand All @@ -40,8 +38,6 @@ DrmOverlayManager::~DrmOverlayManager() {

std::unique_ptr<OverlayCandidatesOzone>
DrmOverlayManager::CreateOverlayCandidates(gfx::AcceleratedWidget w) {
if (!is_supported_)
return nullptr;
return base::WrapUnique(new DrmOverlayCandidatesHost(this, w));
}

Expand Down
1 change: 0 additions & 1 deletion ui/ozone/platform/drm/host/drm_overlay_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class DrmOverlayManager : public OverlayManagerOzone {
const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate,
gfx::AcceleratedWidget widget) const;

bool is_supported_;
GpuThreadAdapter* proxy_; // Not owned.
DrmWindowHostManager* window_manager_; // Not owned.

Expand Down
4 changes: 0 additions & 4 deletions ui/ozone/public/ozone_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const char kOzonePlatform[] = "ozone-platform";
// Specify location for image dumps.
const char kOzoneDumpFile[] = "ozone-dump-file";

// Enable support for a single overlay plane.
const char kOzoneTestSingleOverlaySupport[] =
"ozone-test-single-overlay-support";

// Specifies the size of the primary display at initialization.
const char kOzoneInitialDisplayBounds[] = "ozone-initial-display-bounds";

Expand Down
2 changes: 0 additions & 2 deletions ui/ozone/public/ozone_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ OZONE_BASE_EXPORT extern const char kOzonePlatform[];

OZONE_BASE_EXPORT extern const char kOzoneDumpFile[];

OZONE_BASE_EXPORT extern const char kOzoneTestSingleOverlaySupport[];

OZONE_BASE_EXPORT extern const char kOzoneInitialDisplayBounds[];

OZONE_BASE_EXPORT extern const char kOzoneInitialDisplayPhysicalSizeMm[];
Expand Down

0 comments on commit 8484d56

Please sign in to comment.