| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/proto/synced_property_conversions.h" |
| 6 |
| 7 #include "cc/proto/gfx_conversions.h" |
| 8 #include "cc/proto/synced_property.pb.h" |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 void SyncedScrollOffsetToProto(const SyncedScrollOffset& synced_scroll_offset, |
| 13 proto::SyncedProperty* proto) { |
| 14 proto::ScrollOffsetGroup* data = proto->mutable_scroll_offset_group(); |
| 15 ScrollOffsetToProto(synced_scroll_offset.PendingBase(), |
| 16 data->mutable_pending_base()); |
| 17 } |
| 18 |
| 19 void ProtoToSyncedScrollOffset(const proto::SyncedProperty& proto, |
| 20 SyncedScrollOffset* synced_scroll_offset) { |
| 21 const proto::ScrollOffsetGroup& data = proto.scroll_offset_group(); |
| 22 synced_scroll_offset->PushFromMainThread( |
| 23 ProtoToScrollOffset(data.pending_base())); |
| 24 } |
| 25 |
| 26 } // namespace cc |
| OLD | NEW |