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

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

Issue 2176573004: Enable subsequence caching for spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CachePaintProperties
Patch Set: Spv2 configuration for PaintLayerPainterTest, unsigned->size_t etc. Created 4 years, 4 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 bool hasVisualRect(size_t index) const { return index < m_visualRects.size() ; }
49 IntRect visualRect(unsigned index) const 49 IntRect visualRect(size_t index) const
50 { 50 {
51 DCHECK(hasVisualRect(index)); 51 DCHECK(hasVisualRect(index));
52 return m_visualRects[index]; 52 return m_visualRects[index];
53 } 53 }
54 54
55 void appendVisualRect(const IntRect& visualRect); 55 void appendVisualRect(const IntRect& visualRect);
56 56
57 // Useful for iterating with a range-based for loop. 57 // Useful for iterating with a range-based for loop.
58 template <typename Iterator> 58 template <typename Iterator>
59 class Range { 59 class Range {
(...skipping 14 matching lines...) Expand all
74 // given visual rect with the begin display item's visual rect. 74 // given visual rect with the begin display item's visual rect.
75 void growCurrentBeginItemVisualRect(const IntRect& visualRect); 75 void growCurrentBeginItemVisualRect(const IntRect& visualRect);
76 76
77 Vector<IntRect> m_visualRects; 77 Vector<IntRect> m_visualRects;
78 Vector<size_t> m_beginItemIndices; 78 Vector<size_t> m_beginItemIndices;
79 }; 79 };
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 #endif // DisplayItemList_h 83 #endif // DisplayItemList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698