| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
| 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 27 * SUCH DAMAGE. | 27 * SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 #include "core/paint/DeprecatedPaintLayerFilterInfo.h" | 31 #include "core/paint/DeprecatedPaintLayerFilterInfo.h" |
| 32 | 32 |
| 33 #include "core/fetch/DocumentResourceReference.h" | 33 #include "core/fetch/DocumentResourceReference.h" |
| 34 #include "core/layout/FilterEffectRenderer.h" | |
| 35 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 34 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| 36 #include "core/layout/svg/ReferenceFilterBuilder.h" | 35 #include "core/layout/svg/ReferenceFilterBuilder.h" |
| 37 #include "core/paint/DeprecatedPaintLayer.h" | 36 #include "core/paint/DeprecatedPaintLayer.h" |
| 37 #include "core/paint/FilterEffectBuilder.h" |
| 38 #include "core/svg/SVGFilterElement.h" | 38 #include "core/svg/SVGFilterElement.h" |
| 39 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | |
| 40 #include "core/svg/graphics/filters/SVGFilter.h" | |
| 41 | 39 |
| 42 namespace blink { | 40 namespace blink { |
| 43 | 41 |
| 44 DeprecatedPaintLayerFilterInfoMap* DeprecatedPaintLayerFilterInfo::s_filterMap =
0; | 42 DeprecatedPaintLayerFilterInfoMap* DeprecatedPaintLayerFilterInfo::s_filterMap =
0; |
| 45 | 43 |
| 46 DeprecatedPaintLayerFilterInfo* DeprecatedPaintLayerFilterInfo::filterInfoForLay
er(const DeprecatedPaintLayer* layer) | 44 DeprecatedPaintLayerFilterInfo* DeprecatedPaintLayerFilterInfo::filterInfoForLay
er(const DeprecatedPaintLayer* layer) |
| 47 { | 45 { |
| 48 if (!s_filterMap) | 46 if (!s_filterMap) |
| 49 return 0; | 47 return 0; |
| 50 DeprecatedPaintLayerFilterInfoMap::iterator iter = s_filterMap->find(layer); | 48 DeprecatedPaintLayerFilterInfoMap::iterator iter = s_filterMap->find(layer); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 DeprecatedPaintLayerFilterInfo::DeprecatedPaintLayerFilterInfo(DeprecatedPaintLa
yer* layer) | 86 DeprecatedPaintLayerFilterInfo::DeprecatedPaintLayerFilterInfo(DeprecatedPaintLa
yer* layer) |
| 89 : m_layer(layer) | 87 : m_layer(layer) |
| 90 { | 88 { |
| 91 } | 89 } |
| 92 | 90 |
| 93 DeprecatedPaintLayerFilterInfo::~DeprecatedPaintLayerFilterInfo() | 91 DeprecatedPaintLayerFilterInfo::~DeprecatedPaintLayerFilterInfo() |
| 94 { | 92 { |
| 95 removeReferenceFilterClients(); | 93 removeReferenceFilterClients(); |
| 96 } | 94 } |
| 97 | 95 |
| 98 void DeprecatedPaintLayerFilterInfo::setRenderer(PassRefPtrWillBeRawPtr<FilterEf
fectRenderer> renderer) | 96 void DeprecatedPaintLayerFilterInfo::setBuilder(PassRefPtrWillBeRawPtr<FilterEff
ectBuilder> builder) |
| 99 { | 97 { |
| 100 m_renderer = renderer; | 98 m_builder = builder; |
| 101 } | 99 } |
| 102 | 100 |
| 103 void DeprecatedPaintLayerFilterInfo::notifyFinished(Resource*) | 101 void DeprecatedPaintLayerFilterInfo::notifyFinished(Resource*) |
| 104 { | 102 { |
| 105 LayoutObject* layoutObject = m_layer->layoutObject(); | 103 LayoutObject* layoutObject = m_layer->layoutObject(); |
| 106 // FIXME: This caller of scheduleSVGFilterLayerUpdateHack() is not correct.
It's using the layer update | 104 // FIXME: This caller of scheduleSVGFilterLayerUpdateHack() is not correct.
It's using the layer update |
| 107 // system to trigger a Layer to go through the filter updating logic, but th
at might not | 105 // system to trigger a Layer to go through the filter updating logic, but th
at might not |
| 108 // even happen if this element is style sharing and LayoutObject::setStyle()
returns early. | 106 // even happen if this element is style sharing and LayoutObject::setStyle()
returns early. |
| 109 // Filters need to find a better way to hook into the system. | 107 // Filters need to find a better way to hook into the system. |
| 110 toElement(layoutObject->node())->scheduleSVGFilterLayerUpdateHack(); | 108 toElement(layoutObject->node())->scheduleSVGFilterLayerUpdateHack(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 if (filter->layoutObject()) | 149 if (filter->layoutObject()) |
| 152 toLayoutSVGResourceContainer(filter->layoutObject())->removeClientLa
yer(m_layer); | 150 toLayoutSVGResourceContainer(filter->layoutObject())->removeClientLa
yer(m_layer); |
| 153 else | 151 else |
| 154 toSVGFilterElement(filter)->removeClient(m_layer->layoutObject()->no
de()); | 152 toSVGFilterElement(filter)->removeClient(m_layer->layoutObject()->no
de()); |
| 155 } | 153 } |
| 156 m_internalSVGReferences.clear(); | 154 m_internalSVGReferences.clear(); |
| 157 } | 155 } |
| 158 | 156 |
| 159 } // namespace blink | 157 } // namespace blink |
| 160 | 158 |
| OLD | NEW |