OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/paint/SVGModelObjectPaintInvalidator.h" |
| 6 |
| 7 #include "core/layout/svg/LayoutSVGModelObject.h" |
| 8 #include "core/paint/ObjectPaintInvalidator.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 PaintInvalidationReason SVGModelObjectPaintInvalidator::invalidatePaintIfNeeded(
) |
| 13 { |
| 14 PaintInvalidationReason reason = ObjectPaintInvalidator(m_object, m_context)
.computePaintInvalidationReason(); |
| 15 |
| 16 // Disable incremental invalidation for SVG objects to prevent under- |
| 17 // invalidation. Unlike boxes, it is non-trivial (and rare) for SVG objects |
| 18 // to be able to be incrementally invalidated (e.g., on height changes). |
| 19 if (reason == PaintInvalidationIncremental) |
| 20 reason = PaintInvalidationFull; |
| 21 |
| 22 return ObjectPaintInvalidator(m_object, m_context).invalidatePaintIfNeededWi
thComputedReason(reason); |
| 23 } |
| 24 |
| 25 } // namespace blink |
OLD | NEW |