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

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

Issue 2612113002: Removing ServerWindowCompositorFrameSinkManager::ShouldDraw() (Closed)
Patch Set: Created 3 years, 11 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 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 frame.metadata.device_scale_factor = device_scale_factor_; 153 frame.metadata.device_scale_factor = device_scale_factor_;
154 154
155 return frame; 155 return frame;
156 } 156 }
157 157
158 void FrameGenerator::DrawWindow(cc::RenderPass* pass, ServerWindow* window) { 158 void FrameGenerator::DrawWindow(cc::RenderPass* pass, ServerWindow* window) {
159 if (!window->visible()) 159 if (!window->visible())
160 return; 160 return;
161 161
162 if (!window->compositor_frame_sink_manager() || 162 if (!window->compositor_frame_sink_manager())
163 !window->compositor_frame_sink_manager()->ShouldDraw())
164 return; 163 return;
165 164
166 cc::SurfaceId default_surface_id = 165 cc::SurfaceId default_surface_id =
167 window->compositor_frame_sink_manager()->GetLatestSurfaceId( 166 window->compositor_frame_sink_manager()->GetLatestSurfaceId(
168 mojom::CompositorFrameSinkType::DEFAULT); 167 mojom::CompositorFrameSinkType::DEFAULT);
169 168
170 if (!default_surface_id.is_valid()) 169 if (!default_surface_id.is_valid())
171 return; 170 return;
172 171
173 gfx::Transform quad_to_target_transform; 172 gfx::Transform quad_to_target_transform;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 cc::SurfaceId underlay_surface_id = 301 cc::SurfaceId underlay_surface_id =
303 window->compositor_frame_sink_manager()->GetLatestSurfaceId( 302 window->compositor_frame_sink_manager()->GetLatestSurfaceId(
304 mojom::CompositorFrameSinkType::UNDERLAY); 303 mojom::CompositorFrameSinkType::UNDERLAY);
305 if (underlay_surface_id.is_valid()) 304 if (underlay_surface_id.is_valid())
306 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); 305 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id());
307 } 306 }
308 307
309 } // namespace ws 308 } // namespace ws
310 309
311 } // namespace ui 310 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/mus_constants.mojom ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698