Chromium Code Reviews| Index: content/browser/compositor/gpu_process_transport_factory.cc |
| diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc |
| index 2d6a2d6bac0914b55091cc7be27045f39e3474b1..670dbb2b9c126d0f688a4ab547dfa933c8ce880a 100644 |
| --- a/content/browser/compositor/gpu_process_transport_factory.cc |
| +++ b/content/browser/compositor/gpu_process_transport_factory.cc |
| @@ -62,7 +62,6 @@ |
| #include "ui/gl/gl_switches.h" |
| #if defined(USE_AURA) |
| -#include "content/browser/compositor/mus_browser_compositor_output_surface.h" |
| #include "content/public/common/service_manager_connection.h" |
| #include "ui/aura/window_tree_host.h" |
| #endif |
| @@ -110,10 +109,6 @@ const int kNumRetriesBeforeSoftwareFallback = 4; |
| // from RenderWidgetHostImpl. |
| constexpr uint32_t kDefaultClientId = 0u; |
| -bool IsUsingMus() { |
| - return service_manager::ServiceManagerIsRemote(); |
| -} |
| - |
| bool IsGpuVSyncSignalSupported() { |
| #if defined(OS_WIN) |
| // TODO(stanisc): http://crbug.com/467617 Limit to Windows 8+ for now because |
| @@ -298,9 +293,6 @@ static bool ShouldCreateGpuCompositorFrameSink(ui::Compositor* compositor) { |
| // Software fallback does not happen on Chrome OS. |
| return true; |
| #endif |
| - if (IsUsingMus()) |
| - return true; |
| - |
| #if defined(OS_WIN) |
| if (::GetProp(compositor->widget(), kForceSoftwareCompositor) && |
| ::RemoveProp(compositor->widget(), kForceSoftwareCompositor)) |
| @@ -361,7 +353,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( |
| DCHECK(data); |
| if (num_attempts > kNumRetriesBeforeSoftwareFallback) { |
| - bool fatal = IsUsingMus(); |
| + bool fatal = false; |
| #if defined(OS_CHROMEOS) |
| fatal = true; |
| #endif |
| @@ -436,9 +428,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( |
| // use CommandBufferProxyImpl::TakeFrontBuffer() to take the context's |
| // front buffer into a mailbox, insert a sync token, and send the |
| // mailbox+sync to the ui service process. |
| - gpu::SurfaceHandle surface_handle = |
| - IsUsingMus() ? gpu::kNullSurfaceHandle : data->surface_handle; |
| - bool need_alpha_channel = IsUsingMus(); |
| + gpu::SurfaceHandle surface_handle = data->surface_handle; |
| + bool need_alpha_channel = false; |
| bool support_locking = false; |
| context_provider = CreateContextCommon( |
| std::move(gpu_channel_host), surface_handle, need_alpha_channel, |
| @@ -537,36 +528,15 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( |
| } else { |
| std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| validator; |
| - const bool use_mus = IsUsingMus(); |
| #if !defined(OS_MACOSX) |
| // Overlays are only supported on surfaceless output surfaces on Mac. |
| - if (!use_mus) |
| - validator = CreateOverlayCandidateValidator(compositor->widget()); |
| -#endif |
| - if (!use_mus) { |
| - auto gpu_output_surface = |
| - base::MakeUnique<GpuBrowserCompositorOutputSurface>( |
| - context_provider, vsync_callback, std::move(validator)); |
| - gpu_vsync_control = gpu_output_surface.get(); |
| - display_output_surface = std::move(gpu_output_surface); |
| - } else { |
| -#if defined(USE_AURA) |
| - aura::WindowTreeHost* host = |
| - aura::WindowTreeHost::GetForAcceleratedWidget( |
| - compositor->widget()); |
| - auto mus_output_surface = |
| - base::MakeUnique<MusBrowserCompositorOutputSurface>( |
| - host->window(), context_provider, GetGpuMemoryBufferManager(), |
| - vsync_callback, std::move(validator)); |
| - // We use the ExternalBeginFrameSource provided by the output surface |
| - // instead of our own synthetic one. |
| - begin_frame_source = mus_output_surface->GetBeginFrameSource(); |
|
stanisc
2017/03/28 18:14:23
Now that this line of code is removed it doesn't m
|
| - DCHECK(begin_frame_source); |
| - display_output_surface = std::move(mus_output_surface); |
| -#else |
| - NOTREACHED(); |
| + validator = CreateOverlayCandidateValidator(compositor->widget()); |
| #endif |
| - } |
| + auto gpu_output_surface = |
| + base::MakeUnique<GpuBrowserCompositorOutputSurface>( |
| + context_provider, vsync_callback, std::move(validator)); |
| + gpu_vsync_control = gpu_output_surface.get(); |
| + display_output_surface = std::move(gpu_output_surface); |
| } |
| } |
| } |