Skip to content
Permalink
Browse files
[TextureMapper] TextureMapperShaderProgram::setMatrix() should use Tr…
…ansformationMatrix::FloatMatrix4

https://bugs.webkit.org/show_bug.cgi?id=152042

Reviewed by Martin Robinson.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
called on the passed-in TransformationMatrix.


Canonical link: https://commits.webkit.org/170194@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Dec 9, 2015
1 parent a1020b1 commit ede1695b2bf445f12aafbdf166fc3a15f8aedc4c
Showing with 16 additions and 8 deletions.
  1. +13 −0 Source/WebCore/ChangeLog
  2. +3 −8 Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
@@ -1,3 +1,16 @@
2015-12-09 Zan Dobersek <zdobersek@igalia.com>

[TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatrix::FloatMatrix4
https://bugs.webkit.org/show_bug.cgi?id=152042

Reviewed by Martin Robinson.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
called on the passed-in TransformationMatrix.

2015-12-09 Zan Dobersek <zdobersek@igalia.com>

[Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
@@ -73,14 +73,9 @@ TextureMapperShaderProgram::TextureMapperShaderProgram(PassRefPtr<GraphicsContex

void TextureMapperShaderProgram::setMatrix(GC3Duint location, const TransformationMatrix& matrix)
{
GC3Dfloat matrixAsFloats[] = {
GC3Dfloat(matrix.m11()), GC3Dfloat(matrix.m12()), GC3Dfloat(matrix.m13()), GC3Dfloat(matrix.m14()),
GC3Dfloat(matrix.m21()), GC3Dfloat(matrix.m22()), GC3Dfloat(matrix.m23()), GC3Dfloat(matrix.m24()),
GC3Dfloat(matrix.m31()), GC3Dfloat(matrix.m32()), GC3Dfloat(matrix.m33()), GC3Dfloat(matrix.m34()),
GC3Dfloat(matrix.m41()), GC3Dfloat(matrix.m42()), GC3Dfloat(matrix.m43()), GC3Dfloat(matrix.m44())
};

m_context->uniformMatrix4fv(location, 1, false, matrixAsFloats);
TransformationMatrix::FloatMatrix4 floatMatrix;
matrix.toColumnMajorFloatArray(floatMatrix);
m_context->uniformMatrix4fv(location, 1, false, floatMatrix);
}

GC3Duint TextureMapperShaderProgram::getLocation(const AtomicString& name, VariableType type)

0 comments on commit ede1695

Please sign in to comment.