OLD | NEW |
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" | 7 #include "cc/proto/begin_main_frame_and_commit_state.pb.h" |
8 #include "cc/trees/layer_tree_host.h" | 8 #include "cc/trees/layer_tree_host.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() {} | 12 BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() {} |
13 | 13 |
14 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} | 14 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} |
15 | 15 |
16 void BeginMainFrameAndCommitState::ToProtobuf( | 16 void BeginMainFrameAndCommitState::ToProtobuf( |
17 proto::BeginMainFrameAndCommitState* proto) const { | 17 proto::BeginMainFrameAndCommitState* proto) const { |
18 proto->set_begin_frame_id(begin_frame_id); | 18 proto->set_begin_frame_id(begin_frame_id); |
19 begin_frame_args.ToProtobuf(proto->mutable_begin_frame_args()); | 19 begin_frame_args.ToProtobuf(proto->mutable_begin_frame_args()); |
20 scroll_info->ToProtobuf(proto->mutable_scroll_info()); | 20 scroll_info->ToProtobuf(proto->mutable_scroll_info()); |
21 proto->set_memory_allocation_limit_bytes(memory_allocation_limit_bytes); | 21 proto->set_memory_allocation_limit_bytes(memory_allocation_limit_bytes); |
22 proto->set_evicted_ui_resources(evicted_ui_resources); | 22 proto->set_evicted_ui_resources(evicted_ui_resources); |
23 proto->set_has_fixed_raster_scale_blurry_content( | |
24 has_fixed_raster_scale_blurry_content); | |
25 proto->set_has_fixed_raster_scale_potential_performance_regression( | |
26 has_fixed_raster_scale_potential_performance_regression); | |
27 } | 23 } |
28 | 24 |
29 void BeginMainFrameAndCommitState::FromProtobuf( | 25 void BeginMainFrameAndCommitState::FromProtobuf( |
30 const proto::BeginMainFrameAndCommitState& proto) { | 26 const proto::BeginMainFrameAndCommitState& proto) { |
31 begin_frame_id = proto.begin_frame_id(); | 27 begin_frame_id = proto.begin_frame_id(); |
32 begin_frame_args.FromProtobuf(proto.begin_frame_args()); | 28 begin_frame_args.FromProtobuf(proto.begin_frame_args()); |
33 scroll_info.reset(new ScrollAndScaleSet()); | 29 scroll_info.reset(new ScrollAndScaleSet()); |
34 scroll_info->FromProtobuf(proto.scroll_info()); | 30 scroll_info->FromProtobuf(proto.scroll_info()); |
35 memory_allocation_limit_bytes = proto.memory_allocation_limit_bytes(); | 31 memory_allocation_limit_bytes = proto.memory_allocation_limit_bytes(); |
36 evicted_ui_resources = proto.evicted_ui_resources(); | 32 evicted_ui_resources = proto.evicted_ui_resources(); |
37 has_fixed_raster_scale_blurry_content = | |
38 proto.has_fixed_raster_scale_blurry_content(); | |
39 has_fixed_raster_scale_potential_performance_regression = | |
40 proto.has_fixed_raster_scale_potential_performance_regression(); | |
41 } | 33 } |
42 | 34 |
43 } // namespace cc | 35 } // namespace cc |
OLD | NEW |