diff options
author | Chris Craik <ccraik@google.com> | 2012-06-05 15:02:29 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-05 15:02:29 -0700 |
commit | 185bce43e5c10ce535c5397a0282770f6ad694cf (patch) | |
tree | 8bbc53c2b5a3fe88c99e4e172d80c910d5fb7112 /Source | |
parent | 17b3099982f6143d60ef0c88efdbb2c04b3fd294 (diff) | |
parent | 16a85ada902e896fca5d91e258d0ab0f2f4c0250 (diff) | |
download | external_webkit-185bce43e5c10ce535c5397a0282770f6ad694cf.zip external_webkit-185bce43e5c10ce535c5397a0282770f6ad694cf.tar.gz external_webkit-185bce43e5c10ce535c5397a0282770f6ad694cf.tar.bz2 |
am 16a85ada: am d3fa9c80: Reduce base layer false clip size to avoid rounding issues
* commit '16a85ada902e896fca5d91e258d0ab0f2f4c0250':
Reduce base layer false clip size to avoid rounding issues
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp index 8069778..9ee97ac 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp @@ -89,7 +89,8 @@ void BaseLayerAndroid::updatePositionsRecursive(const SkRect& visibleContentRect // 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); + // Note: values larger than this suffer from floating point rounding issues + FloatRect clip(0, 0, 1e7, 1e7); bool forcePositionCalculation = !m_positionsCalculated; float scale = 1.0f; diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 0f01fe2..d709a9c 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -273,6 +273,9 @@ void LayerAndroid::addDirtyArea() return; } + // TODO: rewrite this to handle partial invalidate, and to handle base + // layer's large clip correctly + IntSize layerSize(getSize().width(), getSize().height()); FloatRect area = @@ -284,6 +287,7 @@ void LayerAndroid::addDirtyArea() area.intersect(clip); IntRect dirtyArea(area.x(), area.y(), area.width(), area.height()); + state()->addDirtyArea(dirtyArea); } |