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

Unified Diff: services/ui/ws/frame_generator.cc

Issue 2755573002: Add FrameGenerator Unit Tests (Closed)
Patch Set: ReferencedSurfaces() 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index 30b17f3da99bf188dcddf76cbfd9508f4e87a110..0cbb8262dcac07a4409c55c4746d426d382868a2 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -93,8 +93,10 @@ void FrameGenerator::SetExternalTilePriorityConstraints(
const gfx::Transform& transform) {}
void FrameGenerator::OnBeginFrame(const cc::BeginFrameArgs& begin_frame_args) {
- if (!root_window_->visible())
+ if (!root_window_->visible() ||
+ begin_frame_args.type == cc::BeginFrameArgs::MISSED) {
return;
+ }
// TODO(fsamuel): We should add a trace for generating a top level frame.
cc::CompositorFrame frame(GenerateCompositorFrame(root_window_->bounds()));
@@ -187,13 +189,13 @@ void FrameGenerator::SetNeedsBeginFrame(bool needs_begin_frame) {
return;
if (needs_begin_frame) {
- begin_frame_source_->AddObserver(this);
observing_begin_frames_ = true;
Fady Samuel 2017/03/17 14:06:40 So I was looking at compositor_frame_sink_support.
Alex Z. 2017/03/17 14:43:00 Done.
+ begin_frame_source_->AddObserver(this);
return;
}
- begin_frame_source_->RemoveObserver(this);
observing_begin_frames_ = false;
+ begin_frame_source_->RemoveObserver(this);
}
} // namespace ws

Powered by Google App Engine
This is Rietveld 408576698