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

Side by Side Diff: services/ui/ws/frame_generator.cc

Issue 2497303002: Fix ws::Display initialization order. (Closed)
Patch Set: Fix use after move in test. 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/ws/display_manager.cc ('k') | services/ui/ws/platform_display.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 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 "services/ui/ws/frame_generator.h" 5 #include "services/ui/ws/frame_generator.h"
6 6
7 #include "base/containers/adapters.h" 7 #include "base/containers/adapters.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/quads/render_pass.h" 9 #include "cc/quads/render_pass.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void FrameGenerator::OnAcceleratedWidgetAvailable( 70 void FrameGenerator::OnAcceleratedWidgetAvailable(
71 gfx::AcceleratedWidget widget) { 71 gfx::AcceleratedWidget widget) {
72 widget_ = widget; 72 widget_ = widget;
73 if (gpu_channel_ && widget != gfx::kNullAcceleratedWidget) { 73 if (gpu_channel_ && widget != gfx::kNullAcceleratedWidget) {
74 cc::mojom::MojoCompositorFrameSinkRequest request = 74 cc::mojom::MojoCompositorFrameSinkRequest request =
75 mojo::GetProxy(&compositor_frame_sink_); 75 mojo::GetProxy(&compositor_frame_sink_);
76 root_window_->CreateCompositorFrameSink( 76 root_window_->CreateCompositorFrameSink(
77 mojom::CompositorFrameSinkType::DEFAULT, widget_, 77 mojom::CompositorFrameSinkType::DEFAULT, widget_,
78 gpu_channel_->gpu_memory_buffer_manager(), 78 gpu_channel_->gpu_memory_buffer_manager(),
79 new SurfacesContextProvider(widget_, std::move(gpu_channel_)), 79 new SurfacesContextProvider(widget_, gpu_channel_),
80 std::move(request), binding_.CreateInterfacePtrAndBind()); 80 std::move(request), binding_.CreateInterfacePtrAndBind());
81 // TODO(fsamuel): This means we're always requesting a new BeginFrame signal 81 // TODO(fsamuel): This means we're always requesting a new BeginFrame signal
82 // even when we don't need it. Once surface ID propagation work is done, 82 // even when we don't need it. Once surface ID propagation work is done,
83 // this will not be necessary because FrameGenerator will only need a 83 // this will not be necessary because FrameGenerator will only need a
84 // BeginFrame if the window manager changes. 84 // BeginFrame if the window manager changes.
85 compositor_frame_sink_->SetNeedsBeginFrame(true); 85 compositor_frame_sink_->SetNeedsBeginFrame(true);
86 } 86 }
87 } 87 }
88 88
89 void FrameGenerator::DidReceiveCompositorFrameAck() {} 89 void FrameGenerator::DidReceiveCompositorFrameAck() {}
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 cc::SurfaceId underlay_surface_id = 304 cc::SurfaceId underlay_surface_id =
305 window->compositor_frame_sink_manager()->GetLatestSurfaceId( 305 window->compositor_frame_sink_manager()->GetLatestSurfaceId(
306 mojom::CompositorFrameSinkType::UNDERLAY); 306 mojom::CompositorFrameSinkType::UNDERLAY);
307 if (underlay_surface_id.is_valid()) 307 if (underlay_surface_id.is_valid())
308 ReleaseFrameSinkReference(underlay_surface_id.frame_sink_id()); 308 ReleaseFrameSinkReference(underlay_surface_id.frame_sink_id());
309 } 309 }
310 310
311 } // namespace ws 311 } // namespace ws
312 312
313 } // namespace ui 313 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/platform_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698