[GTK][WPE] Fix the condition to decide whether the MediaPlayer can be rendered accele...
authormagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 07:45:12 +0000 (07:45 +0000)
committermagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 07:45:12 +0000 (07:45 +0000)
commit4d74da58c776b7b72da6499d8d9e84df4e95398a
tree9cbcf292278bee350b7d92a93981055c68ba40aa
parent226898b4c27a0a5fdf912c33dc6c5e2639831e9a
[GTK][WPE] Fix the condition to decide whether the MediaPlayer can be rendered accelerated
https://bugs.webkit.org/show_bug.cgi?id=172852

Reviewed by Michael Catanzaro.

Before this change, in order to determine whether the MediaPlayer rendering could be accelerated we
needed the player to have a renderer or it would return false. The renderer was needed in order to
access the RenderLayerCompositor and check whether the chrome would be overwriting the accelerated
compositing setting. But we don't have that option in WebKitGTK+ or WPE, so we can just check the
accelerated compositing setting directly.

Another problems with the approach before this change is that accelerated rendering was being disabled
when the video element was not visible, as there's no video renderer. Due to this, cases where the video
is painted through an accelerated canvas or webgl would not be using hardware accelerated copies.

Covered by existent tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::acceleratedRenderingStateChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp