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