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

Unified Diff: cc/playback/drawing_display_item.h

Issue 1494223003: cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: danakj review Created 5 years 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
Index: cc/playback/drawing_display_item.h
diff --git a/cc/playback/drawing_display_item.h b/cc/playback/drawing_display_item.h
index c9083a354b186dd26eb84554b99577112be04b85..59b01b4fef397cbaf2ce223fe4d6b3f87617dc69 100644
--- a/cc/playback/drawing_display_item.h
+++ b/cc/playback/drawing_display_item.h
@@ -19,21 +19,30 @@ namespace cc {
class CC_EXPORT DrawingDisplayItem : public DisplayItem {
public:
DrawingDisplayItem();
+ explicit DrawingDisplayItem(skia::RefPtr<SkPicture> picture);
+ explicit DrawingDisplayItem(const proto::DisplayItem& proto);
+ explicit DrawingDisplayItem(const DrawingDisplayItem& item);
~DrawingDisplayItem() override;
- void SetNew(skia::RefPtr<SkPicture> picture);
-
void ToProtobuf(proto::DisplayItem* proto) const override;
- void FromProtobuf(const proto::DisplayItem& proto) override;
void Raster(SkCanvas* canvas,
const gfx::Rect& canvas_playback_rect,
SkPicture::AbortCallback* callback) const override;
void AsValueInto(const gfx::Rect& visual_rect,
base::trace_event::TracedValue* array) const override;
+ size_t ExternalMemoryUsage() const override;
+
+ int ApproximateOpCount() const;
+ bool IsSuitableForGpuRasterization() const;
void CloneTo(DrawingDisplayItem* item) const;
+ protected:
+ void FromProtobuf(const proto::DisplayItem& proto) override;
+
private:
+ void SetNew(skia::RefPtr<SkPicture> picture);
+
skia::RefPtr<SkPicture> picture_;
};

Powered by Google App Engine
This is Rietveld 408576698