| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 SVGMaskPainter(*m_masker).finishEffect(m_object, paintInfo().context); | 55 SVGMaskPainter(*m_masker).finishEffect(m_object, paintInfo().context); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() { | 59 bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() { |
| 60 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
| 61 ASSERT(!m_applyClipMaskAndFilterIfNecessaryCalled); | 61 ASSERT(!m_applyClipMaskAndFilterIfNecessaryCalled); |
| 62 m_applyClipMaskAndFilterIfNecessaryCalled = true; | 62 m_applyClipMaskAndFilterIfNecessaryCalled = true; |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 // When rendering clip paths as masks, only geometric operations should be inc
luded so skip | 65 // When rendering clip paths as masks, only geometric operations should be |
| 66 // non-geometric operations such as compositing, masking, and filtering. | 66 // included so skip non-geometric operations such as compositing, masking, and |
| 67 // filtering. |
| 67 if (paintInfo().isRenderingClipPathAsMaskImage()) { | 68 if (paintInfo().isRenderingClipPathAsMaskImage()) { |
| 68 DCHECK(!m_object.isSVGRoot()); | 69 DCHECK(!m_object.isSVGRoot()); |
| 69 applyClipIfNecessary(); | 70 applyClipIfNecessary(); |
| 70 return true; | 71 return true; |
| 71 } | 72 } |
| 72 | 73 |
| 73 bool isSVGRoot = m_object.isSVGRoot(); | 74 bool isSVGRoot = m_object.isSVGRoot(); |
| 74 | 75 |
| 75 // Layer takes care of root opacity and blend mode. | 76 // Layer takes care of root opacity and blend mode. |
| 76 if (isSVGRoot) { | 77 if (isSVGRoot) { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // though. | 239 // though. |
| 239 // Additionally, it's not really safe/guaranteed to be correct, as | 240 // Additionally, it's not really safe/guaranteed to be correct, as |
| 240 // 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 |
| 241 // filter, which could yield incorrect results. (Consider just using | 242 // filter, which could yield incorrect results. (Consider just using |
| 242 // saveLayer() w/ this color filter explicitly instead.) | 243 // saveLayer() w/ this color filter explicitly instead.) |
| 243 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); | 244 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); |
| 244 return true; | 245 return true; |
| 245 } | 246 } |
| 246 | 247 |
| 247 } // namespace blink | 248 } // namespace blink |
| OLD | NEW |