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

Side by Side Diff: ui/ozone/platform/cast/ozone_platform_cast.cc

Issue 2288283002: [Chromecast] Rename disable_display flag to is_cast_audio_only. (Closed)
Patch Set: cast_audio_only => is_cast_audio_only Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/ozone.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/cast/ozone_platform_cast.h" 5 #include "ui/ozone/platform/cast/ozone_platform_cast.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void InitializeUI() override { 81 void InitializeUI() override {
82 overlay_manager_.reset(new OverlayManagerCast()); 82 overlay_manager_.reset(new OverlayManagerCast());
83 cursor_factory_.reset(new CursorFactoryOzone()); 83 cursor_factory_.reset(new CursorFactoryOzone());
84 input_controller_ = CreateStubInputController(); 84 input_controller_ = CreateStubInputController();
85 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 85 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
86 86
87 // Enable dummy software rendering support if GPU process disabled 87 // Enable dummy software rendering support if GPU process disabled
88 // or if we're an audio-only build. 88 // or if we're an audio-only build.
89 // Note: switch is kDisableGpu from content/public/common/content_switches.h 89 // Note: switch is kDisableGpu from content/public/common/content_switches.h
90 bool enable_dummy_software_rendering = true; 90 bool enable_dummy_software_rendering = true;
91 #if !BUILDFLAG(DISABLE_DISPLAY) 91 #if !BUILDFLAG(IS_CAST_AUDIO_ONLY)
92 enable_dummy_software_rendering = 92 enable_dummy_software_rendering =
93 base::CommandLine::ForCurrentProcess()->HasSwitch("disable-gpu"); 93 base::CommandLine::ForCurrentProcess()->HasSwitch("disable-gpu");
94 #endif // BUILDFLAG(DISABLE_DISPLAY) 94 #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY)
95 95
96 if (enable_dummy_software_rendering) 96 if (enable_dummy_software_rendering)
97 surface_factory_.reset(new SurfaceFactoryCast()); 97 surface_factory_.reset(new SurfaceFactoryCast());
98 } 98 }
99 void InitializeGPU() override { 99 void InitializeGPU() override {
100 surface_factory_.reset(new SurfaceFactoryCast(std::move(egl_platform_))); 100 surface_factory_.reset(new SurfaceFactoryCast(std::move(egl_platform_)));
101 g_gpu_platform_support.Get() = 101 g_gpu_platform_support.Get() =
102 base::MakeUnique<GpuPlatformSupportCast>(surface_factory_.get()); 102 base::MakeUnique<GpuPlatformSupportCast>(surface_factory_.get());
103 } 103 }
104 104
(...skipping 12 matching lines...) Expand all
117 117
118 OzonePlatform* CreateOzonePlatformCast() { 118 OzonePlatform* CreateOzonePlatformCast() {
119 const std::vector<std::string>& argv = 119 const std::vector<std::string>& argv =
120 base::CommandLine::ForCurrentProcess()->argv(); 120 base::CommandLine::ForCurrentProcess()->argv();
121 std::unique_ptr<chromecast::CastEglPlatform> platform( 121 std::unique_ptr<chromecast::CastEglPlatform> platform(
122 chromecast::CastEglPlatformShlib::Create(argv)); 122 chromecast::CastEglPlatformShlib::Create(argv));
123 return new OzonePlatformCast(std::move(platform)); 123 return new OzonePlatformCast(std::move(platform));
124 } 124 }
125 125
126 } // namespace ui 126 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/ozone.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698