| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 104 } |
| 105 | 105 |
| 106 void SVGPaintContext::applyCompositingIfNecessary() | 106 void SVGPaintContext::applyCompositingIfNecessary() |
| 107 { | 107 { |
| 108 ASSERT(!m_paintInfo.isRenderingClipPathAsMaskImage()); | 108 ASSERT(!m_paintInfo.isRenderingClipPathAsMaskImage()); |
| 109 | 109 |
| 110 // Layer takes care of root opacity and blend mode. | 110 // Layer takes care of root opacity and blend mode. |
| 111 if (m_object->isSVGRoot()) | 111 if (m_object->isSVGRoot()) |
| 112 return; | 112 return; |
| 113 | 113 |
| 114 const LayoutStyle& style = m_object->styleRef(); | 114 const ComputedStyle& style = m_object->styleRef(); |
| 115 float opacity = style.opacity(); | 115 float opacity = style.opacity(); |
| 116 bool hasBlendMode = style.hasBlendMode() && m_object->isBlendingAllowed(); | 116 bool hasBlendMode = style.hasBlendMode() && m_object->isBlendingAllowed(); |
| 117 if (opacity < 1 || hasBlendMode) { | 117 if (opacity < 1 || hasBlendMode) { |
| 118 m_clipRecorder = adoptPtr(new FloatClipRecorder(*m_paintInfo.context, *m
_object, m_paintInfo.phase, m_object->paintInvalidationRectInLocalCoordinates())
); | 118 m_clipRecorder = adoptPtr(new FloatClipRecorder(*m_paintInfo.context, *m
_object, m_paintInfo.phase, m_object->paintInvalidationRectInLocalCoordinates())
); |
| 119 WebBlendMode blendMode = hasBlendMode ? style.blendMode() : WebBlendMode
Normal; | 119 WebBlendMode blendMode = hasBlendMode ? style.blendMode() : WebBlendMode
Normal; |
| 120 CompositeOperator compositeOp = hasBlendMode ? CompositeSourceOver : m_p
aintInfo.context->compositeOperationDeprecated(); | 120 CompositeOperator compositeOp = hasBlendMode ? CompositeSourceOver : m_p
aintInfo.context->compositeOperationDeprecated(); |
| 121 m_compositingRecorder = adoptPtr(new CompositingRecorder(m_paintInfo.con
text, *m_object, WebCoreCompositeToSkiaComposite(compositeOp, blendMode), opacit
y)); | 121 m_compositingRecorder = adoptPtr(new CompositingRecorder(m_paintInfo.con
text, *m_object, WebCoreCompositeToSkiaComposite(compositeOp, blendMode), opacit
y)); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 { | 191 { |
| 192 ASSERT(context); | 192 ASSERT(context); |
| 193 ASSERT(item); | 193 ASSERT(item); |
| 194 ASSERT(!item->needsLayout()); | 194 ASSERT(!item->needsLayout()); |
| 195 | 195 |
| 196 PaintInfo info(context, LayoutRect::infiniteIntRect(), PaintPhaseForeground,
PaintBehaviorNormal); | 196 PaintInfo info(context, LayoutRect::infiniteIntRect(), PaintPhaseForeground,
PaintBehaviorNormal); |
| 197 item->paint(info, IntPoint()); | 197 item->paint(info, IntPoint()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace blink | 200 } // namespace blink |
| OLD | NEW |