diff options
author | Nicolas Roard <nicolas@android.com> | 2010-12-08 11:37:30 -0800 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2010-12-16 13:12:03 -0800 |
commit | 211482b53e73a386e2aabb0d3acb92e0e7ea22d4 (patch) | |
tree | 22d211edc86483739ac9af68fd25d1d90470d26d /WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | |
parent | 6fc858d42732739e4a3b628b4953a8a279e8dc3d (diff) | |
download | external_webkit-211482b53e73a386e2aabb0d3acb92e0e7ea22d4.zip external_webkit-211482b53e73a386e2aabb0d3acb92e0e7ea22d4.tar.gz external_webkit-211482b53e73a386e2aabb0d3acb92e0e7ea22d4.tar.bz2 |
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
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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(); |