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

Side by Side Diff: Source/core/layout/PaintInvalidationState.cpp

Issue 1209133002: Traverse into child LayoutViews during invalidateTreeIfNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: public invalidateTreeIfNeeded Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/PaintInvalidationState.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/layout/PaintInvalidationState.h" 6 #include "core/layout/PaintInvalidationState.h"
7 7
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "core/layout/svg/LayoutSVGModelObject.h" 10 #include "core/layout/svg/LayoutSVGModelObject.h"
11 #include "core/layout/svg/LayoutSVGRoot.h" 11 #include "core/layout/svg/LayoutSVGRoot.h"
12 #include "core/paint/DeprecatedPaintLayer.h" 12 #include "core/paint/DeprecatedPaintLayer.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec tor<LayoutObject*>& pendingDelayedPaintInvalidations) 16 PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec tor<LayoutObject*>& pendingDelayedPaintInvalidations, PaintInvalidationState* ow nerPaintInvalidationState)
17 : m_clipped(false) 17 : m_clipped(false)
18 , m_cachedOffsetsEnabled(true) 18 , m_cachedOffsetsEnabled(true)
19 , m_forceCheckForPaintInvalidation(false) 19 , m_forceCheckForPaintInvalidation(false)
20 , m_paintInvalidationContainer(*layoutView.containerForPaintInvalidation()) 20 , m_paintInvalidationContainer(*layoutView.containerForPaintInvalidation())
21 , m_pendingDelayedPaintInvalidations(pendingDelayedPaintInvalidations) 21 , m_pendingDelayedPaintInvalidations(pendingDelayedPaintInvalidations)
22 { 22 {
23 bool establishesPaintInvalidationContainer = layoutView == m_paintInvalidati onContainer; 23 bool establishesPaintInvalidationContainer = layoutView == m_paintInvalidati onContainer;
24 if (!establishesPaintInvalidationContainer) { 24 if (!establishesPaintInvalidationContainer) {
25 if (!layoutView.supportsPaintInvalidationStateCachedOffsets()) { 25 if ((ownerPaintInvalidationState && !ownerPaintInvalidationState->m_cach edOffsetsEnabled)
26 || !layoutView.supportsPaintInvalidationStateCachedOffsets()) {
26 m_cachedOffsetsEnabled = false; 27 m_cachedOffsetsEnabled = false;
27 return; 28 return;
28 } 29 }
30 if (ownerPaintInvalidationState && ownerPaintInvalidationState->m_forceC heckForPaintInvalidation)
31 m_forceCheckForPaintInvalidation = true;
29 FloatPoint point = layoutView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries); 32 FloatPoint point = layoutView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries);
30 m_paintOffset = LayoutSize(point.x(), point.y()); 33 m_paintOffset = LayoutSize(point.x(), point.y());
31 } 34 }
32 m_clipRect = layoutView.viewRect(); 35 m_clipRect = layoutView.viewRect();
33 m_clipRect.move(m_paintOffset); 36 m_clipRect.move(m_paintOffset);
34 m_clipped = true; 37 m_clipped = true;
35 } 38 }
36 39
37 PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, Lay outBoxModelObject& layoutObject, const LayoutBoxModelObject& paintInvalidationCo ntainer) 40 PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, Lay outBoxModelObject& layoutObject, const LayoutBoxModelObject& paintInvalidationCo ntainer)
38 : m_clipped(false) 41 : m_clipped(false)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // to be always invalidated in-time. 130 // to be always invalidated in-time.
128 if (box.usesCompositedScrolling()) 131 if (box.usesCompositedScrolling())
129 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited. 132 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited.
130 else 133 else
131 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size())); 134 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size()));
132 135
133 m_paintOffset -= box.scrolledContentOffset(); 136 m_paintOffset -= box.scrolledContentOffset();
134 } 137 }
135 138
136 } // namespace blink 139 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/PaintInvalidationState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698