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

Unified Diff: content/common/gpu/media/rendering_helper.h

Issue 590403004: rendering_helper - Schedule RenderContent() based on VSync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/rendering_helper.h
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h
index ce7f4e192b57e6ad448e6f697655b6970e3c5bdd..b080f6816ce180d517b655e212ea5150fadb77df 100644
--- a/content/common/gpu/media/rendering_helper.h
+++ b/content/common/gpu/media/rendering_helper.h
@@ -129,17 +129,14 @@ class RenderingHelper {
// The rect on the screen where the video will be rendered.
gfx::Rect render_area;
- // True if the last (and the only one) frame in pending_frames has
- // been rendered. We keep the last remaining frame in pending_frames even
- // after it has been rendered, so that we have something to display if the
- // client is falling behind on providing us with new frames during
- // timer-driven playback.
- bool last_frame_rendered;
-
// True if there won't be any new video frames comming.
bool is_flushing;
- // The number of frames need to be dropped to catch up the rendering.
+ // The number of frames need to be dropped to catch up the rendering. We
+ // always keep the last remaining frame in pending_frames even after it
+ // has been rendered, so that we have something to display if the client
+ // is falling behind on providing us with new frames during timer-driven
+ // playback.
int frames_to_drop;
// The video frames pending for rendering.
@@ -157,6 +154,13 @@ class RenderingHelper {
void LayoutRenderingAreas(const std::vector<gfx::Size>& window_sizes);
+ void UpdateVSyncParameters(base::WaitableEvent* done,
+ const base::TimeTicks timebase,
+ const base::TimeDelta interval);
+
+ void DropOneFrameForAllVideos();
+ void ScheduleNextRenderContent();
+
// Render |texture_id| to the current view port of the screen using target
// |texture_target|.
void RenderTexture(uint32 texture_target, uint32 texture_id);
@@ -182,6 +186,8 @@ class RenderingHelper {
base::TimeDelta frame_duration_;
base::TimeTicks scheduled_render_time_;
base::CancelableClosure render_task_;
+ base::TimeTicks vsync_timebase_;
+ base::TimeDelta vsync_interval_;
DISALLOW_COPY_AND_ASSIGN(RenderingHelper);
};
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698