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 PaintArtifact_h | 5 #ifndef PaintArtifact_h |
6 #define PaintArtifact_h | 6 #define PaintArtifact_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/graphics/paint/DisplayItemList.h" | 9 #include "platform/graphics/paint/DisplayItemList.h" |
10 #include "platform/graphics/paint/PaintChunk.h" | 10 #include "platform/graphics/paint/PaintChunk.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 | 64 |
65 // Resets to an empty paint artifact. | 65 // Resets to an empty paint artifact. |
66 void reset(); | 66 void reset(); |
67 | 67 |
68 // Returns the approximate memory usage, excluding memory likely to be | 68 // Returns the approximate memory usage, excluding memory likely to be |
69 // shared with the embedder after copying to WebDisplayItemList. | 69 // shared with the embedder after copying to WebDisplayItemList. |
70 size_t approximateUnsharedMemoryUsage() const; | 70 size_t approximateUnsharedMemoryUsage() const; |
71 | 71 |
72 // Draws the paint artifact to a GraphicsContext. | 72 // Draws the paint artifact to a GraphicsContext. |
73 // |bounds| is the bounding box of the paint artifact's display list. | 73 // |bounds| is the bounding box of the paint artifact's display list. |
74 void replay(const FloatRect& bounds, GraphicsContext&) const; | 74 // In SPv2 mode, replayes into the ancestor state given by |replayState|. |
wkorman
2017/03/31 18:21:51
replayes -> replays
chrishtr
2017/03/31 20:59:03
Done.
| |
75 void replay( | |
76 const FloatRect& bounds, | |
77 GraphicsContext&, | |
78 const PropertyTreeState& replayState = PropertyTreeState::root()) const; | |
75 | 79 |
76 // Writes the paint artifact into a WebDisplayItemList. | 80 // Writes the paint artifact into a WebDisplayItemList. |
77 void appendToWebDisplayItemList(WebDisplayItemList*) const; | 81 void appendToWebDisplayItemList(WebDisplayItemList*) const; |
78 | 82 |
79 private: | 83 private: |
80 DisplayItemList m_displayItemList; | 84 DisplayItemList m_displayItemList; |
81 Vector<PaintChunk> m_paintChunks; | 85 Vector<PaintChunk> m_paintChunks; |
82 bool m_isSuitableForGpuRasterization; | 86 bool m_isSuitableForGpuRasterization; |
83 }; | 87 }; |
84 | 88 |
85 } // namespace blink | 89 } // namespace blink |
86 | 90 |
87 #endif // PaintArtifact_h | 91 #endif // PaintArtifact_h |
OLD | NEW |