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

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

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: Created 3 years, 7 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 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 compositor_frame_sink_->BeginFrameDidNotProduceFrame(
109 current_begin_frame_ack_);
108 return; 110 return;
109 } 111 }
110 112
111 current_begin_frame_ack_.has_damage = true; 113 current_begin_frame_ack_.has_damage = true;
112 last_begin_frame_args_ = begin_frame_args; 114 last_begin_frame_args_ = begin_frame_args;
113 115
114 // TODO(fsamuel): We should add a trace for generating a top level frame. 116 // TODO(fsamuel): We should add a trace for generating a top level frame.
115 cc::CompositorFrame frame(GenerateCompositorFrame()); 117 cc::CompositorFrame frame(GenerateCompositorFrame());
116 118
117 compositor_frame_sink_->SubmitCompositorFrame(std::move(frame)); 119 compositor_frame_sink_->SubmitCompositorFrame(std::move(frame));
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 observing_begin_frames_ = needs_begin_frame; 208 observing_begin_frames_ = needs_begin_frame;
207 if (needs_begin_frame) 209 if (needs_begin_frame)
208 begin_frame_source_->AddObserver(this); 210 begin_frame_source_->AddObserver(this);
209 else 211 else
210 begin_frame_source_->RemoveObserver(this); 212 begin_frame_source_->RemoveObserver(this);
211 } 213 }
212 214
213 } // namespace ws 215 } // namespace ws
214 216
215 } // namespace ui 217 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698