| Index: cc/playback/display_item_list.h
|
| diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h
|
| index 6660f363267ffbb17bbbb48efe5410f046d69552..c5787a79744948d99a2d8552743039f4a86ec2ff 100644
|
| --- a/cc/playback/display_item_list.h
|
| +++ b/cc/playback/display_item_list.h
|
| @@ -26,9 +26,10 @@ class SkCanvas;
|
| class SkPictureRecorder;
|
|
|
| namespace cc {
|
| +class ClientPictureCache;
|
| class DisplayItem;
|
| class DrawingDisplayItem;
|
| -class ImageSerializationProcessor;
|
| +class EnginePictureCache;
|
|
|
| namespace proto {
|
| class DisplayItemList;
|
| @@ -51,13 +52,20 @@ class CC_EXPORT DisplayItemList
|
| // (crbug.com/548434).
|
| static scoped_refptr<DisplayItemList> CreateFromProto(
|
| const proto::DisplayItemList& proto,
|
| - ImageSerializationProcessor* image_serialization_processor);
|
| + ClientPictureCache* client_picture_cache);
|
|
|
| // 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,
|
| - ImageSerializationProcessor* image_serialization_processor);
|
| + void ToProtobuf(proto::DisplayItemList* proto);
|
| +
|
| + // Informs the EnginePictureCache about which SkPictures that are in use.
|
| + void MarkForRegistrationEngine(EnginePictureCache* engine_picture_cache);
|
| + void MarkForUnregistrationEngine(EnginePictureCache* engine_picture_cache);
|
| +
|
| + // Informs the ClientPictureCache about which SkPictures that are in use.
|
| + void MarkForRegistrationClient(ClientPictureCache* client_picture_cache);
|
| + void MarkForUnregistrationClient(ClientPictureCache* client_picture_cache);
|
|
|
| void Raster(SkCanvas* canvas,
|
| SkPicture::AbortCallback* callback,
|
| @@ -124,6 +132,14 @@ class CC_EXPORT DisplayItemList
|
| // |items_| . These rects are intentionally kept separate
|
| // because they are not needed while walking the |items_| for raster.
|
| std::vector<gfx::Rect> visual_rects_;
|
| +
|
| + // The engine SkPicture IDs associated with each of the display items in the
|
| + // display item list. There is one ID per display item, and the
|
| + // position in |engine_picture_ids_| matches the position of the item in
|
| + // |items_| . These IDs are intentionally kept separate
|
| + // because they are not needed while walking the |items_| for raster.
|
| + std::vector<uint32_t> engine_picture_ids_;
|
| +
|
| sk_sp<SkPicture> picture_;
|
|
|
| std::unique_ptr<SkPictureRecorder> recorder_;
|
| @@ -139,6 +155,11 @@ class CC_EXPORT DisplayItemList
|
|
|
| DiscardableImageMap image_map_;
|
|
|
| + // |marked_| is true when the last call was for marking SkPictures for
|
| + // registration, and set to false when they are marked for unregistration.
|
| + // It is illegal to call the same method twice in a row.
|
| + bool marked_ = false;
|
| +
|
| friend class base::RefCountedThreadSafe<DisplayItemList>;
|
| FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
|
| DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
|
|
|