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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1813383002: Move all fast-path paint invalidation mapping into PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1093
1094 RELEASE_ASSERT(layoutView()); 1094 RELEASE_ASSERT(layoutView());
1095 LayoutView& rootForPaintInvalidation = *layoutView(); 1095 LayoutView& rootForPaintInvalidation = *layoutView();
1096 ASSERT(!rootForPaintInvalidation.needsLayout()); 1096 ASSERT(!rootForPaintInvalidation.needsLayout());
1097 1097
1098 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation.debugName().ascii()); 1098 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval idation.debugName().ascii());
1099 1099
1100 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); 1100 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState);
1101 1101
1102 if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls()) { 1102 if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls()) {
1103 paintInvalidationState.setViewClippingAndScrollOffsetDisabled(true); 1103 LayoutView::setViewClippingAndScrollOffsetDisabled(true);
1104 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); 1104 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState);
1105 paintInvalidationState.setViewClippingAndScrollOffsetDisabled(false); 1105 LayoutView::setViewClippingAndScrollOffsetDisabled(false);
1106 } 1106 }
1107 1107
1108 #if ENABLE(ASSERT) 1108 #if ENABLE(ASSERT)
1109 layoutView()->assertSubtreeClearedPaintInvalidationState(); 1109 layoutView()->assertSubtreeClearedPaintInvalidationFlags();
1110 #endif 1110 #endif
1111 1111
1112 if (m_frame->selection().isCaretBoundsDirty()) 1112 if (m_frame->selection().isCaretBoundsDirty())
1113 m_frame->selection().invalidateCaretRect(); 1113 m_frame->selection().invalidateCaretRect();
1114 1114
1115 m_doFullPaintInvalidation = false; 1115 m_doFullPaintInvalidation = false;
1116 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); 1116 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
1117 1117
1118 // Temporary callback for crbug.com/487345,402044 1118 // Temporary callback for crbug.com/487345,402044
1119 // TODO(ojan): Make this more general to be used by PositionObserver 1119 // TODO(ojan): Make this more general to be used by PositionObserver
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 2107
2108 toLayoutCounter(layoutObject)->updateCounter(); 2108 toLayoutCounter(layoutObject)->updateCounter();
2109 } 2109 }
2110 } 2110 }
2111 2111
2112 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co nst 2112 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co nst
2113 { 2113 {
2114 ASSERT(m_frame->view() == this); 2114 ASSERT(m_frame->view() == this);
2115 2115
2116 LayoutRect clipRect(LayoutPoint(), LayoutSize(visibleContentSize(scrollbarIn clusion))); 2116 LayoutRect clipRect(LayoutPoint(), LayoutSize(visibleContentSize(scrollbarIn clusion)));
2117 layoutView()->mapToVisibleRectInAncestorSpace(&layoutView()->containerForPai ntInvalidation(), clipRect, nullptr); 2117 layoutView()->mapToVisibleRectInAncestorSpace(&layoutView()->containerForPai ntInvalidation(), clipRect);
2118 return enclosingIntRect(clipRect); 2118 return enclosingIntRect(clipRect);
2119 } 2119 }
2120 2120
2121 bool FrameView::shouldUseIntegerScrollOffset() const 2121 bool FrameView::shouldUseIntegerScrollOffset() const
2122 { 2122 {
2123 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE nabled()) 2123 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE nabled())
2124 return true; 2124 return true;
2125 2125
2126 return ScrollableArea::shouldUseIntegerScrollOffset(); 2126 return ScrollableArea::shouldUseIntegerScrollOffset();
2127 } 2127 }
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
3965 LayoutRect viewRect = localFrame->contentLayoutObject()->viewRect(); 3965 LayoutRect viewRect = localFrame->contentLayoutObject()->viewRect();
3966 const LayoutBoxModelObject& paintInvalidationContainer = localFrame->content LayoutObject()->containerForPaintInvalidation(); 3966 const LayoutBoxModelObject& paintInvalidationContainer = localFrame->content LayoutObject()->containerForPaintInvalidation();
3967 // If the frame is being throttled, its compositing state may not be up to d ate. 3967 // If the frame is being throttled, its compositing state may not be up to d ate.
3968 if (!paintInvalidationContainer.enclosingLayer()->isAllowedToQueryCompositin gState()) 3968 if (!paintInvalidationContainer.enclosingLayer()->isAllowedToQueryCompositin gState())
3969 return; 3969 return;
3970 const GraphicsLayer* graphicsLayer = paintInvalidationContainer.enclosingLay er()->graphicsLayerBacking(); 3970 const GraphicsLayer* graphicsLayer = paintInvalidationContainer.enclosingLay er()->graphicsLayerBacking();
3971 3971
3972 if (!graphicsLayer) 3972 if (!graphicsLayer)
3973 return; 3973 return;
3974 3974
3975 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec t(), &paintInvalidationContainer, viewRect); 3975 PaintLayer::mapRectToPaintInvalidationBacking(*localFrame->contentLayoutObje ct(), paintInvalidationContainer, viewRect);
3976 3976
3977 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3977 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3978 } 3978 }
3979 3979
3980 void FrameView::setNeedsUpdateViewportIntersection() 3980 void FrameView::setNeedsUpdateViewportIntersection()
3981 { 3981 {
3982 m_needsUpdateViewportIntersection = true; 3982 m_needsUpdateViewportIntersection = true;
3983 for (FrameView* parent = parentFrameView(); parent; parent = parent->parentF rameView()) 3983 for (FrameView* parent = parentFrameView(); parent; parent = parent->parentF rameView())
3984 parent->m_needsUpdateViewportIntersectionInSubtree = true; 3984 parent->m_needsUpdateViewportIntersectionInSubtree = true;
3985 } 3985 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4095 return m_hiddenForThrottling && m_crossOriginForThrottling; 4095 return m_hiddenForThrottling && m_crossOriginForThrottling;
4096 } 4096 }
4097 4097
4098 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4098 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4099 { 4099 {
4100 ASSERT(layoutView()); 4100 ASSERT(layoutView());
4101 return *layoutView(); 4101 return *layoutView();
4102 } 4102 }
4103 4103
4104 } // namespace blink 4104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698