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

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

Issue 2626023007: Passing FrameSinkId to WindowCompositorFrameSink (Closed)
Patch Set: c Created 3 years, 11 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/aura/mus/window_compositor_frame_sink.cc ('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 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const ui::mojom::WindowTree::EmbedCallback& callback) { 72 const ui::mojom::WindowTree::EmbedCallback& callback) {
73 window_tree_client_->Embed(window_, std::move(client), flags, callback); 73 window_tree_client_->Embed(window_, std::move(client), flags, callback);
74 } 74 }
75 75
76 std::unique_ptr<WindowCompositorFrameSink> 76 std::unique_ptr<WindowCompositorFrameSink>
77 WindowPortMus::RequestCompositorFrameSink( 77 WindowPortMus::RequestCompositorFrameSink(
78 scoped_refptr<cc::ContextProvider> context_provider, 78 scoped_refptr<cc::ContextProvider> context_provider,
79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) { 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
80 std::unique_ptr<WindowCompositorFrameSinkBinding> 80 std::unique_ptr<WindowCompositorFrameSinkBinding>
81 compositor_frame_sink_binding; 81 compositor_frame_sink_binding;
82 cc::FrameSinkId frame_sink_id(server_id(), 0);
Fady Samuel 2017/01/13 19:39:05 No point in having a member variable
Saman Sami 2017/01/13 19:41:52 Done.
82 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = 83 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink =
83 WindowCompositorFrameSink::Create(std::move(context_provider), 84 WindowCompositorFrameSink::Create(
84 gpu_memory_buffer_manager, 85 frame_sink_id, std::move(context_provider), gpu_memory_buffer_manager,
Fady Samuel 2017/01/13 19:39:05 cc::FrameSinkId(server_id(), 0)
Saman Sami 2017/01/13 19:41:52 Done.
85 &compositor_frame_sink_binding); 86 &compositor_frame_sink_binding);
86 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding)); 87 AttachCompositorFrameSink(std::move(compositor_frame_sink_binding));
87 return compositor_frame_sink; 88 return compositor_frame_sink;
88 } 89 }
89 90
90 void WindowPortMus::AttachCompositorFrameSink( 91 void WindowPortMus::AttachCompositorFrameSink(
91 std::unique_ptr<WindowCompositorFrameSinkBinding> 92 std::unique_ptr<WindowCompositorFrameSinkBinding>
92 compositor_frame_sink_binding) { 93 compositor_frame_sink_binding) {
93 window_tree_client_->AttachCompositorFrameSink( 94 window_tree_client_->AttachCompositorFrameSink(
94 server_id(), 95 server_id(),
95 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_), 96 std::move(compositor_frame_sink_binding->compositor_frame_sink_request_),
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 change_data.property_name = 430 change_data.property_name =
430 GetPropertyConverter()->GetTransportNameForPropertyKey(key); 431 GetPropertyConverter()->GetTransportNameForPropertyKey(key);
431 // TODO(sky): investigate to see if we need to compare data. In particular do 432 // TODO(sky): investigate to see if we need to compare data. In particular do
432 // we ever have a case where changing a property cascades into changing the 433 // we ever have a case where changing a property cascades into changing the
433 // same property? 434 // same property?
434 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) 435 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data))
435 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); 436 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data));
436 } 437 }
437 438
438 } // namespace aura 439 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_compositor_frame_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698