| Index: Source/platform/graphics/GraphicsContext.h
|
| diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
|
| index 75b8c56644bbdd2e967c99e3a65b8bf7e5e4d560..7a9660518003a603b50b89365f3f1e28b337792e 100644
|
| --- a/Source/platform/graphics/GraphicsContext.h
|
| +++ b/Source/platform/graphics/GraphicsContext.h
|
| @@ -120,10 +120,10 @@ public:
|
| SkColor effectiveStrokeColor() const { return immutableState()->effectiveStrokeColor(); }
|
|
|
| Pattern* strokePattern() const { return immutableState()->strokePattern(); }
|
| - void setStrokePattern(PassRefPtr<Pattern>);
|
| + void setStrokePattern(PassRefPtr<Pattern>, float additionalAlpha = 1);
|
|
|
| Gradient* strokeGradient() const { return immutableState()->strokeGradient(); }
|
| - void setStrokeGradient(PassRefPtr<Gradient>);
|
| + void setStrokeGradient(PassRefPtr<Gradient>, float additionalAlpha = 1);
|
|
|
| void setLineCap(LineCap cap) { mutableState()->setLineCap(cap); }
|
| void setLineDash(const DashArray& dashes, float dashOffset) { mutableState()->setLineDash(dashes, dashOffset); }
|
| @@ -137,10 +137,10 @@ public:
|
| void setFillColor(const Color& color) { mutableState()->setFillColor(color); }
|
| SkColor effectiveFillColor() const { return immutableState()->effectiveFillColor(); }
|
|
|
| - void setFillPattern(PassRefPtr<Pattern>);
|
| + void setFillPattern(PassRefPtr<Pattern>, float additionalAlpha = 1);
|
| Pattern* fillPattern() const { return immutableState()->fillPattern(); }
|
|
|
| - void setFillGradient(PassRefPtr<Gradient>);
|
| + void setFillGradient(PassRefPtr<Gradient>, float additionalAlpha = 1);
|
| Gradient* fillGradient() const { return immutableState()->fillGradient(); }
|
|
|
| SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); }
|
| @@ -396,6 +396,13 @@ public:
|
| void setInDrawingRecorder(bool);
|
| #endif
|
|
|
| + // Multiply a color's alpha channel by an additional alpha factor. This is
|
| + // similar to Color::combineWithAlpha but uses Skia's rounding approach.
|
| + static SkColor combineWithAlpha(SkColor color, float alpha)
|
| + {
|
| + return GraphicsContextState::combineWithAlpha(color, alpha);
|
| + }
|
| +
|
| private:
|
| const GraphicsContextState* immutableState() const { return m_paintState; }
|
|
|
|
|