diff options
author | Derek Sollenberger <djsollen@google.com> | 2011-02-18 12:28:21 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-18 12:28:21 -0800 |
commit | 62d524796f15e35cd6e5bf1f0cdad57fcf31b7b1 (patch) | |
tree | fda94434e55a96f4a2836a2f7592a26a5e1850de /WebCore | |
parent | 307f42fb458f80f70023ef4cedabed30da37079d (diff) | |
parent | d7c6f523638ace106f79b7ffb2a03fd8de3d0b55 (diff) | |
download | external_webkit-62d524796f15e35cd6e5bf1f0cdad57fcf31b7b1.zip external_webkit-62d524796f15e35cd6e5bf1f0cdad57fcf31b7b1.tar.gz external_webkit-62d524796f15e35cd6e5bf1f0cdad57fcf31b7b1.tar.bz2 |
Merge "Ensure non-ready tiles are painted with the page background color."
Diffstat (limited to 'WebCore')
4 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index d2c41dc..584add1 100644 --- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -263,6 +263,7 @@ bool BaseLayerAndroid::drawGL(IntRect& viewRect, SkRect& visibleRect, XLOG("drawBasePicture drawGL() viewRect: %d, %d, %d, %d", left, top, width, height); + m_glWebViewState->setBackgroundColor(color); glClearColor((float)m_color.red() / 255.0, (float)m_color.green() / 255.0, (float)m_color.blue() / 255.0, 1); diff --git a/WebCore/platform/graphics/android/BaseTile.cpp b/WebCore/platform/graphics/android/BaseTile.cpp index a69e6f9..bfd5118 100644 --- a/WebCore/platform/graphics/android/BaseTile.cpp +++ b/WebCore/platform/graphics/android/BaseTile.cpp @@ -257,7 +257,7 @@ void BaseTile::paintBitmap() SkCanvas* canvas = texture->canvas(); canvas->save(); - canvas->drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode); + canvas->drawColor(tiledPage->glWebViewState()->getBackgroundColor()); canvas->scale(scale, scale); canvas->translate(-x * w, -y * h); diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp index 71f3fe5..3d2f6c8 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -68,6 +68,7 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex) , m_usePageA(true) , m_globalButtonMutex(buttonMutex) , m_baseLayerUpdate(true) + , m_backgroundColor(SK_ColorWHITE) { m_viewport.setEmpty(); m_previousViewport.setEmpty(); diff --git a/WebCore/platform/graphics/android/GLWebViewState.h b/WebCore/platform/graphics/android/GLWebViewState.h index 91bb2d7..d265b41 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.h +++ b/WebCore/platform/graphics/android/GLWebViewState.h @@ -208,6 +208,9 @@ public: bool drawGL(IntRect& rect, SkRect& viewport, float scale, SkColor color = SK_ColorWHITE); + void setBackgroundColor(SkColor color) { m_backgroundColor = color; } + SkColor getBackgroundColor() { return m_backgroundColor; } + private: void inval(const IntRect& rect); // caller must hold m_baseLayerLock @@ -247,6 +250,8 @@ private: bool m_baseLayerUpdate; IntRect m_invalidateRect; + + SkColor m_backgroundColor; }; } // namespace WebCore |