Index: cc/playback/float_clip_display_item.h |
diff --git a/cc/playback/float_clip_display_item.h b/cc/playback/float_clip_display_item.h |
index 3dd788b03803fb4818b46de2aa766912627e51ce..27fd6b7c602fa47197ff0981f1b4c1dc32911aae 100644 |
--- a/cc/playback/float_clip_display_item.h |
+++ b/cc/playback/float_clip_display_item.h |
@@ -18,26 +18,34 @@ namespace cc { |
class CC_EXPORT FloatClipDisplayItem : public DisplayItem { |
public: |
- FloatClipDisplayItem(); |
+ explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); |
+ explicit FloatClipDisplayItem(const proto::DisplayItem& proto); |
~FloatClipDisplayItem() override; |
- void SetNew(const gfx::RectF& clip_rect); |
- |
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::RectF& clip_rect); |
+ |
gfx::RectF clip_rect_; |
}; |
class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { |
public: |
EndFloatClipDisplayItem(); |
+ explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); |
~EndFloatClipDisplayItem() override; |
static scoped_ptr<EndFloatClipDisplayItem> Create() { |
@@ -45,12 +53,18 @@ class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { |
} |
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 |