| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 const SVGRenderStyle* svgStyle = style->svgStyle(); | 112 const SVGRenderStyle* svgStyle = style->svgStyle(); |
| 113 ASSERT(svgStyle); | 113 ASSERT(svgStyle); |
| 114 | 114 |
| 115 // Setup transparency layers before setting up SVG resources! | 115 // Setup transparency layers before setting up SVG resources! |
| 116 bool isRenderingMask = isRenderingMaskImage(m_object); | 116 bool isRenderingMask = isRenderingMaskImage(m_object); |
| 117 // RenderLayer takes care of root opacity. | 117 // RenderLayer takes care of root opacity. |
| 118 float opacity = (object->isSVGRoot() || isRenderingMask) ? 1 : style->opacit
y(); | 118 float opacity = (object->isSVGRoot() || isRenderingMask) ? 1 : style->opacit
y(); |
| 119 bool hasBlendMode = style->hasBlendMode() && !isRenderingMask; | 119 bool hasBlendMode = style->hasBlendMode() && !isRenderingMask; |
| 120 | 120 |
| 121 if (opacity < 1 || hasBlendMode || style->hasIsolation()) { | 121 if (opacity < 1 || hasBlendMode || style->hasIsolation()) { |
| 122 FloatRect repaintRect = m_object->repaintRectInLocalCoordinates(); | 122 FloatRect repaintRect = m_object->paintInvalidationRectInLocalCoordinate
s(); |
| 123 m_paintInfo->context->clip(repaintRect); | 123 m_paintInfo->context->clip(repaintRect); |
| 124 | 124 |
| 125 if (hasBlendMode) { | 125 if (hasBlendMode) { |
| 126 if (!(m_renderingFlags & RestoreGraphicsContext)) { | 126 if (!(m_renderingFlags & RestoreGraphicsContext)) { |
| 127 m_paintInfo->context->save(); | 127 m_paintInfo->context->save(); |
| 128 m_renderingFlags |= RestoreGraphicsContext; | 128 m_renderingFlags |= RestoreGraphicsContext; |
| 129 } | 129 } |
| 130 m_paintInfo->context->setCompositeOperation(CompositeSourceOver, sty
le->blendMode()); | 130 m_paintInfo->context->setCompositeOperation(CompositeSourceOver, sty
le->blendMode()); |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 toRenderSVGImage(m_object)->paintForeground(bufferedInfo); | 303 toRenderSVGImage(m_object)->paintForeground(bufferedInfo); |
| 304 } else | 304 } else |
| 305 return false; | 305 return false; |
| 306 } | 306 } |
| 307 | 307 |
| 308 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox); | 308 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox); |
| 309 return true; | 309 return true; |
| 310 } | 310 } |
| 311 | 311 |
| 312 } | 312 } |
| OLD | NEW |