| Index: cc/resources/display_item_list.h
|
| diff --git a/cc/resources/display_item_list.h b/cc/resources/display_item_list.h
|
| index a0db78ecbcfd4081cb4f774005e3b215a838fc26..bef5084c30b5af26bc6eab92d80a231620a0af8c 100644
|
| --- a/cc/resources/display_item_list.h
|
| +++ b/cc/resources/display_item_list.h
|
| @@ -11,6 +11,8 @@
|
| #include "base/trace_event/trace_event.h"
|
| #include "cc/base/cc_export.h"
|
| #include "cc/base/scoped_ptr_vector.h"
|
| +// TODO(danakj): Move ListContainer out of cc/quads/
|
| +#include "cc/quads/list_container.h"
|
| #include "cc/resources/display_item.h"
|
| #include "cc/resources/pixel_ref_map.h"
|
| #include "skia/ext/refptr.h"
|
| @@ -33,8 +35,15 @@ class CC_EXPORT DisplayItemList
|
| SkDrawPictureCallback* callback,
|
| float contents_scale) const;
|
|
|
| - void AppendItem(scoped_ptr<DisplayItem> item);
|
| + template <typename DisplayItemType>
|
| + DisplayItemType* CreateAndAppendItem() {
|
| +#if DCHECK_IS_ON()
|
| + needs_process_ = true;
|
| +#endif
|
| + return items_.AllocateAndConstruct<DisplayItemType>();
|
| + }
|
|
|
| + void ProcessAppendedItems();
|
| void CreateAndCacheSkPicture();
|
|
|
| bool IsSuitableForGpuRasterization() const;
|
| @@ -53,7 +62,15 @@ class CC_EXPORT DisplayItemList
|
| bool retain_individual_display_items);
|
| DisplayItemList(gfx::Rect layer_rect, bool use_cached_picture);
|
| ~DisplayItemList();
|
| - ScopedPtrVector<DisplayItem> items_;
|
| +
|
| +#if DCHECK_IS_ON()
|
| + bool ProcessAppendedItemsCalled() const { return !needs_process_; }
|
| + bool needs_process_;
|
| +#else
|
| + bool ProcessAppendedItemsCalled() const { return true; }
|
| +#endif
|
| +
|
| + ListContainer<DisplayItem> items_;
|
| skia::RefPtr<SkPicture> picture_;
|
|
|
| scoped_ptr<SkPictureRecorder> recorder_;
|
|
|