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

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.h

Issue 1456953003: Revert of Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 // 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 #ifndef PaintInvalidationState_h 5 #ifndef PaintInvalidationState_h
6 #define PaintInvalidationState_h 6 #define PaintInvalidationState_h
7 7
8 #include "platform/geometry/LayoutRect.h" 8 #include "platform/geometry/LayoutRect.h"
9 #include "platform/transforms/AffineTransform.h" 9 #include "platform/transforms/AffineTransform.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 bool canMapToContainer(const LayoutBoxModelObject* container) const 47 bool canMapToContainer(const LayoutBoxModelObject* container) const
48 { 48 {
49 return m_cachedOffsetsEnabled && container == &m_paintInvalidationContai ner; 49 return m_cachedOffsetsEnabled && container == &m_paintInvalidationContai ner;
50 } 50 }
51 51
52 // Records |obj| as needing paint invalidation on the next frame. See the de finition of PaintInvalidationDelayedFull for more details. 52 // Records |obj| as needing paint invalidation on the next frame. See the de finition of PaintInvalidationDelayedFull for more details.
53 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) { m_pendingDelaye dPaintInvalidations.append(&obj); } 53 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) { m_pendingDelaye dPaintInvalidations.append(&obj); }
54 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() { return m_p endingDelayedPaintInvalidations; } 54 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() { return m_p endingDelayedPaintInvalidations; }
55 55
56 // Disable view clipping and scroll offset adjustment for paint invalidation of FrameView scrollbars.
57 // TODO(wangxianzhu): Remove this when root-layer-scrolls launches.
58 bool viewClippingAndScrollOffsetDisabled() const { return m_viewClippingAndS crollOffsetDisabled; }
59 void setViewClippingAndScrollOffsetDisabled(bool b) { m_viewClippingAndScrol lOffsetDisabled = b; }
60
61 private: 56 private:
62 PaintInvalidationState(const LayoutView&, Vector<LayoutObject*>& pendingDela yedPaintInvalidations, PaintInvalidationState* ownerPaintInvalidationState); 57 PaintInvalidationState(const LayoutView&, Vector<LayoutObject*>& pendingDela yedPaintInvalidations, PaintInvalidationState* ownerPaintInvalidationState);
63 58
64 void applyClipIfNeeded(const LayoutObject&); 59 void applyClipIfNeeded(const LayoutObject&);
65 void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize); 60 void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize);
66 61
67 friend class ForceHorriblySlowRectMapping; 62 friend class ForceHorriblySlowRectMapping;
68 63
69 bool m_clipped; 64 bool m_clipped;
70 mutable bool m_cachedOffsetsEnabled; 65 mutable bool m_cachedOffsetsEnabled;
71 bool m_forcedSubtreeInvalidationWithinContainer; 66 bool m_forcedSubtreeInvalidationWithinContainer;
72 bool m_forcedSubtreeInvalidationRectUpdateWithinContainer; 67 bool m_forcedSubtreeInvalidationRectUpdateWithinContainer;
73 bool m_viewClippingAndScrollOffsetDisabled;
74 68
75 LayoutRect m_clipRect; 69 LayoutRect m_clipRect;
76 70
77 // x/y offset from paint invalidation container. Includes relative positioni ng and scroll offsets. 71 // x/y offset from paint invalidation container. Includes relative positioni ng and scroll offsets.
78 LayoutSize m_paintOffset; 72 LayoutSize m_paintOffset;
79 73
80 const LayoutBoxModelObject& m_paintInvalidationContainer; 74 const LayoutBoxModelObject& m_paintInvalidationContainer;
81 75
82 // Transform from the initial viewport coordinate system of an outermost 76 // Transform from the initial viewport coordinate system of an outermost
83 // SVG root to the userspace _before_ the relevant element. Combining this 77 // SVG root to the userspace _before_ the relevant element. Combining this
84 // with |m_paintOffset| yields the "final" offset. 78 // with |m_paintOffset| yields the "final" offset.
85 OwnPtr<AffineTransform> m_svgTransform; 79 OwnPtr<AffineTransform> m_svgTransform;
86 80
87 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; 81 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations;
88 }; 82 };
89 83
90 } // namespace blink 84 } // namespace blink
91 85
92 #endif // PaintInvalidationState_h 86 #endif // PaintInvalidationState_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698