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

Side by Side Diff: ui/aura/mus/window_port_mus.cc

Issue 2903853002: Make RendererCompositorFrameSink derive from ClientCompositorFrameSink (Closed)
Patch Set: Address comments Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/aura/mus/window_port_mus.h" 5 #include "ui/aura/mus/window_port_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/transient_window_client.h" 9 #include "ui/aura/client/transient_window_client.h"
10 #include "ui/aura/mus/client_surface_embedder.h" 10 #include "ui/aura/mus/client_surface_embedder.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 scoped_refptr<cc::ContextProvider> context_provider, 98 scoped_refptr<cc::ContextProvider> context_provider,
99 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { 99 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
100 cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info; 100 cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info;
101 cc::mojom::MojoCompositorFrameSinkRequest sink_request = 101 cc::mojom::MojoCompositorFrameSinkRequest sink_request =
102 mojo::MakeRequest(&sink_info); 102 mojo::MakeRequest(&sink_info);
103 cc::mojom::MojoCompositorFrameSinkClientPtr client; 103 cc::mojom::MojoCompositorFrameSinkClientPtr client;
104 cc::mojom::MojoCompositorFrameSinkClientRequest client_request = 104 cc::mojom::MojoCompositorFrameSinkClientRequest client_request =
105 mojo::MakeRequest(&client); 105 mojo::MakeRequest(&client);
106 constexpr bool enable_surface_synchronization = true; 106 constexpr bool enable_surface_synchronization = true;
107 auto compositor_frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>( 107 auto compositor_frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>(
108 std::move(context_provider), gpu_memory_buffer_manager, 108 std::move(context_provider), nullptr, gpu_memory_buffer_manager, nullptr,
109 std::move(sink_info), std::move(client_request), 109 nullptr, std::move(sink_info), std::move(client_request),
sadrul 2017/05/29 16:56:47 Can you add comments for the null things? e.g.
110 enable_surface_synchronization); 110 enable_surface_synchronization);
111 window_tree_client_->AttachCompositorFrameSink( 111 window_tree_client_->AttachCompositorFrameSink(
112 server_id(), std::move(sink_request), std::move(client)); 112 server_id(), std::move(sink_request), std::move(client));
113 return std::move(compositor_frame_sink); 113 return std::move(compositor_frame_sink);
114 } 114 }
115 115
116 WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange( 116 WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange(
117 const ServerChangeType type, 117 const ServerChangeType type,
118 const ServerChangeData& data) { 118 const ServerChangeData& data) {
119 ServerChange change; 119 ServerChange change;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (!client_surface_embedder_) { 527 if (!client_surface_embedder_) {
528 client_surface_embedder_ = base::MakeUnique<ClientSurfaceEmbedder>( 528 client_surface_embedder_ = base::MakeUnique<ClientSurfaceEmbedder>(
529 window_, window_tree_client_->normal_client_area_insets_); 529 window_, window_tree_client_->normal_client_area_insets_);
530 } 530 }
531 531
532 client_surface_embedder_->SetPrimarySurfaceInfo(primary_surface_info_); 532 client_surface_embedder_->SetPrimarySurfaceInfo(primary_surface_info_);
533 client_surface_embedder_->SetFallbackSurfaceInfo(fallback_surface_info_); 533 client_surface_embedder_->SetFallbackSurfaceInfo(fallback_surface_info_);
534 } 534 }
535 535
536 } // namespace aura 536 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698