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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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_tree_host_factory.cc ('k') | services/ui/ws/gpu_host.cc » ('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 <utility> 7 #include <utility>
8 8
9 #include "base/containers/adapters.h" 9 #include "base/containers/adapters.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 24 matching lines...) Expand all
35 // Invalidate WeakPtrs now to avoid callbacks back into the 35 // Invalidate WeakPtrs now to avoid callbacks back into the
36 // FrameGenerator during destruction of |compositor_frame_sink_|. 36 // FrameGenerator during destruction of |compositor_frame_sink_|.
37 weak_factory_.InvalidateWeakPtrs(); 37 weak_factory_.InvalidateWeakPtrs();
38 compositor_frame_sink_.reset(); 38 compositor_frame_sink_.reset();
39 } 39 }
40 40
41 void FrameGenerator::OnAcceleratedWidgetAvailable( 41 void FrameGenerator::OnAcceleratedWidgetAvailable(
42 gfx::AcceleratedWidget widget) { 42 gfx::AcceleratedWidget widget) {
43 DCHECK_NE(gfx::kNullAcceleratedWidget, widget); 43 DCHECK_NE(gfx::kNullAcceleratedWidget, widget);
44 cc::mojom::MojoCompositorFrameSinkRequest request = 44 cc::mojom::MojoCompositorFrameSinkRequest request =
45 mojo::GetProxy(&compositor_frame_sink_); 45 mojo::MakeRequest(&compositor_frame_sink_);
46 root_window_->CreateDisplayCompositorFrameSink( 46 root_window_->CreateDisplayCompositorFrameSink(
47 widget, std::move(request), binding_.CreateInterfacePtrAndBind()); 47 widget, std::move(request), binding_.CreateInterfacePtrAndBind());
48 // TODO(fsamuel): This means we're always requesting a new BeginFrame signal 48 // TODO(fsamuel): This means we're always requesting a new BeginFrame signal
49 // even when we don't need it. Once surface ID propagation work is done, 49 // even when we don't need it. Once surface ID propagation work is done,
50 // this will not be necessary because FrameGenerator will only need a 50 // this will not be necessary because FrameGenerator will only need a
51 // BeginFrame if the window manager changes. 51 // BeginFrame if the window manager changes.
52 compositor_frame_sink_->SetNeedsBeginFrame(true); 52 compositor_frame_sink_->SetNeedsBeginFrame(true);
53 } 53 }
54 54
55 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceId& surface_id, 55 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceId& surface_id,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 cc::SurfaceId underlay_surface_id = 341 cc::SurfaceId underlay_surface_id =
342 window->compositor_frame_sink_manager()->GetLatestSurfaceId( 342 window->compositor_frame_sink_manager()->GetLatestSurfaceId(
343 mojom::CompositorFrameSinkType::UNDERLAY); 343 mojom::CompositorFrameSinkType::UNDERLAY);
344 if (underlay_surface_id.is_valid()) 344 if (underlay_surface_id.is_valid())
345 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); 345 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id());
346 } 346 }
347 347
348 } // namespace ws 348 } // namespace ws
349 349
350 } // namespace ui 350 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_host_factory.cc ('k') | services/ui/ws/gpu_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698