| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void SVGPaintContext::applyCompositingIfNecessary() { | 110 void SVGPaintContext::applyCompositingIfNecessary() { |
| 111 ASSERT(!paintInfo().isRenderingClipPathAsMaskImage()); | 111 ASSERT(!paintInfo().isRenderingClipPathAsMaskImage()); |
| 112 | 112 |
| 113 const ComputedStyle& style = m_object.styleRef(); | 113 const ComputedStyle& style = m_object.styleRef(); |
| 114 float opacity = style.opacity(); | 114 float opacity = style.opacity(); |
| 115 WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed() | 115 WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed() |
| 116 ? style.blendMode() | 116 ? style.blendMode() |
| 117 : WebBlendModeNormal; | 117 : WebBlendModeNormal; |
| 118 if (opacity < 1 || blendMode != WebBlendModeNormal) { | 118 if (opacity < 1 || blendMode != WebBlendModeNormal) { |
| 119 const FloatRect compositingBounds = | 119 const FloatRect compositingBounds = |
| 120 m_object.paintInvalidationRectInLocalSVGCoordinates(); | 120 m_object.visualRectInLocalSVGCoordinates(); |
| 121 m_compositingRecorder = wrapUnique(new CompositingRecorder( | 121 m_compositingRecorder = wrapUnique(new CompositingRecorder( |
| 122 paintInfo().context, m_object, | 122 paintInfo().context, m_object, |
| 123 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), | 123 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), |
| 124 opacity, &compositingBounds)); | 124 opacity, &compositingBounds)); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 void SVGPaintContext::applyClipIfNecessary() { | 128 void SVGPaintContext::applyClipIfNecessary() { |
| 129 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath(); | 129 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath(); |
| 130 if (!clipPathOperation) | 130 if (!clipPathOperation) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // though. | 239 // though. |
| 240 // Additionally, it's not really safe/guaranteed to be correct, as | 240 // Additionally, it's not really safe/guaranteed to be correct, as |
| 241 // something down the paint pipe may want to farther tweak the color | 241 // something down the paint pipe may want to farther tweak the color |
| 242 // filter, which could yield incorrect results. (Consider just using | 242 // filter, which could yield incorrect results. (Consider just using |
| 243 // saveLayer() w/ this color filter explicitly instead.) | 243 // saveLayer() w/ this color filter explicitly instead.) |
| 244 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); | 244 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); |
| 245 return true; | 245 return true; |
| 246 } | 246 } |
| 247 | 247 |
| 248 } // namespace blink | 248 } // namespace blink |
| OLD | NEW |