Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index 2a5c4d143e73884234b4f620d1ef50914e9f5326..80b9371b6e3b21968616a2e4fcf2a1ca28937379 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -1092,8 +1092,10 @@ void FrameView::layout() |
| frame().document()->layoutUpdated(); |
| } |
| -void FrameView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidationState) |
| +void FrameView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) |
| { |
| + DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| + |
| if (shouldThrottleRendering()) |
| return; |
| @@ -1106,25 +1108,27 @@ void FrameView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidation |
| TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInvalidation.debugName().ascii()); |
| rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); |
| + invalidatePaintIfNeeded(paintInvalidationState); |
| + lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| +} |
| + |
| +void FrameView::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState) |
| +{ |
| + RELEASE_ASSERT(!layoutViewItem().isNull()); |
| if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls()) |
| invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); |
| -#if ENABLE(ASSERT) |
|
pdr.
2016/06/03 04:43:04
This assert got dropped but it's still useful (may
Xianzhu
2016/06/03 16:46:17
This is an accident. Restored.
|
| - layoutView()->assertSubtreeClearedPaintInvalidationFlags(); |
| -#endif |
| - |
| if (m_frame->selection().isCaretBoundsDirty()) |
| m_frame->selection().invalidateCaretRect(); |
| m_doFullPaintInvalidation = false; |
| - lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| // Temporary callback for crbug.com/487345,402044 |
| // TODO(ojan): Make this more general to be used by PositionObserver |
| // and rAF throttling. |
| IntRect visibleRect = rootFrameToContents(computeVisibleArea()); |
| - rootForPaintInvalidation.sendMediaPositionChangeNotifications(visibleRect); |
| + layoutViewItem().sendMediaPositionChangeNotifications(visibleRect); |
| } |
| IntRect FrameView::computeVisibleArea() |
| @@ -2463,7 +2467,8 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) |
| ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
| if (phases == AllPhases || phases == AllPhasesExceptPaint) { |
| - invalidateTreeIfNeededRecursive(); |
| + if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| + invalidateTreeIfNeededRecursive(); |
| if (view.compositor()->inCompositingMode()) |
| scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); |
| @@ -2672,7 +2677,8 @@ void FrameView::invalidateTreeIfNeededRecursive() |
| void FrameView::invalidateTreeIfNeededRecursiveInternal() |
| { |
| - RELEASE_ASSERT(layoutView()); |
| + DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| + CHECK(layoutView()); |
| // We need to stop recursing here since a child frame view might not be throttled |
| // even though we are (e.g., it didn't compute its visibility yet). |
| @@ -2680,7 +2686,7 @@ void FrameView::invalidateTreeIfNeededRecursiveInternal() |
| return; |
| TRACE_EVENT1("blink", "FrameView::invalidateTreeIfNeededRecursive", "root", layoutView()->debugName().ascii()); |
| - Vector<LayoutObject*> pendingDelayedPaintInvalidations; |
| + Vector<const LayoutObject*> pendingDelayedPaintInvalidations; |
| PaintInvalidationState rootPaintInvalidationState(*layoutView(), pendingDelayedPaintInvalidations); |
| if (lifecycle().state() < DocumentLifecycle::PaintInvalidationClean) |
| @@ -2705,7 +2711,7 @@ void FrameView::invalidateTreeIfNeededRecursiveInternal() |
| // Process objects needing paint invalidation on the next frame. See the definition of PaintInvalidationDelayedFull for more details. |
| for (auto& target : pendingDelayedPaintInvalidations) |
| - target->setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull); |
| + target->getMutableForPainting().setShouldDoDelayedFullPaintInvalidation(); |
| } |
| void FrameView::enableAutoSizeMode(const IntSize& minSize, const IntSize& maxSize) |