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

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

Issue 2852573002: Rename InvalidatePaintIfNeeded to drop deprecated IfNeeded suffix. (Closed)
Patch Set: Created 3 years, 7 months 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/ViewPaintInvalidator.h" 5 #include "core/paint/ViewPaintInvalidator.h"
6 6
7 #include "core/layout/LayoutView.h" 7 #include "core/layout/LayoutView.h"
8 #include "core/paint/BoxPaintInvalidator.h" 8 #include "core/paint/BoxPaintInvalidator.h"
9 #include "platform/geometry/LayoutSize.h" 9 #include "platform/geometry/LayoutSize.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 PaintInvalidationReason ViewPaintInvalidator::InvalidatePaintIfNeeded() { 13 PaintInvalidationReason ViewPaintInvalidator::InvalidatePaint() {
14 InvalidateBackgroundIfNeeded(); 14 InvalidateBackgroundIfNeeded();
15 return BoxPaintInvalidator(view_, context_).InvalidatePaintIfNeeded(); 15 return BoxPaintInvalidator(view_, context_).InvalidatePaint();
16 } 16 }
17 17
18 void ViewPaintInvalidator::InvalidateBackgroundIfNeeded() { 18 void ViewPaintInvalidator::InvalidateBackgroundIfNeeded() {
19 // Fixed attachment background is handled in LayoutView::layout(). 19 // Fixed attachment background is handled in LayoutView::layout().
20 // TODO(wangxianzhu): Combine code for fixed-attachment background when we 20 // TODO(wangxianzhu): Combine code for fixed-attachment background when we
21 // enable rootLayerScrolling permanently. 21 // enable rootLayerScrolling permanently.
22 if (view_.StyleRef().HasEntirelyFixedBackground()) 22 if (view_.StyleRef().HasEntirelyFixedBackground())
23 return; 23 return;
24 24
25 // LayoutView's non-fixed-attachment background is positioned in the 25 // LayoutView's non-fixed-attachment background is positioned in the
(...skipping 15 matching lines...) Expand all
41 background_layers)) || 41 background_layers)) ||
42 (old_size.Height() != new_size.Height() && 42 (old_size.Height() != new_size.Height() &&
43 LayoutBox::MustInvalidateFillLayersPaintOnHeightChange( 43 LayoutBox::MustInvalidateFillLayersPaintOnHeightChange(
44 background_layers))) { 44 background_layers))) {
45 view_.GetMutableForPainting().SetShouldDoFullPaintInvalidation( 45 view_.GetMutableForPainting().SetShouldDoFullPaintInvalidation(
46 kPaintInvalidationViewBackground); 46 kPaintInvalidationViewBackground);
47 } 47 }
48 } 48 }
49 49
50 } // namespace blink 50 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ViewPaintInvalidator.h ('k') | third_party/WebKit/Source/core/plugins/PluginView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698