From 211482b53e73a386e2aabb0d3acb92e0e7ea22d4 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Wed, 8 Dec 2010 11:37:30 -0800 Subject: Layers implementation in GL. - add textures management code for layers in TilesManager - add the layers drawing GL code - modify BaseLayerAndroid::drawGL() to paint the layers - modify TexturesGenerator to process layers painting requests Note: some further refactoring (when getting rid of SkLayer as a base class) will let us remove some redudant function, e.g. setAnchorPoint/setAnchorPointZ (bug:3292285) Change-Id: I3cc88575f331104d45c89e84ba27f3af755aa845 --- WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp') diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 5d1c86a..fa660da 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -276,12 +276,23 @@ void GraphicsLayerAndroid::setPosition(const FloatPoint& point) askForSync(); } +void GraphicsLayerAndroid::setPreserves3D(bool preserves3D) +{ + if (preserves3D == m_preserves3D) + return; + + GraphicsLayer::setPreserves3D(preserves3D); + m_contentLayer->setPreserves3D(preserves3D); + askForSync(); +} + void GraphicsLayerAndroid::setAnchorPoint(const FloatPoint3D& point) { if (point == m_anchorPoint) return; GraphicsLayer::setAnchorPoint(point); m_contentLayer->setAnchorPoint(point.x(), point.y()); + m_contentLayer->setAnchorPointZ(point.z()); askForSync(); } @@ -303,7 +314,6 @@ void GraphicsLayerAndroid::setTransform(const TransformationMatrix& t) GraphicsLayer::setTransform(t); m_contentLayer->setTransform(t); - askForSync(); } @@ -314,6 +324,7 @@ void GraphicsLayerAndroid::setChildrenTransform(const TransformationMatrix& t) LOG("(%x) setChildrenTransform", this); GraphicsLayer::setChildrenTransform(t); + m_contentLayer->setChildrenTransform(t); for (unsigned int i = 0; i < m_children.size(); i++) { GraphicsLayer* layer = m_children[i]; layer->setTransform(t); @@ -523,6 +534,7 @@ bool GraphicsLayerAndroid::repaint() m_contentLayer->getSize().width(), m_contentLayer->getSize().height()); + m_contentLayer->needsRepaint(); m_needsRepaint = false; m_invalidatedRects.clear(); -- cgit v1.1