Chromium Code Reviews| Index: services/ui/service.cc |
| diff --git a/services/ui/service.cc b/services/ui/service.cc |
| index d4eca9ccd9a5d58aa6cce8d9d4c37247d32e9ac5..b2e163a0637bdacad278551bc515321616e6da65 100644 |
| --- a/services/ui/service.cc |
| +++ b/services/ui/service.cc |
| @@ -20,7 +20,6 @@ |
| #include "services/ui/clipboard/clipboard_impl.h" |
| #include "services/ui/common/switches.h" |
| #include "services/ui/display/platform_screen.h" |
| -#include "services/ui/gles2/gpu_impl.h" |
| #include "services/ui/gpu/gpu_service_impl.h" |
| #include "services/ui/gpu/gpu_service_mus.h" |
| #include "services/ui/ws/accessibility_manager.h" |
| @@ -53,7 +52,6 @@ |
| using shell::Connection; |
| using mojo::InterfaceRequest; |
| -using ui::mojom::Gpu; |
| using ui::mojom::WindowServerTest; |
| using ui::mojom::WindowTreeHostFactory; |
| @@ -81,13 +79,6 @@ struct Service::UserState { |
| Service::Service() |
| : test_config_(false), |
| -// TODO(penghuang): Kludge: Use mojo command buffer when running on |
| -// Windows since chrome command buffer breaks unit tests |
| -#if defined(OS_WIN) |
| - use_chrome_gpu_command_buffer_(false), |
| -#else |
| - use_chrome_gpu_command_buffer_(true), |
| -#endif |
| platform_screen_(display::PlatformScreen::Create()), |
| weak_ptr_factory_(this) { |
| } |
| @@ -97,9 +88,6 @@ Service::~Service() { |
| // WindowServer (or more correctly its Displays) may have state that needs to |
| // be destroyed before GpuState as well. |
| window_server_.reset(); |
| - |
| - if (platform_display_init_params_.gpu_state) |
| - platform_display_init_params_.gpu_state->StopThreads(); |
| } |
| void Service::InitializeResources(shell::Connector* connector) { |
| @@ -154,15 +142,6 @@ void Service::OnStart(shell::Connector* connector, |
| test_config_ = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kUseTestConfig); |
| -// TODO(penghuang): Kludge: use mojo command buffer when running on Windows |
| -// since Chrome command buffer breaks unit tests |
| -#if defined(OS_WIN) |
| - use_chrome_gpu_command_buffer_ = false; |
| -#else |
| - use_chrome_gpu_command_buffer_ = |
| - !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kUseMojoGpuCommandBufferInMus); |
| -#endif |
| #if defined(USE_X11) |
| XInitThreads(); |
| if (test_config_) |
| @@ -204,13 +183,7 @@ void Service::OnStart(shell::Connector* connector, |
| // so keep this line below both of those. |
| input_device_server_.RegisterAsObserver(); |
| - if (use_chrome_gpu_command_buffer_) { |
| - GpuServiceMus::GetInstance(); |
| - } else { |
| - // TODO(rjkroege): It is possible that we might want to generalize the |
| - // GpuState object. |
| - platform_display_init_params_.gpu_state = new GpuState(); |
| - } |
| + GpuServiceMus::GetInstance(); |
| // Gpu must be running before the PlatformScreen can be initialized. |
| platform_screen_->Init(); |
| @@ -236,11 +209,7 @@ bool Service::OnConnect(Connection* connection) { |
| if (test_config_) |
| connection->AddInterface<WindowServerTest>(this); |
| - if (use_chrome_gpu_command_buffer_) { |
| - connection->AddInterface<mojom::GpuService>(this); |
| - } else { |
| - connection->AddInterface<Gpu>(this); |
| - } |
| + connection->AddInterface<mojom::GpuService>(this); |
|
Peng
2016/07/26 15:47:03
Reorder interfaces?
sadrul
2016/07/26 16:13:04
Done.
|
| // On non-Linux platforms there will be no DeviceDataManager instance and no |
| // purpose in adding the Mojo interface to connect to. |
| @@ -315,17 +284,8 @@ void Service::Create(shell::Connection* connection, |
| ->AddDisplayManagerBinding(std::move(request)); |
| } |
| -void Service::Create(shell::Connection* connection, mojom::GpuRequest request) { |
| - if (use_chrome_gpu_command_buffer_) |
| - return; |
| - DCHECK(platform_display_init_params_.gpu_state); |
| - new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); |
| -} |
| - |
| void Service::Create(shell::Connection* connection, |
| mojom::GpuServiceRequest request) { |
| - if (!use_chrome_gpu_command_buffer_) |
| - return; |
| new GpuServiceImpl(std::move(request), connection); |
| } |