Index: cc/playback/clip_path_display_item.cc |
diff --git a/cc/playback/clip_path_display_item.cc b/cc/playback/clip_path_display_item.cc |
index 2168ee1f9cd8a2c1cea4c604382477ac9684a19b..3e6409a2c896e80303017323932f06abe5134104 100644 |
--- a/cc/playback/clip_path_display_item.cc |
+++ b/cc/playback/clip_path_display_item.cc |
@@ -12,7 +12,14 @@ |
namespace cc { |
-ClipPathDisplayItem::ClipPathDisplayItem() { |
+ClipPathDisplayItem::ClipPathDisplayItem(const SkPath& clip_path, |
+ SkRegion::Op clip_op, |
+ bool antialias) { |
+ SetNew(clip_path, clip_op, antialias); |
+} |
+ |
+ClipPathDisplayItem::ClipPathDisplayItem(const proto::DisplayItem& proto) { |
+ FromProtobuf(proto); |
} |
ClipPathDisplayItem::~ClipPathDisplayItem() { |
@@ -24,11 +31,6 @@ void ClipPathDisplayItem::SetNew(const SkPath& clip_path, |
clip_path_ = clip_path; |
clip_op_ = clip_op; |
antialias_ = antialias; |
- |
- // The size of SkPath's external storage is not currently accounted for (and |
- // may well be shared anyway). |
- DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 1 /* op_count */, |
- 0 /* external_memory_usage */); |
} |
void ClipPathDisplayItem::ToProtobuf(proto::DisplayItem* proto) const { |
@@ -79,9 +81,17 @@ void ClipPathDisplayItem::AsValueInto( |
clip_path_.countPoints(), visual_rect.ToString().c_str())); |
} |
-EndClipPathDisplayItem::EndClipPathDisplayItem() { |
- DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 0 /* op_count */, |
- 0 /* external_memory_usage */); |
+size_t ClipPathDisplayItem::ExternalMemoryUsage() const { |
+ // The size of SkPath's external storage is not currently accounted for (and |
+ // may well be shared anyway). |
+ return 0; |
danakj
2015/12/08 19:18:14
you could inline this in the header (if clang plug
enne (OOO)
2015/12/08 19:47:27
Does not appear to.
|
+} |
+ |
+EndClipPathDisplayItem::EndClipPathDisplayItem() {} |
+ |
+EndClipPathDisplayItem::EndClipPathDisplayItem( |
+ const proto::DisplayItem& proto) { |
+ FromProtobuf(proto); |
} |
EndClipPathDisplayItem::~EndClipPathDisplayItem() { |
@@ -110,4 +120,8 @@ void EndClipPathDisplayItem::AsValueInto( |
visual_rect.ToString().c_str())); |
} |
+size_t EndClipPathDisplayItem::ExternalMemoryUsage() const { |
+ return 0; |
danakj
2015/12/08 19:18:14
ditto for all these "return 0"s
|
+} |
+ |
} // namespace cc |