Index: cc/playback/clip_display_item.h |
diff --git a/cc/playback/clip_display_item.h b/cc/playback/clip_display_item.h |
index c66e4675750cbb1157b8b5cde00468335f3801e0..40e47628add5d0b254c0be4ed185afd0294d80f2 100644 |
--- a/cc/playback/clip_display_item.h |
+++ b/cc/playback/clip_display_item.h |
@@ -19,12 +19,11 @@ namespace cc { |
class CC_EXPORT ClipDisplayItem : public DisplayItem { |
public: |
- ClipDisplayItem(); |
+ ClipDisplayItem(gfx::Rect clip_rect, |
+ const std::vector<SkRRect>& rounded_clip_rects); |
+ explicit ClipDisplayItem(const proto::DisplayItem& proto); |
~ClipDisplayItem() override; |
- void SetNew(gfx::Rect clip_rect, |
- const std::vector<SkRRect>& rounded_clip_rects); |
- |
void ToProtobuf(proto::DisplayItem* proto) const override; |
void FromProtobuf(const proto::DisplayItem& proto) override; |
danakj
2015/12/08 19:18:14
should these From methods be private then?
enne (OOO)
2015/12/08 19:47:27
ToProtoBuf should be public.
FromProtoBuf is now p
|
void Raster(SkCanvas* canvas, |
@@ -32,8 +31,15 @@ class CC_EXPORT ClipDisplayItem : public DisplayItem { |
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 { return 1; } |
+ bool IsSuitableForGpuRasterization() const { return true; } |
private: |
+ void SetNew(gfx::Rect clip_rect, |
+ const std::vector<SkRRect>& rounded_clip_rects); |
+ |
gfx::Rect clip_rect_; |
std::vector<SkRRect> rounded_clip_rects_; |
}; |
@@ -41,6 +47,7 @@ class CC_EXPORT ClipDisplayItem : public DisplayItem { |
class CC_EXPORT EndClipDisplayItem : public DisplayItem { |
public: |
EndClipDisplayItem(); |
+ explicit EndClipDisplayItem(const proto::DisplayItem& proto); |
~EndClipDisplayItem() override; |
void ToProtobuf(proto::DisplayItem* proto) const override; |
@@ -50,6 +57,10 @@ class CC_EXPORT EndClipDisplayItem : public DisplayItem { |
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 { return 0; } |
+ bool IsSuitableForGpuRasterization() const { return true; } |
}; |
} // namespace cc |