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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h

Issue 2114653003: New PaintController under-invalidation checking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: Doc m_underInvalidationCheckingBegin and End Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 DisplayItemList_h 5 #ifndef DisplayItemList_h
6 #define DisplayItemList_h 6 #define DisplayItemList_h
7 7
8 #include "platform/graphics/ContiguousContainer.h" 8 #include "platform/graphics/ContiguousContainer.h"
9 #include "platform/graphics/paint/DisplayItem.h" 9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "platform/graphics/paint/Transform3DDisplayItem.h" 10 #include "platform/graphics/paint/Transform3DDisplayItem.h"
(...skipping 27 matching lines...) Expand all
38 DisplayItemList& operator=(DisplayItemList&& source) 38 DisplayItemList& operator=(DisplayItemList&& source)
39 { 39 {
40 ContiguousContainer::operator=(std::move(source)); 40 ContiguousContainer::operator=(std::move(source));
41 m_visualRects = std::move(source.m_visualRects); 41 m_visualRects = std::move(source.m_visualRects);
42 m_beginItemIndices = std::move(source.m_beginItemIndices); 42 m_beginItemIndices = std::move(source.m_beginItemIndices);
43 return *this; 43 return *this;
44 } 44 }
45 45
46 DisplayItem& appendByMoving(DisplayItem&); 46 DisplayItem& appendByMoving(DisplayItem&);
47 47
48 bool hasVisualRect(unsigned index) const { return index < m_visualRects.size (); }
48 IntRect visualRect(unsigned index) const 49 IntRect visualRect(unsigned index) const
49 { 50 {
50 ASSERT(index < m_visualRects.size()); 51 DCHECK(hasVisualRect(index));
51 return m_visualRects[index]; 52 return m_visualRects[index];
52 } 53 }
53 54
54 void appendVisualRect(const IntRect& visualRect); 55 void appendVisualRect(const IntRect& visualRect);
55 56
56 // Useful for iterating with a range-based for loop. 57 // Useful for iterating with a range-based for loop.
57 template <typename Iterator> 58 template <typename Iterator>
58 class Range { 59 class Range {
59 public: 60 public:
60 Range(const Iterator& begin, const Iterator& end) 61 Range(const Iterator& begin, const Iterator& end)
(...skipping 12 matching lines...) Expand all
73 // given visual rect with the begin display item's visual rect. 74 // given visual rect with the begin display item's visual rect.
74 void growCurrentBeginItemVisualRect(const IntRect& visualRect); 75 void growCurrentBeginItemVisualRect(const IntRect& visualRect);
75 76
76 Vector<IntRect> m_visualRects; 77 Vector<IntRect> m_visualRects;
77 Vector<size_t> m_beginItemIndices; 78 Vector<size_t> m_beginItemIndices;
78 }; 79 };
79 80
80 } // namespace blink 81 } // namespace blink
81 82
82 #endif // DisplayItemList_h 83 #endif // DisplayItemList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698