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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 if (m_masker) { | 51 if (m_masker) { |
52 DCHECK(SVGResourcesCache::cachedResourcesForLayoutObject(&m_object)); | 52 DCHECK(SVGResourcesCache::cachedResourcesForLayoutObject(&m_object)); |
53 DCHECK(SVGResourcesCache::cachedResourcesForLayoutObject(&m_object) | 53 DCHECK(SVGResourcesCache::cachedResourcesForLayoutObject(&m_object) |
54 ->masker() == m_masker); | 54 ->masker() == m_masker); |
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 DCHECK_IS_ON() |
61 DCHECK(!m_applyClipMaskAndFilterIfNecessaryCalled); | 61 DCHECK(!m_applyClipMaskAndFilterIfNecessaryCalled); |
62 m_applyClipMaskAndFilterIfNecessaryCalled = true; | 62 m_applyClipMaskAndFilterIfNecessaryCalled = true; |
63 #endif | 63 #endif |
64 // In SPv2 we should early exit once the paint property state has been | 64 // In SPv2 we should early exit once the paint property state has been |
65 // applied, because all meta (non-drawing) display items are ignored in | 65 // applied, because all meta (non-drawing) display items are ignored in |
66 // SPv2. However we can't simply omit them because there are still | 66 // SPv2. However we can't simply omit them because there are still |
67 // non-composited painting (e.g. SVG filters in particular) that rely on | 67 // non-composited painting (e.g. SVG filters in particular) that rely on |
68 // these meta display items. | 68 // these meta display items. |
69 applyPaintPropertyState(); | 69 applyPaintPropertyState(); |
70 | 70 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // though. | 269 // though. |
270 // Additionally, it's not really safe/guaranteed to be correct, as | 270 // Additionally, it's not really safe/guaranteed to be correct, as |
271 // something down the paint pipe may want to farther tweak the color | 271 // something down the paint pipe may want to farther tweak the color |
272 // filter, which could yield incorrect results. (Consider just using | 272 // filter, which could yield incorrect results. (Consider just using |
273 // saveLayer() w/ this color filter explicitly instead.) | 273 // saveLayer() w/ this color filter explicitly instead.) |
274 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); | 274 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); |
275 return true; | 275 return true; |
276 } | 276 } |
277 | 277 |
278 } // namespace blink | 278 } // namespace blink |
OLD | NEW |