| OLD | NEW |
| 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" |
| 11 #include "wtf/Alignment.h" | 11 #include "wtf/Alignment.h" |
| 12 #include "wtf/Assertions.h" | 12 #include "wtf/Assertions.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class JSONArray; |
| 16 struct PaintChunk; | 17 struct PaintChunk; |
| 17 | 18 |
| 18 // kDisplayItemAlignment must be a multiple of alignof(derived display item) for | 19 // kDisplayItemAlignment must be a multiple of alignof(derived display item) for |
| 19 // each derived display item; the ideal value is the least common multiple. | 20 // each derived display item; the ideal value is the least common multiple. |
| 20 // Currently the limiting factor is TransformationMatrix (in | 21 // Currently the limiting factor is TransformationMatrix (in |
| 21 // BeginTransform3DDisplayItem), which requests 16-byte alignment. | 22 // BeginTransform3DDisplayItem), which requests 16-byte alignment. |
| 22 static const size_t kDisplayItemAlignment = | 23 static const size_t kDisplayItemAlignment = |
| 23 WTF_ALIGN_OF(BeginTransform3DDisplayItem); | 24 WTF_ALIGN_OF(BeginTransform3DDisplayItem); |
| 24 static const size_t kMaximumDisplayItemSize = | 25 static const size_t kMaximumDisplayItemSize = |
| 25 sizeof(BeginTransform3DDisplayItem); | 26 sizeof(BeginTransform3DDisplayItem); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 Iterator begin() const { return m_begin; } | 62 Iterator begin() const { return m_begin; } |
| 62 Iterator end() const { return m_end; } | 63 Iterator end() const { return m_end; } |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 Iterator m_begin; | 66 Iterator m_begin; |
| 66 Iterator m_end; | 67 Iterator m_end; |
| 67 }; | 68 }; |
| 68 Range<iterator> itemsInPaintChunk(const PaintChunk&); | 69 Range<iterator> itemsInPaintChunk(const PaintChunk&); |
| 69 Range<const_iterator> itemsInPaintChunk(const PaintChunk&) const; | 70 Range<const_iterator> itemsInPaintChunk(const PaintChunk&) const; |
| 70 | 71 |
| 72 std::unique_ptr<JSONArray> subsequenceAsJSON(size_t beginIndex, |
| 73 size_t endIndex, |
| 74 bool showPictures, |
| 75 bool skipNonDrawings) const; |
| 76 |
| 71 private: | 77 private: |
| 72 Vector<IntRect> m_visualRects; | 78 Vector<IntRect> m_visualRects; |
| 73 }; | 79 }; |
| 74 | 80 |
| 75 } // namespace blink | 81 } // namespace blink |
| 76 | 82 |
| 77 #endif // DisplayItemList_h | 83 #endif // DisplayItemList_h |
| OLD | NEW |