Chromium Code Reviews| Index: Source/core/svg/graphics/SVGImage.cpp |
| diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp |
| index 2514abf62f7ab967d0b4986bee537b4941902271..0ecab5358c51c97dea5c3bfec64b959f6703eb2a 100644 |
| --- a/Source/core/svg/graphics/SVGImage.cpp |
| +++ b/Source/core/svg/graphics/SVGImage.cpp |
| @@ -247,9 +247,10 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl |
| context->clip(enclosingIntRect(dstRect)); |
| bool compositingRequiresTransparencyLayer = compositeOp != CompositeSourceOver || blendMode != blink::WebBlendModeNormal; |
| - bool requiresTransparencyLayer = compositingRequiresTransparencyLayer || context->alpha() < 1; |
| + float opacity = context->getNormalizedAlpha() / 255.f; |
|
f(malita)
2014/02/27 13:23:37
nit: just "255" (per coding style).
fs
2014/02/27 14:31:56
Dropped the '.' (or this will be too binary.)
|
| + bool requiresTransparencyLayer = compositingRequiresTransparencyLayer || opacity < 1; |
| if (requiresTransparencyLayer) { |
| - context->beginTransparencyLayer(context->alpha()); |
| + context->beginTransparencyLayer(opacity); |
| if (compositingRequiresTransparencyLayer) |
| context->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); |
| } |