[GTK] Copying video textures to webgl should not depend on cairo-gl
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2016 10:53:28 +0000 (10:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2016 10:53:28 +0000 (10:53 +0000)
commit0b4b81e881a9c81a1d7efb540f37efda7070b791
tree56853837f0bfc7a091f73f98346314b28aad3427
parentf98134c876874b83ff8a090ed9cd111bd3daf1d8
[GTK] Copying video textures to webgl should not depend on cairo-gl
https://bugs.webkit.org/show_bug.cgi?id=162904

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-06
Reviewed by Žan Doberšek.

Perform the texture copy without using cairo-gl.

Covered by existent tests.

* platform/GStreamer.cmake:
Add the new VideoTextureCopierGStreamer class to the build.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
Use VideoTextureCopierGStreamer to perform the copy.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Add a VideoTextureCopierGStreamer as a class attribute.
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp: Added.
(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):
Recalculates the matrix used as the texture coordinates transformation.
(WebCore::VideoTextureCopierGStreamer::updateTransformationMatrix):
Recalculates the matrices used as the vertices coordinates transformation.
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
Performs the texture copy by using a shader that applies the rotation needed to follow
the video orientation.
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/GStreamer.cmake
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.h [new file with mode: 0644]