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

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

Issue 2779633002: [cc] Remove remaining_frames from BeginFrameAck. (Closed)
Patch Set: Created 3 years, 9 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 "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 void FrameGenerator::SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) {} 96 void FrameGenerator::SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) {}
97 97
98 void FrameGenerator::SetExternalTilePriorityConstraints( 98 void FrameGenerator::SetExternalTilePriorityConstraints(
99 const gfx::Rect& viewport_rect, 99 const gfx::Rect& viewport_rect,
100 const gfx::Transform& transform) {} 100 const gfx::Transform& transform) {}
101 101
102 void FrameGenerator::OnBeginFrame(const cc::BeginFrameArgs& begin_frame_args) { 102 void FrameGenerator::OnBeginFrame(const cc::BeginFrameArgs& begin_frame_args) {
103 current_begin_frame_ack_ = cc::BeginFrameAck( 103 current_begin_frame_ack_ = cc::BeginFrameAck(
104 begin_frame_args.source_id, begin_frame_args.sequence_number, 104 begin_frame_args.source_id, begin_frame_args.sequence_number,
105 begin_frame_args.sequence_number, 0, false); 105 begin_frame_args.sequence_number, false);
106 if (begin_frame_args.type == cc::BeginFrameArgs::MISSED) { 106 if (begin_frame_args.type == cc::BeginFrameArgs::MISSED) {
107 begin_frame_source_->DidFinishFrame(this, current_begin_frame_ack_); 107 begin_frame_source_->DidFinishFrame(this, current_begin_frame_ack_);
108 return; 108 return;
109 } 109 }
110 110
111 current_begin_frame_ack_.has_damage = true; 111 current_begin_frame_ack_.has_damage = true;
112 last_begin_frame_args_ = begin_frame_args; 112 last_begin_frame_args_ = begin_frame_args;
113 113
114 // TODO(fsamuel): We should add a trace for generating a top level frame. 114 // TODO(fsamuel): We should add a trace for generating a top level frame.
115 cc::CompositorFrame frame(GenerateCompositorFrame()); 115 cc::CompositorFrame frame(GenerateCompositorFrame());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 observing_begin_frames_ = needs_begin_frame; 206 observing_begin_frames_ = needs_begin_frame;
207 if (needs_begin_frame) 207 if (needs_begin_frame)
208 begin_frame_source_->AddObserver(this); 208 begin_frame_source_->AddObserver(this);
209 else 209 else
210 begin_frame_source_->RemoveObserver(this); 210 begin_frame_source_->RemoveObserver(this);
211 } 211 }
212 212
213 } // namespace ws 213 } // namespace ws
214 214
215 } // namespace ui 215 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | services/ui/ws/frame_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698