| Index: cc/playback/transform_display_item.cc
|
| diff --git a/cc/playback/transform_display_item.cc b/cc/playback/transform_display_item.cc
|
| index f841854f9d268311224fbc7010a16a28277c2794..8f7303c712b4bc8f6a93a4f22302e4fcbf04f6a2 100644
|
| --- a/cc/playback/transform_display_item.cc
|
| +++ b/cc/playback/transform_display_item.cc
|
| @@ -12,8 +12,18 @@
|
|
|
| namespace cc {
|
|
|
| -TransformDisplayItem::TransformDisplayItem()
|
| +TransformDisplayItem::TransformDisplayItem(const gfx::Transform& transform)
|
| : transform_(gfx::Transform::kSkipInitialization) {
|
| + SetNew(transform);
|
| +}
|
| +
|
| +TransformDisplayItem::TransformDisplayItem(const proto::DisplayItem& proto) {
|
| + DCHECK_EQ(proto::DisplayItem::Type_Transform, proto.type());
|
| +
|
| + const proto::TransformDisplayItem& details = proto.transform_item();
|
| + gfx::Transform transform = ProtoToTransform(details.transform());
|
| +
|
| + SetNew(transform);
|
| }
|
|
|
| TransformDisplayItem::~TransformDisplayItem() {
|
| @@ -21,9 +31,6 @@ TransformDisplayItem::~TransformDisplayItem() {
|
|
|
| void TransformDisplayItem::SetNew(const gfx::Transform& transform) {
|
| transform_ = transform;
|
| -
|
| - DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 1 /* op_count */,
|
| - 0 /* external_memory_usage */);
|
| }
|
|
|
| void TransformDisplayItem::ToProtobuf(proto::DisplayItem* proto) const {
|
| @@ -33,15 +40,6 @@ void TransformDisplayItem::ToProtobuf(proto::DisplayItem* proto) const {
|
| TransformToProto(transform_, details->mutable_transform());
|
| }
|
|
|
| -void TransformDisplayItem::FromProtobuf(const proto::DisplayItem& proto) {
|
| - DCHECK_EQ(proto::DisplayItem::Type_Transform, proto.type());
|
| -
|
| - const proto::TransformDisplayItem& details = proto.transform_item();
|
| - gfx::Transform transform = ProtoToTransform(details.transform());
|
| -
|
| - SetNew(transform);
|
| -}
|
| -
|
| void TransformDisplayItem::Raster(SkCanvas* canvas,
|
| const gfx::Rect& canvas_target_playback_rect,
|
| SkPicture::AbortCallback* callback) const {
|
| @@ -58,9 +56,15 @@ void TransformDisplayItem::AsValueInto(
|
| transform_.ToString().c_str(), visual_rect.ToString().c_str()));
|
| }
|
|
|
| -EndTransformDisplayItem::EndTransformDisplayItem() {
|
| - DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 0 /* op_count */,
|
| - 0 /* external_memory_usage */);
|
| +size_t TransformDisplayItem::ExternalMemoryUsage() const {
|
| + return 0;
|
| +}
|
| +
|
| +EndTransformDisplayItem::EndTransformDisplayItem() {}
|
| +
|
| +EndTransformDisplayItem::EndTransformDisplayItem(
|
| + const proto::DisplayItem& proto) {
|
| + DCHECK_EQ(proto::DisplayItem::Type_EndTransform, proto.type());
|
| }
|
|
|
| EndTransformDisplayItem::~EndTransformDisplayItem() {
|
| @@ -70,10 +74,6 @@ void EndTransformDisplayItem::ToProtobuf(proto::DisplayItem* proto) const {
|
| proto->set_type(proto::DisplayItem::Type_EndTransform);
|
| }
|
|
|
| -void EndTransformDisplayItem::FromProtobuf(const proto::DisplayItem& proto) {
|
| - DCHECK_EQ(proto::DisplayItem::Type_EndTransform, proto.type());
|
| -}
|
| -
|
| void EndTransformDisplayItem::Raster(
|
| SkCanvas* canvas,
|
| const gfx::Rect& canvas_target_playback_rect,
|
| @@ -89,4 +89,8 @@ void EndTransformDisplayItem::AsValueInto(
|
| visual_rect.ToString().c_str()));
|
| }
|
|
|
| +size_t EndTransformDisplayItem::ExternalMemoryUsage() const {
|
| + return 0;
|
| +}
|
| +
|
| } // namespace cc
|
|
|