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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Reset the paint info after the filter effect has been completed. | 52 // Reset the paint info after the filter effect has been completed. |
53 // This isn't strictly required (e.g., m_paintInfo.rect is not used | 53 // This isn't strictly required (e.g., m_paintInfo.rect is not used |
54 // after this). | 54 // after this). |
55 m_paintInfo.context = m_originalPaintInfo->context; | 55 m_paintInfo.context = m_originalPaintInfo->context; |
56 m_paintInfo.rect = m_originalPaintInfo->rect; | 56 m_paintInfo.rect = m_originalPaintInfo->rect; |
57 } | 57 } |
58 | 58 |
59 if (m_masker) { | 59 if (m_masker) { |
60 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)); | 60 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)); |
61 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)->mask
er() == m_masker); | 61 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)->mask
er() == m_masker); |
62 SVGMaskPainter(*m_masker).finishEffect(m_object, m_paintInfo.context); | 62 SVGMaskPainter(*m_masker).finishEffect(*m_object, m_paintInfo.context); |
63 } | 63 } |
64 | 64 |
65 if (m_clipper) { | 65 if (m_clipper) { |
66 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)); | 66 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)); |
67 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)->clip
per() == m_clipper); | 67 ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)->clip
per() == m_clipper); |
68 SVGClipPainter(*m_clipper).postApplyStatefulResource(m_object, m_paintIn
fo.context, m_clipperState); | 68 SVGClipPainter(*m_clipper).postApplyStatefulResource(m_object, m_paintIn
fo.context, m_clipperState); |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() | 72 bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return false; | 139 return false; |
140 m_clipPathRecorder = adoptPtr(new ClipPathRecorder(*m_paintInfo.cont
ext, m_object->displayItemClient(), clipPath->path(m_object->objectBoundingBox()
), clipPath->windRule())); | 140 m_clipPathRecorder = adoptPtr(new ClipPathRecorder(*m_paintInfo.cont
ext, m_object->displayItemClient(), clipPath->path(m_object->objectBoundingBox()
), clipPath->windRule())); |
141 } | 141 } |
142 } | 142 } |
143 return true; | 143 return true; |
144 } | 144 } |
145 | 145 |
146 bool SVGPaintContext::applyMaskIfNecessary(SVGResources* resources) | 146 bool SVGPaintContext::applyMaskIfNecessary(SVGResources* resources) |
147 { | 147 { |
148 if (LayoutSVGResourceMasker* masker = resources ? resources->masker() : null
ptr) { | 148 if (LayoutSVGResourceMasker* masker = resources ? resources->masker() : null
ptr) { |
149 if (!SVGMaskPainter(*masker).prepareEffect(m_object, m_paintInfo.context
)) | 149 if (!SVGMaskPainter(*masker).prepareEffect(*m_object, m_paintInfo.contex
t)) |
150 return false; | 150 return false; |
151 m_masker = masker; | 151 m_masker = masker; |
152 } | 152 } |
153 return true; | 153 return true; |
154 } | 154 } |
155 | 155 |
156 bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources) | 156 bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources) |
157 { | 157 { |
158 if (!resources) { | 158 if (!resources) { |
159 if (m_object->style()->svgStyle().hasFilter()) | 159 if (m_object->style()->svgStyle().hasFilter()) |
(...skipping 31 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 |