Title: [125068] trunk/Source/WebCore
Revision
125068
Author
toniki...@webkit.org
Date
2012-08-08 12:19:18 -0700 (Wed, 08 Aug 2012)

Log Message

[BlackBerry] Propagate GraphicsLayer::boundsOrigin down to the platform layers
https://bugs.webkit.org/show_bug.cgi?id=93478
PR #188657

Reviewed by Yong Li.
Patch by Antonio Gomes <ago...@rim.com>

This property will be set from both WebKit and Compositing/UI
threads in order to fast scroll block elements.

No new tests, as it is a mid-step patch.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setBoundsOrigin):
(WebCore):
(WebCore::GraphicsLayerBlackBerry::updateBoundsOrigin):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(GraphicsLayerBlackBerry):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::setBoundsOrigin):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::boundsOrigin):
(LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::updateLayersRecursive):
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::setBoundsOrigin):
(LayerWebKitThread):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125067 => 125068)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 19:19:18 UTC (rev 125068)
@@ -1,3 +1,33 @@
+2012-08-08  Antonio Gomes  <ago...@rim.com>
+
+        [BlackBerry] Propagate GraphicsLayer::boundsOrigin down to the platform layers
+        https://bugs.webkit.org/show_bug.cgi?id=93478
+        PR #188657
+
+        Reviewed by Yong Li.
+
+        This property will be set from both WebKit and Compositing/UI
+        threads in order to fast scroll block elements.
+
+        No new tests, as it is a mid-step patch.
+
+        * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
+        (WebCore::GraphicsLayerBlackBerry::setBoundsOrigin):
+        (WebCore):
+        (WebCore::GraphicsLayerBlackBerry::updateBoundsOrigin):
+        * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
+        (GraphicsLayerBlackBerry):
+        * platform/graphics/blackberry/LayerCompositingThread.h:
+        (WebCore::LayerCompositingThread::setBoundsOrigin):
+        * platform/graphics/blackberry/LayerData.h:
+        (WebCore::LayerData::boundsOrigin):
+        (LayerData):
+        * platform/graphics/blackberry/LayerRenderer.cpp:
+        (WebCore::LayerRenderer::updateLayersRecursive):
+        * platform/graphics/blackberry/LayerWebKitThread.h:
+        (WebCore::LayerWebKitThread::setBoundsOrigin):
+        (LayerWebKitThread):
+
 2012-08-08  Nate Chapin  <jap...@chromium.org>
 
         [chromium] Upstream android's FlingAnimator

Modified: trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp	2012-08-08 19:19:18 UTC (rev 125068)
@@ -313,6 +313,16 @@
 }
 #endif
 
+void GraphicsLayerBlackBerry::setBoundsOrigin(const FloatPoint& origin)
+{
+    if (origin == m_boundsOrigin)
+        return;
+
+    GraphicsLayer::setBoundsOrigin(origin);
+    updateBoundsOrigin();
+
+}
+
 void GraphicsLayerBlackBerry::setBackgroundColor(const Color& color)
 {
     if (m_backgroundColorSet && m_backgroundColor == color)
@@ -698,6 +708,11 @@
     updateLayerPosition();
 }
 
+void GraphicsLayerBlackBerry::updateBoundsOrigin()
+{
+    primaryLayer()->setBoundsOrigin(m_boundsOrigin);
+}
+
 void GraphicsLayerBlackBerry::updateTransform()
 {
     primaryLayer()->setTransform(m_transform);

Modified: trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.h (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.h	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.h	2012-08-08 19:19:18 UTC (rev 125068)
@@ -85,6 +85,8 @@
     const FilterOperations& filters() const { return m_filters; }
 #endif
 
+    virtual void setBoundsOrigin(const FloatPoint&);
+
     virtual void setBackgroundColor(const Color&);
     virtual void clearBackgroundColor();
 
@@ -143,6 +145,7 @@
     void updateLayerPosition();
     void updateLayerSize();
     void updateAnchorPoint();
+    void updateBoundsOrigin();
     void updateTransform();
     void updateChildrenTransform();
     void updateMasksToBounds();

Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.h (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.h	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.h	2012-08-08 19:19:18 UTC (rev 125068)
@@ -133,6 +133,7 @@
     // These functions can also be used to update animated properties in LayerAnimation.
     void setPosition(const FloatPoint& position) { m_position = position; }
     void setAnchorPoint(const FloatPoint& anchorPoint) { m_anchorPoint = anchorPoint; }
+    void setBoundsOrigin(const FloatPoint& boundsOrigin) { m_boundsOrigin = boundsOrigin; }
     void setBounds(const IntSize& bounds) { m_bounds = bounds; }
     void setSizeIsScaleInvariant(bool invariant) { m_sizeIsScaleInvariant = invariant; }
     void setTransform(const TransformationMatrix& matrix) { m_transform = matrix; }

Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h	2012-08-08 19:19:18 UTC (rev 125068)
@@ -143,6 +143,8 @@
 
     FloatPoint position() const { return m_position; }
 
+    FloatPoint boundsOrigin() const { return m_boundsOrigin; }
+
     // This is currently only used for perspective transform, see GraphicsLayer::setChildrenTransform()
     const TransformationMatrix& sublayerTransform() const { return m_sublayerTransform; }
 
@@ -193,6 +195,7 @@
     IntSize m_bounds;
     FloatPoint m_position;
     FloatPoint m_anchorPoint;
+    FloatPoint m_boundsOrigin;
     Color m_backgroundColor;
     Color m_borderColor;
 

Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp	2012-08-08 19:19:18 UTC (rev 125068)
@@ -800,6 +800,7 @@
     // The matrix passed down to the sublayers is therefore:
     // M[s] = M * Tr[-center]
     localMatrix.translate3d(-bounds.width() * 0.5, -bounds.height() * 0.5, 0);
+    localMatrix.translate(-layer->boundsOrigin().x(), -layer->boundsOrigin().y());
 
     const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->getSublayers();
     for (size_t i = 0; i < sublayers.size(); i++)

Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h (125067 => 125068)


--- trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h	2012-08-08 19:14:05 UTC (rev 125067)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h	2012-08-08 19:19:18 UTC (rev 125068)
@@ -107,6 +107,8 @@
 
     void setPosition(const FloatPoint& position) { m_position = position; setNeedsCommit(); }
 
+    void setBoundsOrigin(const FloatPoint& boundsOrigin) { m_boundsOrigin = boundsOrigin; setNeedsCommit(); }
+
     const LayerWebKitThread* rootLayer() const;
 
     void removeAllSublayers();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to