Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h |
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a9d2c01bb93e57137c56f59546b8f3395c121e82 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PaintArtifact_h |
| +#define PaintArtifact_h |
| + |
| +#include "platform/PlatformExport.h" |
| +#include "platform/graphics/paint/DisplayItemList.h" |
| +#include "platform/graphics/paint/PaintChunk.h" |
| +#include "wtf/PassOwnPtr.h" |
| +#include "wtf/Vector.h" |
| + |
| +namespace blink { |
| + |
| +// The output of painting, consisting of a list of display items and the paint |
| +// chunks that demarcate potential compositing layers. |
| +// |
| +// In slimming paint v1, only the display item list is used. |
| +class PLATFORM_EXPORT PaintArtifact { |
| + WTF_MAKE_NONCOPYABLE(PaintArtifact); |
| + WTF_MAKE_FAST_ALLOCATED(PaintArtifact); |
| +public: |
| + static PassOwnPtr<PaintArtifact> create() |
| + { |
| + return adoptPtr(new PaintArtifact()); |
| + } |
| + |
| + DisplayItemList& displayItemList() { return m_displayItemList; } |
| + |
| + // Returns the approximate memory usage, excluding memory likely to be |
| + // shared with the embedder after copying to WebDisplayItemList. |
| + size_t approximateUnsharedMemoryUsage() const; |
| + |
| +private: |
| + PaintArtifact() { } |
| + |
| + // TODO(pdr): Extract out the display item list merge step into this class |
| + // and let the display item list truly be a list of display items. |
| + DisplayItemList m_displayItemList; |
|
jbroman
2015/10/07 15:22:22
Hmm. We already have a true "list of display items
|
| + Vector<PaintChunk> m_paintChunks; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // PaintArtifact_h |