Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3600)

Unified Diff: cc/playback/display_item_list.h

Issue 1407793002: Add protobuf serialization to DisplayItemList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp_display2
Patch Set: Comments are hard Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..21422600d8648a6d9ab31f84d5752a811803c98d 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,17 @@ 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
+ // (crbug.com/548434).
+ static scoped_refptr<DisplayItemList> CreateFromProto(
+ const proto::DisplayItemList& proto);
+
+ // Creates a Protobuf representing the state of this DisplayItemList.
+ // TODO(dtrainor): Don't resend DisplayItems that were already serialized
+ // (crbug.com/548434).
+ void ToProtobuf(proto::DisplayItemList* proto);
+
void Raster(SkCanvas* canvas,
SkPicture::AbortCallback* callback,
const gfx::Rect& canvas_target_playback_rect,
@@ -103,7 +117,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_;
« no previous file with comments | « cc/playback/display_item.h ('k') | cc/playback/display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698