[GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changin...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 13:35:09 +0000 (13:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 13:35:09 +0000 (13:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109226

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-02-08
Reviewed by Gustavo Noronha Silva.

Clutter has a different coordinate system from mac port's, so we don't need to
recalulate GraphicsLayer position after changing its anchor position.

Covered by existing ac tests.

* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::updateGeometry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp

index e1b2c7fef171ac9f02d5113d7b84c2bf1768b473..76d046891069c7446024104d5513342920586130 100644 (file)
@@ -1,3 +1,18 @@
+2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
+
+        [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
+        https://bugs.webkit.org/show_bug.cgi?id=109226
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Clutter has a different coordinate system from mac port's, so we don't need to
+        recalulate GraphicsLayer position after changing its anchor position.
+
+        Covered by existing ac tests.
+
+        * platform/graphics/clutter/GraphicsLayerClutter.cpp:
+        (WebCore::GraphicsLayerClutter::updateGeometry):
+
 2013-02-08  Mike West  <mkwst@chromium.org>
 
         Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
index 3c9a0c28362a54db97d8088884005386ab9732d1..d79918723edb143bb7e37f8fef6fc6ac287b67c1 100644 (file)
@@ -494,21 +494,10 @@ void GraphicsLayerClutter::commitLayerChangesBeforeSublayers(float pageScaleFact
 
 void GraphicsLayerClutter::updateGeometry(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
 {
-    FloatPoint scaledPosition;
-    FloatPoint3D scaledAnchorPoint;
-    FloatSize scaledSize;
-
-    // FIXME: Need to support scaling
-    scaledPosition = m_position;
-    scaledAnchorPoint = m_anchorPoint;
-    scaledSize = m_size;
-
-    FloatRect adjustedBounds(m_boundsOrigin , scaledSize);
-    FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * scaledSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * scaledSize.height());
-
-    clutter_actor_set_size(CLUTTER_ACTOR(m_layer.get()), adjustedBounds.width(), adjustedBounds.height());
-    clutter_actor_set_position(CLUTTER_ACTOR(m_layer.get()), adjustedPosition.x(), adjustedPosition.y());
-    graphicsLayerActorSetAnchorPoint(m_layer.get(), scaledAnchorPoint.x(), scaledAnchorPoint.y(), scaledAnchorPoint.z());
+    // FIXME: Need to support page scaling.
+    clutter_actor_set_position(CLUTTER_ACTOR(m_layer.get()), m_position.x(), m_position.y());
+    clutter_actor_set_size(CLUTTER_ACTOR(m_layer.get()), m_size.width(), m_size.height());
+    graphicsLayerActorSetAnchorPoint(m_layer.get(), m_anchorPoint.x(), m_anchorPoint.y(), m_anchorPoint.z());
 }
 
 // Each GraphicsLayer has the corresponding layer in the platform port.