[TexMap] Clean up TextureMapperShaderProgram
https://bugs.webkit.org/show_bug.cgi?id=157302
Reviewed by Carlos Garcia Campos.
Clean up the header and the implementation file of the
TextureMapperShaderProgram class. Reference the GraphicsContext3D
object through a Ref<>, and have the context() return a reference,
not a pointer.
Sort the parts of the implementation file into something more
sensible. StringBuilder usage in create() is improved. getLocation()
only needs to do one lookup in the m_variables map by using ensure().
No new tests -- no change in behavior.
* platform/graphics/surfaces/GLTransportSurface.cpp:
(WebCore::GLTransportSurface::initializeShaderProgram):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::getShaderProgram):
(WebCore::prepareFilterProgram):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):
(WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::setMatrix):
(WebCore::TextureMapperShaderProgram::getLocation):
* platform/graphics/texmap/TextureMapperShaderProgram.h:
(WebCore::TextureMapperShaderProgram::context):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed