diff options
author | Chris Craik <ccraik@google.com> | 2012-03-13 14:41:37 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-03-13 17:02:11 -0700 |
commit | 644f4a9dfba2efa316c7b4d1c737af2b0554b342 (patch) | |
tree | 5df70a8e4976122c2103a4d4dd921dc717db299c /Source/WebCore/platform/graphics | |
parent | d487c56b47c747d3e331ee1892e4c0473363afd2 (diff) | |
download | external_webkit-644f4a9dfba2efa316c7b4d1c737af2b0554b342.zip external_webkit-644f4a9dfba2efa316c7b4d1c737af2b0554b342.tar.gz external_webkit-644f4a9dfba2efa316c7b4d1c737af2b0554b342.tar.bz2 |
use scale 1 when no GLWebViewState
fixes crash when updateLayerPositions called on a layer before m_state set
bug:6154462
Change-Id: I1568fde3d8458f13bdb01ec2364334dbfc27041a
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r-- | Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index f27f2c1..7e0a719 100644 --- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -269,8 +269,11 @@ void BaseLayerAndroid::updateLayerPositions(const SkRect& visibleRect) TransformationMatrix ident; compositedRoot->updateLayerPositions(visibleRect); FloatRect clip(0, 0, content()->width(), content()->height()); - compositedRoot->updateGLPositionsAndScale( - ident, clip, 1, m_state->zoomManager()->layersScale()); + + // Note that this function may be called (and should still work) with no m_state in SW mode + // TODO: is this the best thing to do in software rendering + float scale = m_state ? m_state->scale() : 1.0f; + compositedRoot->updateGLPositionsAndScale(ident, clip, 1, scale); #ifdef DEBUG compositedRoot->showLayer(0); |