Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (197674 => 197675)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-03-07 11:30:57 UTC (rev 197674)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-03-07 11:31:42 UTC (rev 197675)
@@ -1,5 +1,24 @@
2016-02-29 Zan Dobersek <[email protected]>
+ TextureMapperGL: simplify TransformationMatrix copies in draw(), beginClip()
+ https://bugs.webkit.org/show_bug.cgi?id=154791
+
+ Reviewed by Carlos Garcia Campos.
+
+ In both functions, the passed-in model-view matrix is first copied, multiplied
+ against a rect-to-rect TransformationMatrix, and then assigned into a local
+ TransformationMatrix variable, which causes another copy due to the multiply()
+ function returning a reference to the modified object.
+
+ To avoid the last copy, first copy the model-view matrix into a local variable,
+ and multiply the rect-to-rect TransformationMatrix into the new object afterwards.
+
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::draw):
+ (WebCore::TextureMapperGL::beginClip):
+
+2016-02-29 Zan Dobersek <[email protected]>
+
ImageBufferCairo should support OpenGL ES 2 configurations
https://bugs.webkit.org/show_bug.cgi?id=154790
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (197674 => 197675)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2016-03-07 11:30:57 UTC (rev 197674)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2016-03-07 11:31:42 UTC (rev 197675)
@@ -528,8 +528,8 @@
void TextureMapperGL::draw(const FloatRect& rect, const TransformationMatrix& modelViewMatrix, TextureMapperShaderProgram* shaderProgram, GC3Denum drawingMode, Flags flags)
{
- TransformationMatrix matrix =
- TransformationMatrix(modelViewMatrix).multiply(TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), rect));
+ TransformationMatrix matrix(modelViewMatrix);
+ matrix.multiply(TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), rect));
m_context3D->enableVertexAttribArray(shaderProgram->vertexLocation());
shaderProgram->setMatrix(shaderProgram->modelViewMatrixLocation(), matrix);
@@ -676,8 +676,8 @@
const GC3Dfloat unitRect[] = {0, 0, 1, 0, 1, 1, 0, 1};
m_context3D->vertexAttribPointer(program->vertexLocation(), 2, GraphicsContext3D::FLOAT, false, 0, GC3Dintptr(unitRect));
- TransformationMatrix matrix = TransformationMatrix(modelViewMatrix)
- .multiply(TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), targetRect));
+ TransformationMatrix matrix(modelViewMatrix);
+ matrix.multiply(TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), targetRect));
static const TransformationMatrix fullProjectionMatrix = TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), FloatRect(-1, -1, 2, 2));