| 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/PaintCanvas.h" |
| 10 #include "platform/graphics/paint/PaintChunk.h" | 11 #include "platform/graphics/paint/PaintChunk.h" |
| 11 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" |
| 12 #include "wtf/Noncopyable.h" | 13 #include "wtf/Noncopyable.h" |
| 13 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class GraphicsContext; | 18 class GraphicsContext; |
| 18 class WebDisplayItemList; | 19 class WebDisplayItemList; |
| 19 | 20 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void reset(); | 67 void reset(); |
| 67 | 68 |
| 68 // Returns the approximate memory usage, excluding memory likely to be | 69 // Returns the approximate memory usage, excluding memory likely to be |
| 69 // shared with the embedder after copying to WebDisplayItemList. | 70 // shared with the embedder after copying to WebDisplayItemList. |
| 70 size_t approximateUnsharedMemoryUsage() const; | 71 size_t approximateUnsharedMemoryUsage() const; |
| 71 | 72 |
| 72 // Draws the paint artifact to a GraphicsContext. | 73 // Draws the paint artifact to a GraphicsContext. |
| 73 // |bounds| is the bounding box of the paint artifact's display list. | 74 // |bounds| is the bounding box of the paint artifact's display list. |
| 74 void replay(const FloatRect& bounds, GraphicsContext&) const; | 75 void replay(const FloatRect& bounds, GraphicsContext&) const; |
| 75 | 76 |
| 77 // Draws the paint artifact to a PaintCanvas. |
| 78 // |bounds| is the bounding box of the paint artifact's display list. |
| 79 // SPv2 only. |
| 80 void replay(const FloatRect& bounds, PaintCanvas&) const; |
| 81 |
| 76 // Writes the paint artifact into a WebDisplayItemList. | 82 // Writes the paint artifact into a WebDisplayItemList. |
| 77 void appendToWebDisplayItemList(WebDisplayItemList*) const; | 83 void appendToWebDisplayItemList(WebDisplayItemList*) const; |
| 78 | 84 |
| 79 private: | 85 private: |
| 80 DisplayItemList m_displayItemList; | 86 DisplayItemList m_displayItemList; |
| 81 Vector<PaintChunk> m_paintChunks; | 87 Vector<PaintChunk> m_paintChunks; |
| 82 bool m_isSuitableForGpuRasterization; | 88 bool m_isSuitableForGpuRasterization; |
| 83 }; | 89 }; |
| 84 | 90 |
| 85 } // namespace blink | 91 } // namespace blink |
| 86 | 92 |
| 87 #endif // PaintArtifact_h | 93 #endif // PaintArtifact_h |
| OLD | NEW |