diff options
author | George Mount <mount@google.com> | 2012-05-04 13:50:04 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-05-04 15:17:50 -0700 |
commit | 0e43fd01178d539d44a5dfade3bf15aa6efbe02a (patch) | |
tree | ca56c050f55c0e20714c81508b0e7819c1700fa4 /Source/WebCore | |
parent | 38c837307303e521ec0d1c9f7c0df7bd78dd53a5 (diff) | |
download | external_webkit-0e43fd01178d539d44a5dfade3bf15aa6efbe02a.zip external_webkit-0e43fd01178d539d44a5dfade3bf15aa6efbe02a.tar.gz external_webkit-0e43fd01178d539d44a5dfade3bf15aa6efbe02a.tar.bz2 |
Ensure updateGLPositionsAndScale is called from updateLayerPosition.
Bug 6436989
The layer transform was not being updated quickly enough after
a draw, causing the thumb selection handle to become misplaced.
Change-Id: I6cd33baaaba258c9d0977f06e7793ade2816b95d
Diffstat (limited to 'Source/WebCore')
4 files changed, 15 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp index bc3b04b..4f89dc9 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp @@ -69,6 +69,14 @@ IFrameLayerAndroid* BaseLayerAndroid::updatePosition(SkRect viewport, return LayerAndroid::updatePosition(viewport, parentIframeLayer); } +void BaseLayerAndroid::updatePositionsRecursive(const SkRect& visibleContentRect) +{ + updateLayerPositions(visibleContentRect); + TransformationMatrix ident; + FloatRect clip(0, 0, 1e10, 1e10); + updateGLPositionsAndScale(ident, clip, 1, state()->scale()); +} + ForegroundBaseLayerAndroid::ForegroundBaseLayerAndroid(LayerContent* content) : LayerAndroid((RenderLayer*)0) { diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h index dc4c25f..6275dfd 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.h @@ -42,6 +42,7 @@ public: virtual bool needsTexture() { return content(); } virtual IFrameLayerAndroid* updatePosition(SkRect viewport, IFrameLayerAndroid* parentIframeLayer); + void updatePositionsRecursive(const SkRect& visibleContentRect); void setBackgroundColor(Color& color) { m_color = color; } Color getBackgroundColor() { return m_color; } diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp index 0bdbf38..ef91f04 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp @@ -33,7 +33,7 @@ #include "BaseLayerAndroid.h" #include "ClassTracker.h" #include "GLWebViewState.h" -#include "LayerAndroid.h" +#include "BaseLayerAndroid.h" #include "Surface.h" #include "ScrollableLayerAndroid.h" #include "TilesManager.h" @@ -44,7 +44,7 @@ namespace WebCore { // TILED PAINTING / SURFACES // //////////////////////////////////////////////////////////////////////////////// -SurfaceCollection::SurfaceCollection(LayerAndroid* layer) +SurfaceCollection::SurfaceCollection(BaseLayerAndroid* layer) : m_compositedRoot(layer) { // layer must be non-null. @@ -233,11 +233,7 @@ void SurfaceCollection::updateScrollableLayer(int layerId, int x, int y) void SurfaceCollection::updateLayerPositions(const SkRect& visibleContentRect) { - TransformationMatrix ident; - m_compositedRoot->updateLayerPositions(visibleContentRect); - FloatRect clip(0, 0, 1e10, 1e10); - m_compositedRoot->updateGLPositionsAndScale( - ident, clip, 1, m_compositedRoot->state()->scale()); + m_compositedRoot->updatePositionsRecursive(visibleContentRect); #ifdef DEBUG m_compositedRoot->showLayer(0); diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h index 5cfd943..dc5fec4 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h @@ -37,14 +37,14 @@ class SkRegion; namespace WebCore { -class LayerAndroid; +class BaseLayerAndroid; class Surface; class TexturesResult; class SurfaceCollection : public SkRefCnt { // TODO: investigate webkit threadsafe ref counting public: - SurfaceCollection(LayerAndroid* compositedRoot); + SurfaceCollection(BaseLayerAndroid* compositedRoot); virtual ~SurfaceCollection(); // Tiled painting methods (executed on groups) @@ -68,7 +68,7 @@ public: private: void updateLayerPositions(const SkRect& visibleContentRect); - LayerAndroid* m_compositedRoot; + BaseLayerAndroid* m_compositedRoot; WTF::Vector<Surface*> m_surfaces; }; |