Permalink
Browse files

Call the right updatePositions*

 Bug: 6634077
 Software was accidentally calling the inner updatePositions instead
 of the outer updatePositions which the hardware path calls. Move
 the inner updatePositions to be protected instead of public to
 guard against this in the future as well.

Change-Id: Ib509f151ce64bf390383eaa0c32a2bae89428e89
  • Loading branch information...
1 parent efe3bf4 commit f8a89eaa1361ce1e71ec7fa9065103fd0b305b5f @jreck jreck committed Jun 12, 2012
@@ -199,13 +199,6 @@ class TEST_EXPORT LayerAndroid : public Layer {
void dumpLayers(FILE*, int indentLevel) const;
void dumpToLog() const;
- /** Call this with the current viewport (scrolling, zoom) to update
- the position of the fixed layers.
-
- This call is recursive, so it should be called on the root of the
- hierarchy.
- */
- void updateLayerPositions(SkRect viewPort, IFrameLayerAndroid* parentIframeLayer = 0);
virtual IFrameLayerAndroid* updatePosition(SkRect viewport,
IFrameLayerAndroid* parentIframeLayer);
@@ -297,6 +290,13 @@ class TEST_EXPORT LayerAndroid : public Layer {
}
protected:
+ /** Call this with the current viewport (scrolling, zoom) to update
+ the position of the fixed layers.
+
+ This call is recursive, so it should be called on the root of the
+ hierarchy.
+ */
+ void updateLayerPositions(SkRect viewPort, IFrameLayerAndroid* parentIframeLayer = 0);
virtual void onDraw(SkCanvas*, SkScalar opacity, android::DrawExtra* extra, PaintStyle style);
virtual InvalidateFlags onSetHwAccelerated(bool hwAccelerated) { return InvalidateNone; }
TransformationMatrix m_drawTransform;
@@ -316,7 +316,7 @@ void draw(SkCanvas* canvas, SkColor bgColor, DrawExtras extras)
// call this to be sure we've adjusted for any scrolling or animations
// before we actually draw
- m_baseLayer->updateLayerPositions(m_visibleContentRect);
+ m_baseLayer->updatePositionsRecursive(m_visibleContentRect);
m_baseLayer->updatePositions();
// We have to set the canvas' matrix on the base layer

0 comments on commit f8a89ea

Please sign in to comment.