diff options
author | Chris Craik <ccraik@google.com> | 2012-06-02 15:10:23 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-02 15:10:23 -0700 |
commit | c29733197c3c7e09fb276016a8b492412ca9e64f (patch) | |
tree | 918e3de5269d015372568f056de5f51a2b3b091a | |
parent | f3e429507eba1a13e9afaf436e240fd81797c646 (diff) | |
parent | 06100d01966af4c0332fd964d9deb20f052c308d (diff) | |
download | external_webkit-c29733197c3c7e09fb276016a8b492412ca9e64f.zip external_webkit-c29733197c3c7e09fb276016a8b492412ca9e64f.tar.gz external_webkit-c29733197c3c7e09fb276016a8b492412ca9e64f.tar.bz2 |
am 06100d01: Merge "Disable clipping on the base surface" into jb-dev
* commit '06100d01966af4c0332fd964d9deb20f052c308d':
Disable clipping on the base surface
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp | 7 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/Surface.cpp | 18 |
2 files changed, 14 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp index 82af3bf..8069778 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp @@ -84,7 +84,12 @@ void BaseLayerAndroid::updatePositionsRecursive(const SkRect& visibleContentRect updateLayerPositions(visibleContentRect); TransformationMatrix ident; - FloatRect clip(0, 0, getWidth(), getHeight()); + + // Start with an unnecessarily large clip, since the base layer can + // dynamically increase in size to cover the viewport, and we cache its draw + // clip. This way the base layer will never have it's visible area clipped + // by its m_clippingRect, only the viewport. + FloatRect clip(0, 0, 1e10, 1e10); bool forcePositionCalculation = !m_positionsCalculated; float scale = 1.0f; diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp index 9df1a7a..d68051d 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp @@ -230,17 +230,15 @@ bool Surface::drawGL(bool layerTilesDisabled) if (singleLayer() && !getFirstLayer()->visible()) return false; - bool isBaseLayer = isBase() - || getFirstLayer()->subclassType() == LayerAndroid::FixedBackgroundImageLayer - || getFirstLayer()->subclassType() == LayerAndroid::ForegroundBaseLayer; - - FloatRect drawClip = getFirstLayer()->drawClip(); - if (!singleLayer()) { - for (unsigned int i = 1; i < m_layers.size(); i++) - drawClip.unite(m_layers[i]->drawClip()); + if (!isBase()) { + FloatRect drawClip = getFirstLayer()->drawClip(); + if (!singleLayer()) { + for (unsigned int i = 1; i < m_layers.size(); i++) + drawClip.unite(m_layers[i]->drawClip()); + } + FloatRect clippingRect = TilesManager::instance()->shader()->rectInInvViewCoord(drawClip); + TilesManager::instance()->shader()->clip(clippingRect); } - FloatRect clippingRect = TilesManager::instance()->shader()->rectInInvViewCoord(drawClip); - TilesManager::instance()->shader()->clip(clippingRect); bool askRedraw = false; if (m_surfaceBacking && !tilesDisabled) { |