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

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

Issue 2423513002: Simplify incremental paint invalidation (Closed)
Patch Set: Update test and rebaseline layout tests Created 4 years, 1 month 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
(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
13 SVGModelObjectPaintInvalidator::invalidatePaintIfNeeded() {
14 ObjectPaintInvalidatorWithContext objectPaintInvalidator(m_object, m_context);
15 PaintInvalidationReason reason =
16 objectPaintInvalidator.computePaintInvalidationReason();
17
18 // Disable incremental invalidation for SVG objects to prevent under-
19 // invalidation. Unlike boxes, it is non-trivial (and rare) for SVG objects
20 // to be able to be incrementally invalidated (e.g., on height changes).
21 if (reason == PaintInvalidationIncremental &&
22 m_context.oldBounds != m_context.newBounds)
23 reason = PaintInvalidationFull;
24
25 return objectPaintInvalidator.invalidatePaintIfNeededWithComputedReason(
26 reason);
27 }
28
29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698