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

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: Created 5 years, 6 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
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)
17 : m_clipped(false) 17 : m_clipped(false)
18 , m_cachedOffsetsEnabled(true) 18 , m_cachedOffsetsEnabled(layoutView.paintInvalidationCachedOffsetsEnabledByP arent())
19 , m_forceCheckForPaintInvalidation(false) 19 , m_forceCheckForPaintInvalidation(layoutView.forceCheckForPaintInvalidation ByParent())
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 (m_cachedOffsetsEnabled && !layoutView.supportsPaintInvalidationState CachedOffsets())
26 m_cachedOffsetsEnabled = false; 26 m_cachedOffsetsEnabled = false;
27 if (!m_cachedOffsetsEnabled)
27 return; 28 return;
28 }
29 FloatPoint point = layoutView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries); 29 FloatPoint point = layoutView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries);
30 m_paintOffset = LayoutSize(point.x(), point.y()); 30 m_paintOffset = LayoutSize(point.x(), point.y());
31 } 31 }
32 m_clipRect = layoutView.viewRect(); 32 m_clipRect = layoutView.viewRect();
33 m_clipRect.move(m_paintOffset); 33 m_clipRect.move(m_paintOffset);
34 m_clipped = true; 34 m_clipped = true;
35 } 35 }
36 36
37 PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, Lay outBoxModelObject& layoutObject, const LayoutBoxModelObject& paintInvalidationCo ntainer) 37 PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, Lay outBoxModelObject& layoutObject, const LayoutBoxModelObject& paintInvalidationCo ntainer)
38 : m_clipped(false) 38 : m_clipped(false)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // to be always invalidated in-time. 127 // to be always invalidated in-time.
128 if (box.usesCompositedScrolling()) 128 if (box.usesCompositedScrolling())
129 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited. 129 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited.
130 else 130 else
131 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size())); 131 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size()));
132 132
133 m_paintOffset -= box.scrolledContentOffset(); 133 m_paintOffset -= box.scrolledContentOffset();
134 } 134 }
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW
« Source/core/layout/LayoutPart.cpp ('K') | « Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698