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

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

Issue 2575653002: [SPInvalidation] Invalidate all paint and properties for printing (Closed)
Patch Set: Add a passing test in TestExpectations Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // continue forcing a check for paint invalidation, since we're 306 // continue forcing a check for paint invalidation, since we're
307 // descending into a different invalidation container. (For instance if 307 // descending into a different invalidation container. (For instance if
308 // our parents were moved, the entire container will just move.) 308 // our parents were moved, the entire container will just move.)
309 if (object != context.paintInvalidationContainerForStackedContents) { 309 if (object != context.paintInvalidationContainerForStackedContents) {
310 // However, we need to keep the 310 // However, we need to keep the
311 // ForcedSubtreeFullInvalidationForStackedContents flag if the current 311 // ForcedSubtreeFullInvalidationForStackedContents flag if the current
312 // object isn't the paint invalidation container of stacked contents. 312 // object isn't the paint invalidation container of stacked contents.
313 context.forcedSubtreeInvalidationFlags &= PaintInvalidatorContext:: 313 context.forcedSubtreeInvalidationFlags &= PaintInvalidatorContext::
314 ForcedSubtreeFullInvalidationForStackedContents; 314 ForcedSubtreeFullInvalidationForStackedContents;
315 } else { 315 } else {
316 context.forcedSubtreeInvalidationFlags = 0; 316 // For SPv1, subtree flags don't cross paint invalidation container
317 // boundary except for ForcedWholeTreeFullInvalidation.
318 context.forcedSubtreeInvalidationFlags &=
319 PaintInvalidatorContext::ForcedWholeTreeFullInvalidation;
317 } 320 }
318 } 321 }
319 322
320 DCHECK(context.paintInvalidationContainer == 323 DCHECK(context.paintInvalidationContainer ==
321 object.containerForPaintInvalidation()); 324 object.containerForPaintInvalidation());
322 DCHECK(context.paintingLayer == object.paintingLayer()); 325 DCHECK(context.paintingLayer == object.paintingLayer());
323 326
324 if (object.mayNeedPaintInvalidationSubtree()) 327 if (object.mayNeedPaintInvalidationSubtree())
325 context.forcedSubtreeInvalidationFlags |= 328 context.forcedSubtreeInvalidationFlags |=
326 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; 329 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 445 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
443 } 446 }
444 447
445 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 448 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
446 for (auto target : m_pendingDelayedPaintInvalidations) 449 for (auto target : m_pendingDelayedPaintInvalidations)
447 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 450 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
448 PaintInvalidationDelayedFull); 451 PaintInvalidationDelayedFull);
449 } 452 }
450 453
451 } // namespace blink 454 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.h ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698