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

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

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl 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
(...skipping 25 matching lines...) Expand all
36 LayoutSize old_size = background_box.PreviousSize(); 36 LayoutSize old_size = background_box.PreviousSize();
37 LayoutSize new_size = background_box.Size(); 37 LayoutSize new_size = background_box.Size();
38 const auto& background_layers = view_.StyleRef().BackgroundLayers(); 38 const auto& background_layers = view_.StyleRef().BackgroundLayers();
39 if ((old_size.Width() != new_size.Width() && 39 if ((old_size.Width() != new_size.Width() &&
40 LayoutBox::MustInvalidateFillLayersPaintOnWidthChange( 40 LayoutBox::MustInvalidateFillLayersPaintOnWidthChange(
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 PaintInvalidationReason::kBackground);
47 } 47 }
48 } 48 }
49 49
50 } // namespace blink 50 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698