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

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

Issue 2710703005: GpuDisplayCompositorFrameSink => GpuRootCompositorFrameSink (Closed)
Patch Set: Update Mojom 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request = 48 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request =
49 mojo::MakeRequest(&compositor_frame_sink_); 49 mojo::MakeRequest(&compositor_frame_sink_);
50 cc::mojom::DisplayPrivateAssociatedRequest display_request = 50 cc::mojom::DisplayPrivateAssociatedRequest display_request =
51 mojo::MakeRequest(&display_private_); 51 mojo::MakeRequest(&display_private_);
52 root_window_->CreateDisplayCompositorFrameSink( 52 root_window_->CreateRootCompositorFrameSink(
53 widget, std::move(sink_request), binding_.CreateInterfacePtrAndBind(), 53 widget, std::move(sink_request), binding_.CreateInterfacePtrAndBind(),
54 std::move(display_request)); 54 std::move(display_request));
55 } 55 }
56 56
57 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) { 57 void FrameGenerator::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
58 DCHECK(surface_info.id().is_valid()); 58 DCHECK(surface_info.id().is_valid());
59 59
60 // Only handle embedded surfaces changing here. The display root surface 60 // Only handle embedded surfaces changing here. The display root surface
61 // changing is handled immediately after the CompositorFrame is submitted. 61 // changing is handled immediately after the CompositorFrame is submitted.
62 if (surface_info != window_manager_surface_info_) { 62 if (surface_info != window_manager_surface_info_) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); 178 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
179 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */, 179 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */,
180 bounds_at_origin /* visible_rect */, true /* needs_blending*/, 180 bounds_at_origin /* visible_rect */, true /* needs_blending*/,
181 window_manager_surface_info_.id(), 181 window_manager_surface_info_.id(),
182 cc::SurfaceDrawQuadType::PRIMARY, nullptr); 182 cc::SurfaceDrawQuadType::PRIMARY, nullptr);
183 } 183 }
184 184
185 } // namespace ws 185 } // namespace ws
186 186
187 } // namespace ui 187 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698