| Index: third_party/WebKit/Source/core/paint/SVGModelObjectPaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/SVGModelObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/SVGModelObjectPaintInvalidator.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..567e24bfe2ad6ce8cf921d4a351d4ce7ad0edff5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/paint/SVGModelObjectPaintInvalidator.cpp
|
| @@ -0,0 +1,25 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/paint/SVGModelObjectPaintInvalidator.h"
|
| +
|
| +#include "core/layout/svg/LayoutSVGModelObject.h"
|
| +#include "core/paint/ObjectPaintInvalidator.h"
|
| +
|
| +namespace blink {
|
| +
|
| +PaintInvalidationReason SVGModelObjectPaintInvalidator::invalidatePaintIfNeeded()
|
| +{
|
| + PaintInvalidationReason reason = ObjectPaintInvalidator(m_object, m_context).computePaintInvalidationReason();
|
| +
|
| + // Disable incremental invalidation for SVG objects to prevent under-
|
| + // invalidation. Unlike boxes, it is non-trivial (and rare) for SVG objects
|
| + // to be able to be incrementally invalidated (e.g., on height changes).
|
| + if (reason == PaintInvalidationIncremental)
|
| + reason = PaintInvalidationFull;
|
| +
|
| + return ObjectPaintInvalidator(m_object, m_context).invalidatePaintIfNeededWithComputedReason(reason);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|