| Index: cc/playback/transform_display_item.cc
|
| diff --git a/cc/playback/transform_display_item.cc b/cc/playback/transform_display_item.cc
|
| index df7ca1b8e563944ec3cdf8e4ebd35f5afe329e39..d0e7de79499c947f83661ad87370ea120d228d36 100644
|
| --- a/cc/playback/transform_display_item.cc
|
| +++ b/cc/playback/transform_display_item.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include "base/strings/stringprintf.h"
|
| #include "base/trace_event/trace_event_argument.h"
|
| +#include "cc/proto/display_item.pb.h"
|
| +#include "cc/proto/gfx_conversions.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
|
|
| namespace cc {
|
| @@ -24,6 +26,22 @@ void TransformDisplayItem::SetNew(const gfx::Transform& transform) {
|
| 0 /* external_memory_usage */);
|
| }
|
|
|
| +void TransformDisplayItem::ToProtobuf(proto::DisplayItem* proto) const {
|
| + proto->set_type(proto::DisplayItem::Type_Transform);
|
| +
|
| + proto::TransformDisplayItem* details = proto->mutable_transform_item();
|
| + 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 {
|
| @@ -46,6 +64,14 @@ EndTransformDisplayItem::EndTransformDisplayItem() {
|
| EndTransformDisplayItem::~EndTransformDisplayItem() {
|
| }
|
|
|
| +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,
|
|
|