diff options
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/ImageAndroid.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 40d98ec..90ce354 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -240,7 +240,7 @@ public: void setup_paint_fill(SkPaint* paint) const { this->setup_paint_common(paint); - paint->setColor(mState->mFillColor); + paint->setColor(mState->applyAlpha(mState->mFillColor)); } /* sets up the paint for stroking. Returns true if the style is really @@ -248,7 +248,7 @@ public: */ bool setup_paint_stroke(SkPaint* paint, SkRect* rect) { this->setup_paint_common(paint); - paint->setColor(mState->mStrokeColor); + paint->setColor(mState->applyAlpha(mState->mStrokeColor)); float width = mState->mStrokeThickness; diff --git a/WebCore/platform/graphics/android/ImageAndroid.cpp b/WebCore/platform/graphics/android/ImageAndroid.cpp index 6997a9e..769ac43 100644 --- a/WebCore/platform/graphics/android/ImageAndroid.cpp +++ b/WebCore/platform/graphics/android/ImageAndroid.cpp @@ -192,6 +192,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, SkCanvas* canvas = ctxt->platformContext()->mCanvas; SkPaint paint; + ctxt->setupFillPaint(&paint); // need global alpha among other things paint.setFilterBitmap(true); paint.setPorterDuffXfermode(android_convert_compositeOp(compositeOp)); canvas->drawBitmapRect(bitmap, &srcR, dstR, &paint); @@ -237,7 +238,8 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, SkCanvas* canvas = ctxt->platformContext()->mCanvas; SkPaint paint; - + ctxt->setupFillPaint(&paint); // need global alpha among other things + SkShader* shader = SkShader::CreateBitmapShader(bitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode); |