summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-06-02 15:12:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-02 15:12:12 -0700
commit694d4b356b21c9d78cf5ba3ce101b0a76a23f859 (patch)
treef46393b7496a9cb642bead1f6bb89ba371f3099a /Source/WebCore/platform/graphics
parent3eb38b4493390e66ef4856444ddd42177649d500 (diff)
parentc29733197c3c7e09fb276016a8b492412ca9e64f (diff)
downloadexternal_webkit-694d4b356b21c9d78cf5ba3ce101b0a76a23f859.zip
external_webkit-694d4b356b21c9d78cf5ba3ce101b0a76a23f859.tar.gz
external_webkit-694d4b356b21c9d78cf5ba3ce101b0a76a23f859.tar.bz2
am c2973319: am 06100d01: Merge "Disable clipping on the base surface" into jb-dev
* commit 'c29733197c3c7e09fb276016a8b492412ca9e64f': Disable clipping on the base surface
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp7
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.cpp18
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) {