Chromium Code Reviews| Index: ui/aura/mus/window_port_mus.cc |
| diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc |
| index 9ad0d75432d4f27632bd916781e570a33fa7beba..a3b06901bdf2e8f4f04b87d6b38a1b708ccd80ee 100644 |
| --- a/ui/aura/mus/window_port_mus.cc |
| +++ b/ui/aura/mus/window_port_mus.cc |
| @@ -93,25 +93,6 @@ void WindowPortMus::Embed( |
| window_tree_client_->Embed(window_, std::move(client), flags, callback); |
| } |
| -std::unique_ptr<cc::CompositorFrameSink> |
| -WindowPortMus::RequestCompositorFrameSink( |
| - scoped_refptr<cc::ContextProvider> context_provider, |
| - gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
| - cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info; |
| - cc::mojom::MojoCompositorFrameSinkRequest sink_request = |
| - mojo::MakeRequest(&sink_info); |
| - cc::mojom::MojoCompositorFrameSinkClientPtr client; |
| - cc::mojom::MojoCompositorFrameSinkClientRequest client_request = |
| - mojo::MakeRequest(&client); |
| - auto compositor_frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>( |
| - std::move(context_provider), gpu_memory_buffer_manager, |
| - std::move(sink_info), std::move(client_request), |
| - window_tree_client_->enable_surface_synchronization_); |
| - window_tree_client_->AttachCompositorFrameSink( |
| - server_id(), std::move(sink_request), std::move(client)); |
| - return std::move(compositor_frame_sink); |
| -} |
| - |
| WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange( |
| const ServerChangeType type, |
| const ServerChangeData& data) { |
| @@ -491,13 +472,30 @@ void WindowPortMus::OnPropertyChanged(const void* key, |
| } |
| std::unique_ptr<cc::CompositorFrameSink> |
| -WindowPortMus::CreateCompositorFrameSink() { |
| - // TODO(penghuang): Implement it for Mus. |
| - return nullptr; |
| +WindowPortMus::CreateCompositorFrameSink( |
| + scoped_refptr<cc::ContextProvider> context_provider, |
| + gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { |
| + DCHECK_NE(window_mus_type(), WindowMusType::EMBED_IN_OWNER); |
| + DCHECK_NE(window_mus_type(), WindowMusType::TOP_LEVEL_IN_WM); |
|
Fady Samuel
2017/05/26 20:19:28
I think you need to rebase...there's another type
Peng
2017/05/26 20:41:31
As offline discussion, we don't need add another D
|
| + |
| + cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info; |
| + cc::mojom::MojoCompositorFrameSinkRequest sink_request = |
| + mojo::MakeRequest(&sink_info); |
| + cc::mojom::MojoCompositorFrameSinkClientPtr client; |
| + cc::mojom::MojoCompositorFrameSinkClientRequest client_request = |
| + mojo::MakeRequest(&client); |
| + auto compositor_frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>( |
| + std::move(context_provider), gpu_memory_buffer_manager, |
| + std::move(sink_info), std::move(client_request), |
| + window_tree_client_->enable_surface_synchronization_); |
| + window_tree_client_->AttachCompositorFrameSink( |
| + server_id(), std::move(sink_request), std::move(client)); |
| + return std::move(compositor_frame_sink); |
| } |
| cc::SurfaceId WindowPortMus::GetSurfaceId() const { |
| - // TODO(penghuang): Implement it for Mus. |
| + // This method is only used by exo unittests which are not running against |
| + // mus, so don't implement it now. |
| return cc::SurfaceId(); |
| } |
| @@ -518,11 +516,6 @@ void WindowPortMus::UpdatePrimarySurfaceInfo() { |
| } |
| void WindowPortMus::UpdateClientSurfaceEmbedder() { |
| - bool embeds_surface = window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || |
| - window_mus_type() == WindowMusType::EMBED_IN_OWNER; |
| - if (!embeds_surface) |
| - return; |
| - |
| if (!client_surface_embedder_) { |
| client_surface_embedder_ = base::MakeUnique<ClientSurfaceEmbedder>( |
| window_, window_tree_client_->normal_client_area_insets_); |