| Index: cc/playback/transform_display_item.cc
|
| diff --git a/cc/playback/transform_display_item.cc b/cc/playback/transform_display_item.cc
|
| index b52f138a53840bd23ebdc6ebc3bc756ac7ed5e56..86ba6dec2bd769810efab0b86cfea113802a33c0 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) {
|
| + proto->set_type(proto::DisplayItem::Type_Transform);
|
| +
|
| + proto::TransformDisplayItem* details = proto->mutable_details_transform();
|
| + 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.details_transform();
|
| + gfx::Transform transform = ProtoToTransform(details.transform());
|
| +
|
| + SetNew(transform);
|
| +}
|
| +
|
| void TransformDisplayItem::Raster(SkCanvas* canvas,
|
| const gfx::Rect& canvas_target_playback_rect,
|
| SkPicture::AbortCallback* callback) const {
|
| @@ -53,6 +71,14 @@ EndTransformDisplayItem::EndTransformDisplayItem() {
|
| EndTransformDisplayItem::~EndTransformDisplayItem() {
|
| }
|
|
|
| +void EndTransformDisplayItem::ToProtobuf(proto::DisplayItem* proto) {
|
| + 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,
|
|
|