OLD | NEW |
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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 DCHECK(context.treeBuilderContext.current.paintOffset == | 385 DCHECK(context.treeBuilderContext.current.paintOffset == |
386 object.paintOffset()); | 386 object.paintOffset()); |
387 | 387 |
388 if (!context.forcedSubtreeInvalidationFlags && | 388 if (!context.forcedSubtreeInvalidationFlags && |
389 !object | 389 !object |
390 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()) | 390 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()) |
391 return; | 391 return; |
392 | 392 |
393 updatePaintingLayer(object, context); | 393 updatePaintingLayer(object, context); |
394 | 394 |
395 if (object.document().printing()) | 395 if (object.document().printing() && |
| 396 !RuntimeEnabledFeatures::printBrowserEnabled()) |
396 return; // Don't invalidate paints if we're printing. | 397 return; // Don't invalidate paints if we're printing. |
397 | 398 |
398 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), | 399 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), |
399 "PaintInvalidator::invalidatePaintIfNeeded()", "object", | 400 "PaintInvalidator::invalidatePaintIfNeeded()", "object", |
400 object.debugName().ascii()); | 401 object.debugName().ascii()); |
401 | 402 |
402 updateContext(object, context); | 403 updateContext(object, context); |
403 | 404 |
404 if (!object | 405 if (!object |
405 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()
&& | 406 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()
&& |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
447 } | 448 } |
448 | 449 |
449 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 450 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
450 for (auto target : m_pendingDelayedPaintInvalidations) | 451 for (auto target : m_pendingDelayedPaintInvalidations) |
451 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 452 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
452 PaintInvalidationDelayedFull); | 453 PaintInvalidationDelayedFull); |
453 } | 454 } |
454 | 455 |
455 } // namespace blink | 456 } // namespace blink |
OLD | NEW |