From 69b9ab686ccfadd429ac9d67474ae44da9df1113 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 2 Oct 2009 15:04:50 -0400 Subject: only look at globalAlpha when we draw images (not the alpha in fill-color) http://b/issue?id=1817561 --- .../platform/graphics/android/GraphicsContextAndroid.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/graphics/android/GraphicsContextAndroid.cpp') 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); } -- cgit v1.1