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

Side by Side Diff: services/ui/public/cpp/window.cc

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/window_compositor_frame_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/public/cpp/window.h" 5 #include "services/ui/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 bool Window::IsDrawn() const { 266 bool Window::IsDrawn() const {
267 if (!visible_) 267 if (!visible_)
268 return false; 268 return false;
269 return parent_ ? parent_->IsDrawn() : parent_drawn_; 269 return parent_ ? parent_->IsDrawn() : parent_drawn_;
270 } 270 }
271 271
272 std::unique_ptr<WindowCompositorFrameSink> Window::RequestCompositorFrameSink( 272 std::unique_ptr<WindowCompositorFrameSink> Window::RequestCompositorFrameSink(
273 mojom::CompositorFrameSinkType type, 273 mojom::CompositorFrameSinkType type,
274 scoped_refptr<cc::ContextProvider> context_provider) { 274 scoped_refptr<cc::ContextProvider> context_provider,
275 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
275 std::unique_ptr<WindowCompositorFrameSinkBinding> 276 std::unique_ptr<WindowCompositorFrameSinkBinding>
276 compositor_frame_sink_binding; 277 compositor_frame_sink_binding;
277 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = 278 std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink =
278 WindowCompositorFrameSink::Create(std::move(context_provider), 279 WindowCompositorFrameSink::Create(std::move(context_provider),
280 gpu_memory_buffer_manager,
279 &compositor_frame_sink_binding); 281 &compositor_frame_sink_binding);
280 AttachCompositorFrameSink(type, std::move(compositor_frame_sink_binding)); 282 AttachCompositorFrameSink(type, std::move(compositor_frame_sink_binding));
281 return compositor_frame_sink; 283 return compositor_frame_sink;
282 } 284 }
283 285
284 void Window::AttachCompositorFrameSink( 286 void Window::AttachCompositorFrameSink(
285 mojom::CompositorFrameSinkType type, 287 mojom::CompositorFrameSinkType type,
286 std::unique_ptr<WindowCompositorFrameSinkBinding> 288 std::unique_ptr<WindowCompositorFrameSinkBinding>
287 compositor_frame_sink_binding) { 289 compositor_frame_sink_binding) {
288 window_tree()->AttachCompositorFrameSink( 290 window_tree()->AttachCompositorFrameSink(
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 notifier->NotifyWindowReordered(); 967 notifier->NotifyWindowReordered();
966 968
967 return true; 969 return true;
968 } 970 }
969 971
970 // static 972 // static
971 Window** Window::GetStackingTarget(Window* window) { 973 Window** Window::GetStackingTarget(Window* window) {
972 return &window->stacking_target_; 974 return &window->stacking_target_;
973 } 975 }
974 } // namespace ui 976 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/window_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698