| Index: third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp b/third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
|
| similarity index 63%
|
| rename from third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
|
| rename to third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
|
| index d34a1825a7f7ea06a842c17ba4bf820070e4d4e3..a41e6f87f67ef3bfa9abe0db8fd50f4542ef0dfa 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
|
| @@ -27,51 +27,57 @@
|
| * SUCH DAMAGE.
|
| */
|
|
|
| -#include "core/paint/PaintLayerFilterInfo.h"
|
| +#include "core/paint/PaintLayerResourceInfo.h"
|
|
|
| #include "core/paint/PaintLayer.h"
|
| #include "platform/graphics/filters/FilterEffect.h"
|
|
|
| namespace blink {
|
|
|
| -PaintLayerFilterInfo::PaintLayerFilterInfo(PaintLayer* layer)
|
| +PaintLayerResourceInfo::PaintLayerResourceInfo(PaintLayer* layer)
|
| : m_layer(layer) {}
|
|
|
| -PaintLayerFilterInfo::~PaintLayerFilterInfo() {
|
| +PaintLayerResourceInfo::~PaintLayerResourceInfo() {
|
| DCHECK(!m_layer);
|
| }
|
|
|
| -TreeScope* PaintLayerFilterInfo::treeScope() {
|
| +TreeScope* PaintLayerResourceInfo::treeScope() {
|
| DCHECK(m_layer);
|
| Node* node = m_layer->layoutObject()->node();
|
| return node ? &node->treeScope() : nullptr;
|
| }
|
|
|
| -void PaintLayerFilterInfo::resourceContentChanged() {
|
| +void PaintLayerResourceInfo::resourceContentChanged() {
|
| DCHECK(m_layer);
|
| - m_layer->layoutObject()->setShouldDoFullPaintInvalidation();
|
| - invalidateFilterChain();
|
| + LayoutObject* layoutObject = m_layer->layoutObject();
|
| + layoutObject->setShouldDoFullPaintInvalidation();
|
| + const ComputedStyle& style = layoutObject->styleRef();
|
| + if (style.hasFilter() && style.filter().hasReferenceFilter())
|
| + invalidateFilterChain();
|
| }
|
|
|
| -void PaintLayerFilterInfo::resourceElementChanged() {
|
| +void PaintLayerResourceInfo::resourceElementChanged() {
|
| DCHECK(m_layer);
|
| - m_layer->layoutObject()->setShouldDoFullPaintInvalidation();
|
| - invalidateFilterChain();
|
| + LayoutObject* layoutObject = m_layer->layoutObject();
|
| + layoutObject->setShouldDoFullPaintInvalidation();
|
| + const ComputedStyle& style = layoutObject->styleRef();
|
| + if (style.hasFilter() && style.filter().hasReferenceFilter())
|
| + invalidateFilterChain();
|
| }
|
|
|
| -void PaintLayerFilterInfo::setLastEffect(FilterEffect* lastEffect) {
|
| +void PaintLayerResourceInfo::setLastEffect(FilterEffect* lastEffect) {
|
| m_lastEffect = lastEffect;
|
| }
|
|
|
| -FilterEffect* PaintLayerFilterInfo::lastEffect() const {
|
| +FilterEffect* PaintLayerResourceInfo::lastEffect() const {
|
| return m_lastEffect;
|
| }
|
|
|
| -void PaintLayerFilterInfo::invalidateFilterChain() {
|
| +void PaintLayerResourceInfo::invalidateFilterChain() {
|
| m_lastEffect = nullptr;
|
| }
|
|
|
| -DEFINE_TRACE(PaintLayerFilterInfo) {
|
| +DEFINE_TRACE(PaintLayerResourceInfo) {
|
| visitor->trace(m_lastEffect);
|
| SVGResourceClient::trace(visitor);
|
| }
|
|
|