| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PaintArtifact_h |
| 6 #define PaintArtifact_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/paint/DisplayItemList.h" |
| 10 #include "platform/graphics/paint/PaintChunk.h" |
| 11 #include "platform/graphics/paint/TransformPaintProperty.h" |
| 12 #include "wtf/PassOwnPtr.h" |
| 13 #include "wtf/Vector.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 // The output of painting, consisting of a list of display items, paint |
| 18 // properties, and the paint chunks that demarcate potential compositing layers. |
| 19 // |
| 20 // In slimming paint v1, only the display item list is used. |
| 21 class PLATFORM_EXPORT PaintArtifact { |
| 22 WTF_MAKE_NONCOPYABLE(PaintArtifact); |
| 23 WTF_MAKE_FAST_ALLOCATED(PaintArtifact); |
| 24 public: |
| 25 static PassOwnPtr<PaintArtifact> create() |
| 26 { |
| 27 return adoptPtr(new PaintArtifact()); |
| 28 } |
| 29 |
| 30 DisplayItemList& displayItemList() { return m_displayItemList; } |
| 31 |
| 32 // Returns the approximate memory usage, excluding memory likely to be |
| 33 // shared with the embedder after copying to WebDisplayItemList. |
| 34 size_t approximateUnsharedMemoryUsage() const; |
| 35 |
| 36 private: |
| 37 PaintArtifact() { } |
| 38 |
| 39 // TODO(pdr): Extract out the display item list merge step into this class |
| 40 // and let the display item list truly be a list of display items. |
| 41 DisplayItemList m_displayItemList; |
| 42 Vector<PaintChunk> m_paintChunks; |
| 43 Vector<TransformPaintProperty> m_transformPaintProperties; |
| 44 }; |
| 45 |
| 46 } // namespace blink |
| 47 |
| 48 #endif // PaintArtifact_h |
| OLD | NEW |