Index: cc/playback/display_item_list.h |
diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h |
index 95342edcc8cfd3d20c0e3df407f46e05059f1c3a..1d3c04f8713078b1b09d06508573e1dd8fde2751 100644 |
--- a/cc/playback/display_item_list.h |
+++ b/cc/playback/display_item_list.h |
@@ -13,6 +13,7 @@ |
#include "cc/base/list_container.h" |
#include "cc/playback/discardable_image_map.h" |
#include "cc/playback/display_item.h" |
+#include "cc/playback/display_item_list_settings.h" |
#include "skia/ext/refptr.h" |
#include "third_party/skia/include/core/SkPicture.h" |
#include "ui/gfx/geometry/rect.h" |
@@ -22,7 +23,9 @@ class SkPictureRecorder; |
namespace cc { |
-class DisplayItemListSettings; |
+namespace proto { |
+class DisplayItemList; |
+} |
class CC_EXPORT DisplayItemList |
: public base::RefCountedThreadSafe<DisplayItemList> { |
@@ -36,6 +39,15 @@ class CC_EXPORT DisplayItemList |
const gfx::Rect& layer_rect, |
const DisplayItemListSettings& settings); |
+ // Creates a DisplayItemList from a Protobuf. |
+ // TODO(dtrainor): Pass in a list of possible DisplayItems to reuse. |
+ static scoped_refptr<DisplayItemList> Create( |
vmpstr
2015/10/26 17:46:17
CreateFromProto
David Trainor- moved to gerrit
2015/10/26 20:42:56
Done.
|
+ const proto::DisplayItemList& proto); |
+ |
+ // Creates a Protobuf representing the state of this DisplayItemList. |
+ // TODO(dtrainor): Don't resend DisplayItems that were already serialized. |
+ void ToProtobuf(proto::DisplayItemList* proto); |
+ |
void Raster(SkCanvas* canvas, |
SkPicture::AbortCallback* callback, |
const gfx::Rect& canvas_target_playback_rect, |
@@ -103,7 +115,7 @@ class CC_EXPORT DisplayItemList |
scoped_ptr<SkPictureRecorder> recorder_; |
skia::RefPtr<SkCanvas> canvas_; |
- const bool use_cached_picture_; |
+ const DisplayItemListSettings settings_; |
bool retain_individual_display_items_; |
gfx::Rect layer_rect_; |