summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-02-19 01:16:48 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-19 01:16:48 -0800
commitd3f534955e1e80e5a9192c84db518f8f0eff5b00 (patch)
tree9b988d9a8e9b832bc8a2809db31b68024442f0ec /WebCore/platform/graphics
parentffef3d3a1baae44ba44696024ddc12f92337d518 (diff)
parent928bc35505a3fa29f1598842d49124c06703f972 (diff)
downloadexternal_webkit-d3f534955e1e80e5a9192c84db518f8f0eff5b00.zip
external_webkit-d3f534955e1e80e5a9192c84db518f8f0eff5b00.tar.gz
external_webkit-d3f534955e1e80e5a9192c84db518f8f0eff5b00.tar.bz2
am 928bc355: Merge "Do not merge: Cherry-pick 2nd part of GL_BLEND CL from master" into honeycomb
* commit '928bc35505a3fa29f1598842d49124c06703f972': Do not merge: Cherry-pick 2nd part of GL_BLEND CL from master
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r--WebCore/platform/graphics/android/BaseLayerAndroid.cpp1
-rw-r--r--WebCore/platform/graphics/android/BaseTile.cpp2
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp1
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.h5
4 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 00eac74..3483e44 100644
--- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -264,6 +264,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 960d073..2942f24 100644
--- a/WebCore/platform/graphics/android/BaseTile.cpp
+++ b/WebCore/platform/graphics/android/BaseTile.cpp
@@ -256,7 +256,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 38b747d..d57abf8 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 7fa5e39..d45340d 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.h
+++ b/WebCore/platform/graphics/android/GLWebViewState.h
@@ -205,6 +205,9 @@ public:
return false;
}
+ void setBackgroundColor(SkColor color) { m_backgroundColor = color; }
+ SkColor getBackgroundColor() { return m_backgroundColor; }
+
private:
void inval(const IntRect& rect); // caller must hold m_baseLayerLock
@@ -244,6 +247,8 @@ private:
bool m_baseLayerUpdate;
IntRect m_invalidateRect;
+
+ SkColor m_backgroundColor;
};
} // namespace WebCore