| OLD | NEW |
| 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 #include "platform/graphics/paint/DisplayItemList.h" | 5 #include "platform/graphics/paint/DisplayItemList.h" |
| 6 | 6 |
| 7 #include "platform/graphics/LoggingCanvas.h" | 7 #include "platform/graphics/LoggingCanvas.h" |
| 8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 9 #include "platform/graphics/paint/PaintChunk.h" | 9 #include "platform/graphics/paint/PaintChunk.h" |
| 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // can be safely destructed but should never be used. | 27 // can be safely destructed but should never be used. |
| 28 ASSERT(!item.hasValidClient()); | 28 ASSERT(!item.hasValidClient()); |
| 29 #ifndef NDEBUG | 29 #ifndef NDEBUG |
| 30 // Save original debug string in the old item to help debugging. | 30 // Save original debug string in the old item to help debugging. |
| 31 item.setClientDebugString(originalDebugString); | 31 item.setClientDebugString(originalDebugString); |
| 32 #endif | 32 #endif |
| 33 return result; | 33 return result; |
| 34 } | 34 } |
| 35 | 35 |
| 36 void DisplayItemList::appendVisualRect(const IntRect& visualRect) { | 36 void DisplayItemList::appendVisualRect(const IntRect& visualRect) { |
| 37 m_visualRects.append(visualRect); | 37 m_visualRects.push_back(visualRect); |
| 38 } | 38 } |
| 39 | 39 |
| 40 DisplayItemList::Range<DisplayItemList::iterator> | 40 DisplayItemList::Range<DisplayItemList::iterator> |
| 41 DisplayItemList::itemsInPaintChunk(const PaintChunk& paintChunk) { | 41 DisplayItemList::itemsInPaintChunk(const PaintChunk& paintChunk) { |
| 42 return Range<iterator>(begin() + paintChunk.beginIndex, | 42 return Range<iterator>(begin() + paintChunk.beginIndex, |
| 43 begin() + paintChunk.endIndex); | 43 begin() + paintChunk.endIndex); |
| 44 } | 44 } |
| 45 | 45 |
| 46 DisplayItemList::Range<DisplayItemList::const_iterator> | 46 DisplayItemList::Range<DisplayItemList::const_iterator> |
| 47 DisplayItemList::itemsInPaintChunk(const PaintChunk& paintChunk) const { | 47 DisplayItemList::itemsInPaintChunk(const PaintChunk& paintChunk) const { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 String::format("[%d,%d %dx%d]", localVisualRect.x(), | 105 String::format("[%d,%d %dx%d]", localVisualRect.x(), |
| 106 localVisualRect.y(), localVisualRect.width(), | 106 localVisualRect.y(), localVisualRect.width(), |
| 107 localVisualRect.height())); | 107 localVisualRect.height())); |
| 108 } | 108 } |
| 109 jsonArray->pushObject(std::move(json)); | 109 jsonArray->pushObject(std::move(json)); |
| 110 } | 110 } |
| 111 return jsonArray; | 111 return jsonArray; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace blink | 114 } // namespace blink |
| OLD | NEW |