summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-10-02 15:04:50 -0400
committerMike Reed <reed@google.com>2009-10-02 15:07:56 -0400
commit69b9ab686ccfadd429ac9d67474ae44da9df1113 (patch)
tree782f549e8a948a8853c60d5e693bde5ac22adc5b /WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
parent123b7cb28d165aae5c8defbb22c5ad428fc6275c (diff)
downloadexternal_webkit-69b9ab686ccfadd429ac9d67474ae44da9df1113.zip
external_webkit-69b9ab686ccfadd429ac9d67474ae44da9df1113.tar.gz
external_webkit-69b9ab686ccfadd429ac9d67474ae44da9df1113.tar.bz2
only look at globalAlpha when we draw images (not the alpha in fill-color)
http://b/issue?id=1817561
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsContextAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index 34b709b..46ac9da 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -247,6 +247,13 @@ public:
paint->setColor(mState->applyAlpha(mState->mFillColor));
}
+ void setup_paint_bitmap(SkPaint* paint) const {
+ this->setup_paint_common(paint);
+ // we only want the global alpha for bitmaps,
+ // so just give applyAlpha opaque black
+ paint->setColor(mState->applyAlpha(0xFF000000));
+ }
+
/* sets up the paint for stroking. Returns true if the style is really
just a dash of squares (the size of the paint's stroke-width.
*/
@@ -831,10 +838,14 @@ void GraphicsContext::endTransparencyLayer()
///////////////////////////////////////////////////////////////////////////
+ void GraphicsContext::setupBitmapPaint(SkPaint* paint) {
+ m_data->setup_paint_bitmap(paint);
+ }
+
void GraphicsContext::setupFillPaint(SkPaint* paint) {
m_data->setup_paint_fill(paint);
}
-
+
void GraphicsContext::setupStrokePaint(SkPaint* paint) {
m_data->setup_paint_stroke(paint, NULL);
}