only force youtube web entities to 30 FPS

This commit is contained in:
Stephen Birarda 2017-02-27 09:43:02 -08:00
parent 2ceb3d85bd
commit d18936ea18

View file

@ -113,7 +113,14 @@ bool RenderableWebEntityItem::buildWebSurface(QSharedPointer<EntityTreeRenderer>
// FIXME, the max FPS could be better managed by being dynamic (based on the number of current surfaces
// and the current rendering load)
_webSurface->setMaxFps(30);
// We special case YouTube URLs since we know they are videos that we should play with at least 30 FPS.
if (QUrl(_sourceUrl).host().endsWith("youtube.com", Qt::CaseInsensitive)) {
_webSurface->setMaxFps(30);
} else {
_webSurface->setMaxFps(10);
}
// The lifetime of the QML surface MUST be managed by the main thread
// Additionally, we MUST use local variables copied by value, rather than