Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Side by Side Diff: cc/trees/proxy_common.cc

Issue 2493853002: cc/blimp: Proto Cleanup. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/proxy_common.h ('k') | cc/trees/proxy_common_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/proxy_common.h" 5 #include "cc/trees/proxy_common.h"
6 6
7 #include "cc/proto/begin_main_frame_and_commit_state.pb.h"
8 #include "cc/trees/layer_tree_host.h" 7 #include "cc/trees/layer_tree_host.h"
9 8
10 namespace cc { 9 namespace cc {
11 10
12 BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() {} 11 BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() {}
13 12
14 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} 13 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {}
15 14
16 void BeginMainFrameAndCommitState::ToProtobuf(
17 proto::BeginMainFrameAndCommitState* proto) const {
18 proto->set_begin_frame_id(begin_frame_id);
19 begin_frame_args.ToProtobuf(proto->mutable_begin_frame_args());
20 scroll_info->ToProtobuf(proto->mutable_scroll_info());
21 proto->set_memory_allocation_limit_bytes(memory_allocation_limit_bytes);
22 proto->set_evicted_ui_resources(evicted_ui_resources);
23 }
24
25 void BeginMainFrameAndCommitState::FromProtobuf(
26 const proto::BeginMainFrameAndCommitState& proto) {
27 begin_frame_id = proto.begin_frame_id();
28 begin_frame_args.FromProtobuf(proto.begin_frame_args());
29 scroll_info.reset(new ScrollAndScaleSet());
30 scroll_info->FromProtobuf(proto.scroll_info());
31 memory_allocation_limit_bytes = proto.memory_allocation_limit_bytes();
32 evicted_ui_resources = proto.evicted_ui_resources();
33 }
34
35 } // namespace cc 15 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_common.h ('k') | cc/trees/proxy_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698