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