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

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

Issue 2280723004: services/ui: Remove unwanted gpu dependency from services/ui/surfaces. (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « services/ui/ws/DEPS ('k') | no next file » | 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"
11 #include "cc/quads/shared_quad_state.h" 11 #include "cc/quads/shared_quad_state.h"
12 #include "cc/quads/surface_draw_quad.h" 12 #include "cc/quads/surface_draw_quad.h"
13 #include "services/ui/gpu/gpu_service_internal.h"
13 #include "services/ui/surfaces/display_compositor.h" 14 #include "services/ui/surfaces/display_compositor.h"
14 #include "services/ui/ws/frame_generator_delegate.h" 15 #include "services/ui/ws/frame_generator_delegate.h"
15 #include "services/ui/ws/server_window.h" 16 #include "services/ui/ws/server_window.h"
16 #include "services/ui/ws/server_window_surface.h" 17 #include "services/ui/ws/server_window_surface.h"
17 #include "services/ui/ws/server_window_surface_manager.h" 18 #include "services/ui/ws/server_window_surface_manager.h"
18 19
19 namespace ui { 20 namespace ui {
20 21
21 namespace ws { 22 namespace ws {
22 23
(...skipping 15 matching lines...) Expand all
38 39
39 void FrameGenerator::RequestRedraw(const gfx::Rect& redraw_region) { 40 void FrameGenerator::RequestRedraw(const gfx::Rect& redraw_region) {
40 dirty_rect_.Union(redraw_region); 41 dirty_rect_.Union(redraw_region);
41 WantToDraw(); 42 WantToDraw();
42 } 43 }
43 44
44 void FrameGenerator::OnAcceleratedWidgetAvailable( 45 void FrameGenerator::OnAcceleratedWidgetAvailable(
45 gfx::AcceleratedWidget widget) { 46 gfx::AcceleratedWidget widget) {
46 if (widget != gfx::kNullAcceleratedWidget) { 47 if (widget != gfx::kNullAcceleratedWidget) {
47 display_compositor_.reset(new DisplayCompositor( 48 display_compositor_.reset(new DisplayCompositor(
48 base::ThreadTaskRunnerHandle::Get(), widget, surfaces_state_)); 49 base::ThreadTaskRunnerHandle::Get(), widget,
50 GpuServiceInternal::GetInstance()->gpu_channel_local(),
51 surfaces_state_));
49 } 52 }
50 } 53 }
51 54
52 void FrameGenerator::RequestCopyOfOutput( 55 void FrameGenerator::RequestCopyOfOutput(
53 std::unique_ptr<cc::CopyOutputRequest> output_request) { 56 std::unique_ptr<cc::CopyOutputRequest> output_request) {
54 if (display_compositor_) 57 if (display_compositor_)
55 display_compositor_->RequestCopyOfOutput(std::move(output_request)); 58 display_compositor_->RequestCopyOfOutput(std::move(output_request));
56 } 59 }
57 60
58 void FrameGenerator::WantToDraw() { 61 void FrameGenerator::WantToDraw() {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 gfx::Rect() /* opaque_rect */, 215 gfx::Rect() /* opaque_rect */,
213 bounds_at_origin /* visible_rect */, true /* needs_blending*/, 216 bounds_at_origin /* visible_rect */, true /* needs_blending*/,
214 underlay_surface->id()); 217 underlay_surface->id());
215 DCHECK(!underlay_surface->may_contain_video()); 218 DCHECK(!underlay_surface->may_contain_video());
216 } 219 }
217 } 220 }
218 221
219 } // namespace ws 222 } // namespace ws
220 223
221 } // namespace ui 224 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698