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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.h

Issue 2489893002: [SPv2] Track paint offset change (Closed)
Patch Set: - Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 PaintInvalidator_h 5 #ifndef PaintInvalidator_h
6 #define PaintInvalidator_h 6 #define PaintInvalidator_h
7 7
8 #include "platform/geometry/LayoutRect.h" 8 #include "platform/geometry/LayoutRect.h"
9 #include "platform/graphics/paint/GeometryMapper.h" 9 #include "platform/graphics/paint/GeometryMapper.h"
10 #include "wtf/Vector.h" 10 #include "wtf/Vector.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // The current paint invalidation container for stacked contents (stacking 62 // The current paint invalidation container for stacked contents (stacking
63 // contexts or positioned objects). It is the nearest ancestor composited 63 // contexts or positioned objects). It is the nearest ancestor composited
64 // object which establishes a stacking context. See 64 // object which establishes a stacking context. See
65 // Source/core/paint/README.md ### PaintInvalidationState for details on how 65 // Source/core/paint/README.md ### PaintInvalidationState for details on how
66 // stacked contents' paint invalidation containers differ. 66 // stacked contents' paint invalidation containers differ.
67 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents = 67 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents =
68 nullptr; 68 nullptr;
69 69
70 PaintLayer* paintingLayer = nullptr; 70 PaintLayer* paintingLayer = nullptr;
71 71
72 // Store the new and old visual rects in the paint invalidation backing's 72 // Store the old and new visual rects in the paint invalidation backing's
73 // coordinates. The rects do *not* account for composited scrolling. 73 // coordinates. The rects do *not* account for composited scrolling.
74 // See LayoutObject::adjustVisualRectForCompositedScrolling(). 74 // See LayoutObject::adjustVisualRectForCompositedScrolling().
75 LayoutRect oldVisualRect; 75 LayoutRect oldVisualRect;
76 LayoutRect newVisualRect; 76 LayoutRect newVisualRect;
77 77
78 // Store the origin of the object's local coordinates in the paint 78 // Store the origin of the object's local coordinates in the paint
79 // invalidation backing's coordinates. They are used to detect layoutObject 79 // invalidation backing's coordinates. They are used to detect layoutObject
80 // shifts that force a full invalidation and invalidation check in subtree. 80 // shifts that force a full invalidation and invalidation check in subtree.
81 // The points do *not* account for composited scrolling. See 81 // The points do *not* account for composited scrolling. See
82 // LayoutObject::adjustVisualRectForCompositedScrolling(). 82 // LayoutObject::adjustVisualRectForCompositedScrolling().
83 LayoutPoint oldLocation; 83 LayoutPoint oldLocation;
84 LayoutPoint newLocation; 84 LayoutPoint newLocation;
85
86 // Stores the old and new offsets to paint this object, relative to the
87 // containing transform node. They are for SPv2 only.
88 LayoutPoint oldPaintOffset;
89 LayoutPoint newPaintOffset;
85 }; 90 };
86 91
87 class PaintInvalidator { 92 class PaintInvalidator {
88 public: 93 public:
89 void invalidatePaintIfNeeded(FrameView&, PaintInvalidatorContext&); 94 void invalidatePaintIfNeeded(FrameView&, PaintInvalidatorContext&);
90 void invalidatePaintIfNeeded(const LayoutObject&, PaintInvalidatorContext&); 95 void invalidatePaintIfNeeded(const LayoutObject&, PaintInvalidatorContext&);
91 96
92 // Process objects needing paint invalidation on the next frame. 97 // Process objects needing paint invalidation on the next frame.
93 // See the definition of PaintInvalidationDelayedFull for more details. 98 // See the definition of PaintInvalidationDelayedFull for more details.
94 void processPendingDelayedPaintInvalidations(); 99 void processPendingDelayedPaintInvalidations();
(...skipping 10 matching lines...) Expand all
105 void updatePaintingLayer(const LayoutObject&, PaintInvalidatorContext&); 110 void updatePaintingLayer(const LayoutObject&, PaintInvalidatorContext&);
106 void updateContext(const LayoutObject&, PaintInvalidatorContext&); 111 void updateContext(const LayoutObject&, PaintInvalidatorContext&);
107 112
108 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; 113 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations;
109 GeometryMapper m_geometryMapper; 114 GeometryMapper m_geometryMapper;
110 }; 115 };
111 116
112 } // namespace blink 117 } // namespace blink
113 118
114 #endif // PaintInvalidator_h 119 #endif // PaintInvalidator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698