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..72fc0ddfb3e5d77a9cb8f0d257710e9d203ea881 100644 |
--- a/cc/playback/clip_display_item.h |
+++ b/cc/playback/clip_display_item.h |
@@ -19,21 +19,29 @@ namespace cc { |
class CC_EXPORT ClipDisplayItem : public DisplayItem { |
public: |
- ClipDisplayItem(); |
+ ClipDisplayItem(const 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; |
void Raster(SkCanvas* canvas, |
const gfx::Rect& canvas_target_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 { return 1; } |
+ bool IsSuitableForGpuRasterization() const { return true; } |
+ |
+ protected: |
+ void FromProtobuf(const proto::DisplayItem& proto) override; |
private: |
+ void SetNew(const gfx::Rect& clip_rect, |
+ const std::vector<SkRRect>& rounded_clip_rects); |
+ |
gfx::Rect clip_rect_; |
std::vector<SkRRect> rounded_clip_rects_; |
}; |
@@ -41,15 +49,22 @@ 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; |
- void FromProtobuf(const proto::DisplayItem& proto) override; |
void Raster(SkCanvas* canvas, |
const gfx::Rect& canvas_target_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 { return 0; } |
+ bool IsSuitableForGpuRasterization() const { return true; } |
+ |
+ protected: |
+ void FromProtobuf(const proto::DisplayItem& proto) override; |
}; |
} // namespace cc |