Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp

Issue 2581243003: [SPInvalidation] Update paint properties when SVG resource change (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 TreeScope* PaintLayerResourceInfo::treeScope() { 44 TreeScope* PaintLayerResourceInfo::treeScope() {
45 DCHECK(m_layer); 45 DCHECK(m_layer);
46 Node* node = m_layer->layoutObject()->node(); 46 Node* node = m_layer->layoutObject()->node();
47 return node ? &node->treeScope() : nullptr; 47 return node ? &node->treeScope() : nullptr;
48 } 48 }
49 49
50 void PaintLayerResourceInfo::resourceContentChanged() { 50 void PaintLayerResourceInfo::resourceContentChanged() {
51 DCHECK(m_layer); 51 DCHECK(m_layer);
52 LayoutObject* layoutObject = m_layer->layoutObject(); 52 LayoutObject* layoutObject = m_layer->layoutObject();
53 layoutObject->setShouldDoFullPaintInvalidation(); 53 layoutObject->setShouldDoFullPaintInvalidation();
54 layoutObject->setNeedsPaintPropertyUpdate();
pdr. 2016/12/16 21:13:37 Can you add a comment here and below: // The effec
Xianzhu 2016/12/16 23:01:43 Done.
54 const ComputedStyle& style = layoutObject->styleRef(); 55 const ComputedStyle& style = layoutObject->styleRef();
55 if (style.hasFilter() && style.filter().hasReferenceFilter()) 56 if (style.hasFilter() && style.filter().hasReferenceFilter())
56 invalidateFilterChain(); 57 invalidateFilterChain();
57 } 58 }
58 59
59 void PaintLayerResourceInfo::resourceElementChanged() { 60 void PaintLayerResourceInfo::resourceElementChanged() {
60 DCHECK(m_layer); 61 DCHECK(m_layer);
61 LayoutObject* layoutObject = m_layer->layoutObject(); 62 LayoutObject* layoutObject = m_layer->layoutObject();
62 layoutObject->setShouldDoFullPaintInvalidation(); 63 layoutObject->setShouldDoFullPaintInvalidation();
64 layoutObject->setNeedsPaintPropertyUpdate();
63 const ComputedStyle& style = layoutObject->styleRef(); 65 const ComputedStyle& style = layoutObject->styleRef();
64 if (style.hasFilter() && style.filter().hasReferenceFilter()) 66 if (style.hasFilter() && style.filter().hasReferenceFilter())
65 invalidateFilterChain(); 67 invalidateFilterChain();
66 } 68 }
67 69
68 void PaintLayerResourceInfo::setLastEffect(FilterEffect* lastEffect) { 70 void PaintLayerResourceInfo::setLastEffect(FilterEffect* lastEffect) {
69 m_lastEffect = lastEffect; 71 m_lastEffect = lastEffect;
70 } 72 }
71 73
72 FilterEffect* PaintLayerResourceInfo::lastEffect() const { 74 FilterEffect* PaintLayerResourceInfo::lastEffect() const {
73 return m_lastEffect; 75 return m_lastEffect;
74 } 76 }
75 77
76 void PaintLayerResourceInfo::invalidateFilterChain() { 78 void PaintLayerResourceInfo::invalidateFilterChain() {
77 m_lastEffect = nullptr; 79 m_lastEffect = nullptr;
78 } 80 }
79 81
80 DEFINE_TRACE(PaintLayerResourceInfo) { 82 DEFINE_TRACE(PaintLayerResourceInfo) {
81 visitor->trace(m_lastEffect); 83 visitor->trace(m_lastEffect);
82 SVGResourceClient::trace(visitor); 84 SVGResourceClient::trace(visitor);
83 } 85 }
84 86
85 } // namespace blink 87 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698