diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-08-31 16:02:00 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-09-26 13:38:23 -0700 |
commit | 8fea66e503c97640d6bdb5b8e5ddcb27324b5866 (patch) | |
tree | cf111adb16bffde9d49a92fe688c391ccb9e55ce /Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | |
parent | 573d2754446fc611151ef424b4b87a525bcd006d (diff) | |
download | external_webkit-8fea66e503c97640d6bdb5b8e5ddcb27324b5866.zip external_webkit-8fea66e503c97640d6bdb5b8e5ddcb27324b5866.tar.gz external_webkit-8fea66e503c97640d6bdb5b8e5ddcb27324b5866.tar.bz2 |
Add shared images for layers
bug:5242595 bug:5218173
Change-Id: I37d395e85441671312aac3e236cc8276019aa990
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 40d25e4..7722e5a 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -630,6 +630,8 @@ bool GraphicsLayerAndroid::repaint() if (m_needsRepaint && m_haveImage && m_newImage) { // We need to tell the GL thread that we will need to repaint the // texture. Only do so if we effectively have a new image! + m_contentLayer->markAsDirty(m_dirtyRegion); + m_dirtyRegion.setEmpty(); m_contentLayer->needsRepaint(); m_newImage = false; m_needsRepaint = false; @@ -656,13 +658,7 @@ bool GraphicsLayerAndroid::paintContext(SkPicture* context, void GraphicsLayerAndroid::setNeedsDisplayInRect(const FloatRect& rect) { - for (unsigned int i = 0; i < m_children.size(); i++) { - GraphicsLayer* layer = m_children[i]; - if (layer) { - FloatRect childrenRect = m_transform.mapRect(rect); - layer->setNeedsDisplayInRect(childrenRect); - } - } + // rect is in the render object coordinates if (!m_haveImage && !drawsContent()) { LOG("(%x) setNeedsDisplay(%.2f,%.2f,%.2f,%.2f) doesn't have content, bypass...", @@ -848,6 +844,12 @@ void GraphicsLayerAndroid::setContentsToImage(Image* image) askForSync(); } } + if (m_haveImage && !image) { + m_contentLayer->setContentsImage(0); + m_imageRef = 0; + setNeedsDisplay(); + askForSync(); + } } void GraphicsLayerAndroid::setContentsToMedia(PlatformLayer* mediaLayer) |