summaryrefslogtreecommitdiffstats
path: root/media/base/mac
diff options
context:
space:
mode:
authordalecurtis <dalecurtis@chromium.org>2015-04-30 18:48:05 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-01 01:48:50 +0000
commit3c36fc4302b32f1db2b86a4b91729faeefe44898 (patch)
tree3eab8059ad6b0a941ec398a812c2a29343816dda /media/base/mac
parentf76f3405ad9bae1ef3725046169f7cc4e34a6dbb (diff)
downloadchromium_src-3c36fc4302b32f1db2b86a4b91729faeefe44898.zip
chromium_src-3c36fc4302b32f1db2b86a4b91729faeefe44898.tar.gz
chromium_src-3c36fc4302b32f1db2b86a4b91729faeefe44898.tar.bz2
Introduce cadence based VideoRendererAlgorithm.
This is the engine which will power the new video rendering pipeline! VideoRendererImpl will use this to manage frame selection (as audio uses a similarly named AudioRendererAlgorithm). It attempts to first find a cadence match for a set of frames (i.e. 30fps in 60Hz would have each frame displayed for two render intervals). If it can not find a cadence match, it attempts to find the frame which covers the vsync interval the most. If no frame covers the interval it then chooses the frame which is closest to the deadline. Cadence fitting is based on a calculation of how long it would take for a frame to be repeated or dropped if the cadence is forced from say X.# to just X.0. It handles both integer (30fps in 60Hz) and fractional cadences (120fps in 60Hz). It uses a hysteresis of 100ms to avoid oscillation of the cadence. Clients may use have a secondary pumping mechanism which can expire frames which fall too far behind the current media time; this is to handle cases where the compositor has stopped providing callbacks. Testing shows it's significantly smoother than the existing rendering pipeline! \o/ Profiling notes over 45 minutes of simulated time: - 83ms, UpdateFrameStatistics() most expensive. - 73ms, for removal of frames from the deque. - 20ms, for CalculateCadence(). Overall nothing is much of a hot spot, 45 minutes of simulated time takes ~400ms to run. BUG=439548 TEST=new unittest. Review URL: https://codereview.chromium.org/1021943002 Cr-Commit-Position: refs/heads/master@{#327864}
Diffstat (limited to 'media/base/mac')
0 files changed, 0 insertions, 0 deletions