diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-12-07 11:37:35 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-12-07 14:05:52 -0800 |
commit | e47399f767707497dfc68fc64b14621a8ca9959f (patch) | |
tree | e465cb93bffc8da34986c9d8c879118a15e8ff72 | |
parent | b173d79ebb480adfeff851a646df2b50d7def3b0 (diff) | |
download | external_webkit-e47399f767707497dfc68fc64b14621a8ca9959f.zip external_webkit-e47399f767707497dfc68fc64b14621a8ca9959f.tar.gz external_webkit-e47399f767707497dfc68fc64b14621a8ca9959f.tar.bz2 |
GLWebViewState should get the baseLayer set during init
Because WebView::setBaseLayer can happen all before the first call
to drawGL, where the m_glWebViewState got allocated,
GLWebViewState::setBaseLayer is not called properly.
The fix is to call the GLWebViewState::setBaseLayer when
m_glWebViewState first allocated.
bug: 3171575
Change-Id: I58769aa4a883f442dc2b582ea70c5b7f6c5a04f2
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 86f008b..e8bd0da 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -415,8 +415,13 @@ bool drawGL(WebCore::IntRect& viewRect, float scale, int extras) if (!m_baseLayer) return false; - if (!m_glWebViewState) + if (!m_glWebViewState) { m_glWebViewState = new GLWebViewState(); + if (m_baseLayer->content()) { + IntRect rect(0, 0, m_baseLayer->content()->width(), m_baseLayer->content()->height()); + m_glWebViewState->setBaseLayer(m_baseLayer, rect); + } + } CachedRoot* root = getFrameCache(AllowNewer); if (!root) { |