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

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

Issue 1389803002: Skip paint offset caching when DisplayItemList is skipping cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TableCellBackground
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/InlinePainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/paint/BlockPainter.h" 6 #include "core/paint/BlockPainter.h"
7 7
8 #include "core/editing/DragCaretController.h" 8 #include "core/editing/DragCaretController.h"
9 #include "core/editing/FrameSelection.h" 9 #include "core/editing/FrameSelection.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 layoutObject.paint(info, childPoint); 136 layoutObject.paint(info, childPoint);
137 info.phase = PaintPhaseForeground; 137 info.phase = PaintPhaseForeground;
138 layoutObject.paint(info, childPoint); 138 layoutObject.paint(info, childPoint);
139 info.phase = PaintPhaseOutline; 139 info.phase = PaintPhaseOutline;
140 layoutObject.paint(info, childPoint); 140 layoutObject.paint(info, childPoint);
141 } 141 }
142 } 142 }
143 143
144 void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) 144 void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset)
145 { 145 {
146 if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && m_layoutB lock.childrenInline()) { 146 if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && m_layoutB lock.childrenInline() && !paintInfo.context->displayItemList()->skippingCache()) {
pdr. 2015/10/06 03:10:25 WDYT about renaming skippingCache to skippingCache
Xianzhu 2015/10/06 16:35:23 I think paint offset cache is also a cache that sk
147 if (m_layoutBlock.paintOffsetChanged(paintOffset)) { 147 if (m_layoutBlock.paintOffsetChanged(paintOffset)) {
148 LineBoxListPainter(m_layoutBlock.lineBoxes()).invalidateLineBoxPaint Offsets(paintInfo); 148 LineBoxListPainter(m_layoutBlock.lineBoxes()).invalidateLineBoxPaint Offsets(paintInfo);
149 paintInfo.context->displayItemList()->invalidatePaintOffset(m_layout Block); 149 paintInfo.context->displayItemList()->invalidatePaintOffset(m_layout Block);
150 } 150 }
151 // Set previousPaintOffset here in case that m_layoutBlock paints nothin g and no 151 // Set previousPaintOffset here in case that m_layoutBlock paints nothin g and no
152 // LayoutObjectDrawingRecorder updates its previousPaintOffset. 152 // LayoutObjectDrawingRecorder updates its previousPaintOffset.
153 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv alidation. 153 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv alidation.
154 m_layoutBlock.setPreviousPaintOffset(paintOffset); 154 m_layoutBlock.setPreviousPaintOffset(paintOffset);
155 } 155 }
156 156
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 // We don't paint our own background, but we do let the kids paint their backgrounds. 260 // We don't paint our own background, but we do let the kids paint their backgrounds.
261 PaintInfo paintInfoForChild(paintInfo); 261 PaintInfo paintInfoForChild(paintInfo);
262 paintInfoForChild.phase = newPhase; 262 paintInfoForChild.phase = newPhase;
263 paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock); 263 paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock);
264 m_layoutBlock.paintChildren(paintInfoForChild, paintOffset); 264 m_layoutBlock.paintChildren(paintInfoForChild, paintOffset);
265 } 265 }
266 } 266 }
267 267
268 } // namespace blink 268 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/InlinePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698