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

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

Issue 1387923002: LayoutObject::invalidatePaintIfNeededForSynchronizedPainting() and plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() && !paintInfo.context->displayItemList()->skippingCache()) { 146 if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && m_layoutB lock.childrenInline() && !paintInfo.context->displayItemList()->skippingCache()) {
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.mutableForPainting().setPreviousPaintOffset(paintOffset);
155 } 155 }
156 156
157 const PaintPhase paintPhase = paintInfo.phase; 157 const PaintPhase paintPhase = paintInfo.phase;
158 158
159 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) 159 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground)
160 && m_layoutBlock.style()->visibility() == VISIBLE 160 && m_layoutBlock.style()->visibility() == VISIBLE
161 && m_layoutBlock.hasBoxDecorationBackground()) 161 && m_layoutBlock.hasBoxDecorationBackground())
162 m_layoutBlock.paintBoxDecorationBackground(paintInfo, paintOffset); 162 m_layoutBlock.paintBoxDecorationBackground(paintInfo, paintOffset);
163 163
164 if (paintPhase == PaintPhaseMask && m_layoutBlock.style()->visibility() == V ISIBLE) { 164 if (paintPhase == PaintPhaseMask && m_layoutBlock.style()->visibility() == V ISIBLE) {
(...skipping 94 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 | « third_party/WebKit/Source/core/layout/PaintInvalidationState.h ('k') | third_party/WebKit/Source/core/paint/InlinePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698