Title: [138487] trunk/Source/WebCore
Revision
138487
Author
[email protected]
Date
2012-12-26 16:38:46 -0800 (Wed, 26 Dec 2012)

Log Message

[TexMap] A Minor optimization of GraphicsLayerTransform.
https://bugs.webkit.org/show_bug.cgi?id=105758

Patch by Huang Dongsung <[email protected]> on 2012-12-26
Reviewed by Noam Rosenthal.

Only multiply the transformation matrices if the paramaters are actually
changed.

This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
and potentially setAnimatedTransform().

No new tests. Refactoring only.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::setPosition):
(WebCore::GraphicsLayerTransform::setSize):
(WebCore::GraphicsLayerTransform::setAnchorPoint):
(WebCore::GraphicsLayerTransform::setFlattening):
(WebCore::GraphicsLayerTransform::setLocalTransform):
(WebCore::GraphicsLayerTransform::setChildrenTransform):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138486 => 138487)


--- trunk/Source/WebCore/ChangeLog	2012-12-26 23:24:20 UTC (rev 138486)
+++ trunk/Source/WebCore/ChangeLog	2012-12-27 00:38:46 UTC (rev 138487)
@@ -1,5 +1,28 @@
 2012-12-26  Huang Dongsung  <[email protected]>
 
+        [TexMap] A Minor optimization of GraphicsLayerTransform.
+        https://bugs.webkit.org/show_bug.cgi?id=105758
+
+        Reviewed by Noam Rosenthal.
+
+        Only multiply the transformation matrices if the paramaters are actually
+        changed.
+
+        This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
+        and potentially setAnimatedTransform().
+
+        No new tests. Refactoring only.
+
+        * platform/graphics/GraphicsLayerTransform.cpp:
+        (WebCore::GraphicsLayerTransform::setPosition):
+        (WebCore::GraphicsLayerTransform::setSize):
+        (WebCore::GraphicsLayerTransform::setAnchorPoint):
+        (WebCore::GraphicsLayerTransform::setFlattening):
+        (WebCore::GraphicsLayerTransform::setLocalTransform):
+        (WebCore::GraphicsLayerTransform::setChildrenTransform):
+
+2012-12-26  Huang Dongsung  <[email protected]>
+
         [TexMap] Remove unused members and methods in TextureMapperLayer.
         https://bugs.webkit.org/show_bug.cgi?id=105755
 

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerTransform.cpp (138486 => 138487)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayerTransform.cpp	2012-12-26 23:24:20 UTC (rev 138486)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerTransform.cpp	2012-12-27 00:38:46 UTC (rev 138487)
@@ -31,36 +31,48 @@
 
 void GraphicsLayerTransform::setPosition(const FloatPoint& position)
 {
+    if (m_position == position)
+        return;
     m_position = position;
     m_dirty = true;
 }
 
 void GraphicsLayerTransform::setSize(const FloatSize& size)
 {
+    if (m_size == size)
+        return;
     m_size = size;
     m_dirty = true;
 }
 
 void GraphicsLayerTransform::setAnchorPoint(const FloatPoint3D& anchorPoint)
 {
+    if (m_anchorPoint == anchorPoint)
+        return;
     m_anchorPoint = anchorPoint;
     m_dirty = true;
 }
 
 void GraphicsLayerTransform::setFlattening(bool flattening)
 {
+    if (m_flattening == flattening)
+        return;
     m_flattening = flattening;
     m_dirty = true;
 }
 
 void GraphicsLayerTransform::setLocalTransform(const TransformationMatrix& transform)
 {
+    if (m_local == transform)
+        return;
     m_local = transform;
     m_dirty = true;
 }
 
 void GraphicsLayerTransform::setChildrenTransform(const TransformationMatrix& transform)
 {
+    if (m_children == transform)
+        return;
     m_children = transform;
     m_dirty = true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to