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

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

Issue 2299223002: Compile under-invalidation checking in all builds (Closed)
Patch Set: Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/BoxPainter.h" 5 #include "core/paint/BoxPainter.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLFrameOwnerElement.h" 9 #include "core/html/HTMLFrameOwnerElement.h"
10 #include "core/layout/ImageQualityController.h" 10 #include "core/layout/ImageQualityController.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } // anonymous namespace 99 } // anonymous namespace
100 100
101 void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo , const LayoutPoint& paintOffset, const LayoutRect& paintRect) 101 void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo , const LayoutPoint& paintOffset, const LayoutRect& paintRect)
102 { 102 {
103 bool paintingOverflowContents = isPaintingBackgroundOfPaintContainerIntoScro llingContentsLayer(&m_layoutBox, paintInfo); 103 bool paintingOverflowContents = isPaintingBackgroundOfPaintContainerIntoScro llingContentsLayer(&m_layoutBox, paintInfo);
104 const ComputedStyle& style = m_layoutBox.styleRef(); 104 const ComputedStyle& style = m_layoutBox.styleRef();
105 105
106 Optional<DisplayItemCacheSkipper> cacheSkipper; 106 Optional<DisplayItemCacheSkipper> cacheSkipper;
107 // Disable cache in under-invalidation checking mode for MediaSliderPart bec ause we always paint using the 107 // Disable cache in under-invalidation checking mode for MediaSliderPart bec ause we always paint using the
108 // latest data (buffered ranges, current time and duration) which may be dif ferent from the cached data. 108 // latest data (buffered ranges, current time and duration) which may be dif ferent from the cached data.
109 if ((RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled() && style.appearance() == MediaSliderPart) 109 if ((RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled() && styl e.appearance() == MediaSliderPart)
110 // We may paint a delayed-invalidation object before it's actually inval idated. Note this would be handled for 110 // We may paint a delayed-invalidation object before it's actually inval idated. Note this would be handled for
111 // us by LayoutObjectDrawingRecorder but we have to use DrawingRecorder as we may use the scrolling contents 111 // us by LayoutObjectDrawingRecorder but we have to use DrawingRecorder as we may use the scrolling contents
112 // layer as DisplayItemClient below. 112 // layer as DisplayItemClient below.
113 || m_layoutBox.fullPaintInvalidationReason() == PaintInvalidationDelayed Full) { 113 || m_layoutBox.fullPaintInvalidationReason() == PaintInvalidationDelayed Full) {
114 cacheSkipper.emplace(paintInfo.context); 114 cacheSkipper.emplace(paintInfo.context);
115 } 115 }
116 116
117 const DisplayItemClient& displayItemClient = paintingOverflowContents ? stat ic_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping() ->scrollingContentsLayer()) : m_layoutBox; 117 const DisplayItemClient& displayItemClient = paintingOverflowContents ? stat ic_cast<const DisplayItemClient&>(*m_layoutBox.layer()->compositedLayerMapping() ->scrollingContentsLayer()) : m_layoutBox;
118 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayIt emClient, DisplayItem::kBoxDecorationBackground)) 118 if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayIt emClient, DisplayItem::kBoxDecorationBackground))
119 return; 119 return;
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 } 867 }
868 } 868 }
869 869
870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) 870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document)
871 { 871 {
872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy 872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus tEconomy
873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); 873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ());
874 } 874 }
875 875
876 } // namespace blink 876 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698