Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[TexMap] Remove GraphicsContext3D usage from TextureMapperShaderProgram
https://bugs.webkit.org/show_bug.cgi?id=175425 Reviewed by Žan Doberšek. Remove usage of the GraphicsContext3D class in TextureMapperShaderProgram. Direct OpenGL API calls, types and constants are used instead. By removing GraphicsContext3D, we don't use ANGLE anymore to perform the shader adaptation to the used OpenGL/GLES2 version, so we need to do that inside TextureMapperShaderProgram. The main changes required for this are adding the #version directive and use in/out to define input/output parameters when using OpenGL >= 3.2, and defining the default precision only when using GLES2. Besides that, now that VideoTextureCopierGStreamer doesn't have its own GraphicsContext3D, we need to add a VAO to it when using OpenGL >= 3.2. Based on a previous patch by Žan Doberšek <zdobersek@igalia.com>. No behavior change. * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp: (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer): (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer): (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture): * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGLData::getShaderProgram): (WebCore::prepareFilterProgram): (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::drawFiltered): * platform/graphics/texmap/TextureMapperShaderProgram.cpp: (WebCore::TextureMapperShaderProgram::create): (WebCore::getShaderLog): (WebCore::getProgramLog): (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram): (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram): (WebCore::TextureMapperShaderProgram::setMatrix): (WebCore::TextureMapperShaderProgram::getLocation): * platform/graphics/texmap/TextureMapperShaderProgram.h: (WebCore::TextureMapperShaderProgram::programID const): Canonical link: https://commits.webkit.org/194829@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
248 additions
and 70 deletions.
- +45 −0 Source/WebCore/ChangeLog
- +15 −8 Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
- +3 −0 Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.h
- +4 −5 Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
- +170 −44 Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
- +11 −13 Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.