summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-24 14:02:34 -0700
committerChris Craik <ccraik@google.com>2012-05-24 16:46:59 -0700
commit6c20d86c1e2d94a15a34cb3881f6c29967591f7d (patch)
treead049684ed167e55a3922e2a9c5fc9f204e16238 /Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
parent9c52999fb17b49c672908e36aabda61abf63fe8f (diff)
downloadexternal_webkit-6c20d86c1e2d94a15a34cb3881f6c29967591f7d.zip
external_webkit-6c20d86c1e2d94a15a34cb3881f6c29967591f7d.tar.gz
external_webkit-6c20d86c1e2d94a15a34cb3881f6c29967591f7d.tar.bz2
Compute draw transforms only for new/dynamically transformed layers
Previously, hundreds of layers could take 4+ ms to update transforms. Now, only those that are fixed, have animations, or are scrollable calculate transforms. bug:6530473 Change-Id: Ic9b14b76190c5bd0e5a405914a624d92b7ca7980
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
index 085a356..f03a140 100644
--- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
@@ -49,6 +49,7 @@ namespace WebCore {
BaseLayerAndroid::BaseLayerAndroid(LayerContent* content)
: LayerAndroid((RenderLayer*)0)
, m_color(Color::white)
+ , m_positionsCalculated(false)
{
if (content) {
setContent(content);
@@ -79,12 +80,15 @@ IFrameLayerAndroid* BaseLayerAndroid::updatePosition(SkRect viewport,
void BaseLayerAndroid::updatePositionsRecursive(const SkRect& visibleContentRect)
{
TRACE_METHOD();
+
updateLayerPositions(visibleContentRect);
TransformationMatrix ident;
FloatRect clip(0, 0, getWidth(), getHeight());
+ bool forcePositionCalculation = !m_positionsCalculated;
float scale = state() ? state()->scale() : 1.0f;
- updateGLPositionsAndScale(ident, clip, 1, scale);
+ updateGLPositionsAndScale(ident, clip, 1, scale, forcePositionCalculation);
+ m_positionsCalculated = true;
}
ForegroundBaseLayerAndroid::ForegroundBaseLayerAndroid(LayerContent* content)