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

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

Issue 2696233002: Mojo C++ bindings: remove some usage of AssociatedGroup from user code. (Closed)
Patch Set: . Created 3 years, 10 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 "services/ui/ws/frame_generator.h" 5 #include "services/ui/ws/frame_generator.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/adapters.h" 10 #include "base/containers/adapters.h"
(...skipping 27 matching lines...) Expand all
38 compositor_frame_sink_->SetNeedsBeginFrame(true); 38 compositor_frame_sink_->SetNeedsBeginFrame(true);
39 } 39 }
40 40
41 FrameGenerator::~FrameGenerator() { 41 FrameGenerator::~FrameGenerator() {
42 compositor_frame_sink_.reset(); 42 compositor_frame_sink_.reset();
43 } 43 }
44 44
45 void FrameGenerator::OnAcceleratedWidgetAvailable( 45 void FrameGenerator::OnAcceleratedWidgetAvailable(
46 gfx::AcceleratedWidget widget) { 46 gfx::AcceleratedWidget widget) {
47 DCHECK_NE(gfx::kNullAcceleratedWidget, widget); 47 DCHECK_NE(gfx::kNullAcceleratedWidget, widget);
48 auto associated_group =
49 root_window_->delegate()->GetDisplayCompositorAssociatedGroup();
50 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request = 48 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request =
51 mojo::MakeRequest(&compositor_frame_sink_, associated_group); 49 mojo::MakeRequest(&compositor_frame_sink_);
52 cc::mojom::DisplayPrivateAssociatedRequest display_request = 50 cc::mojom::DisplayPrivateAssociatedRequest display_request =
53 mojo::MakeRequest(&display_private_, associated_group); 51 mojo::MakeRequest(&display_private_);
54 root_window_->CreateDisplayCompositorFrameSink( 52 root_window_->CreateDisplayCompositorFrameSink(
55 widget, std::move(sink_request), binding_.CreateInterfacePtrAndBind(), 53 widget, std::move(sink_request), binding_.CreateInterfacePtrAndBind(),
56 std::move(display_request)); 54 std::move(display_request));
57 } 55 }
58 56
59 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) { 57 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
60 DCHECK(surface_info.id().is_valid()); 58 DCHECK(surface_info.id().is_valid());
61 59
62 // Only handle embedded surfaces changing here. The display root surface 60 // Only handle embedded surfaces changing here. The display root surface
63 // changing is handled immediately after the CompositorFrame is submitted. 61 // changing is handled immediately after the CompositorFrame is submitted.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 0 /* sorting-context_id */); 176 0 /* sorting-context_id */);
179 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); 177 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
180 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */, 178 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */,
181 bounds_at_origin /* visible_rect */, true /* needs_blending*/, 179 bounds_at_origin /* visible_rect */, true /* needs_blending*/,
182 window_manager_surface_info_.id()); 180 window_manager_surface_info_.id());
183 } 181 }
184 182
185 } // namespace ws 183 } // namespace ws
186 184
187 } // namespace ui 185 } // namespace ui
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/service_context.cc ('k') | services/ui/ws/server_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698