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

Unified Diff: media/filters/video_renderer_algorithm.cc

Issue 1083383005: Connect the new video rendering path to the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vra
Patch Set: Fix layout tests. Created 5 years, 8 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: media/filters/video_renderer_algorithm.cc
diff --git a/media/filters/video_renderer_algorithm.cc b/media/filters/video_renderer_algorithm.cc
index 6be5db08c6d6e376cf58400c20ef851df0c93c41..695de7ec25d1e7667d72e58aa6f351cb933d84a0 100644
--- a/media/filters/video_renderer_algorithm.cc
+++ b/media/filters/video_renderer_algorithm.cc
@@ -201,15 +201,16 @@ scoped_refptr<VideoFrame> VideoRendererAlgorithm::Render(
}
size_t VideoRendererAlgorithm::RemoveExpiredFrames(base::TimeTicks deadline) {
+ // Update |last_deadline_max_| if it's no longer accurate; this should always
+ // be done or EffectiveFramesQueued() may never expire the last frame.
+ if (deadline > last_deadline_max_)
+ last_deadline_max_ = deadline;
+
if (!UpdateFrameStatistics() || frame_queue_.size() < 2)
return 0;
DCHECK_GT(average_frame_duration_, base::TimeDelta());
- // Update |last_deadline_max_| if it's no longer accurate.
- if (deadline > last_deadline_max_)
- last_deadline_max_ = deadline;
-
// Finds and removes all frames which are too old to be used; I.e., the end of
// their render interval is further than |max_acceptable_drift_| from the
// given |deadline|.

Powered by Google App Engine
This is Rietveld 408576698