| 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..61e0e00d02485d2ebec74c95fe6adb26adfb8adf
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h
|
| @@ -0,0 +1,48 @@
|
| +// 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 "platform/graphics/paint/TransformPaintProperty.h"
|
| +#include "wtf/PassOwnPtr.h"
|
| +#include "wtf/Vector.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// The output of painting, consisting of a list of display items, paint
|
| +// properties, 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;
|
| + Vector<PaintChunk> m_paintChunks;
|
| + Vector<TransformPaintProperty> m_transformPaintProperties;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // PaintArtifact_h
|
|
|