Chromium Code Reviews| 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 : memory_allocation_limit_bytes(0), evicted_ui_resources(false) {} | 13 : memory_allocation_limit_bytes(0), |
|
danakj
2016/05/13 20:41:47
while you're here... mind moving all this init sad
vmpstr
2016/05/13 21:17:10
Done.
| |
| 14 evicted_ui_resources(false), | |
| 15 has_fixed_raster_scale_blurry_content(false), | |
| 16 has_fixed_raster_scale_potential_performance_regression(false) {} | |
| 14 | 17 |
| 15 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} | 18 BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} |
| 16 | 19 |
| 17 void BeginMainFrameAndCommitState::ToProtobuf( | 20 void BeginMainFrameAndCommitState::ToProtobuf( |
| 18 proto::BeginMainFrameAndCommitState* proto) const { | 21 proto::BeginMainFrameAndCommitState* proto) const { |
| 19 proto->set_begin_frame_id(begin_frame_id); | 22 proto->set_begin_frame_id(begin_frame_id); |
| 20 begin_frame_args.ToProtobuf(proto->mutable_begin_frame_args()); | 23 begin_frame_args.ToProtobuf(proto->mutable_begin_frame_args()); |
| 21 scroll_info->ToProtobuf(proto->mutable_scroll_info()); | 24 scroll_info->ToProtobuf(proto->mutable_scroll_info()); |
| 22 proto->set_memory_allocation_limit_bytes(memory_allocation_limit_bytes); | 25 proto->set_memory_allocation_limit_bytes(memory_allocation_limit_bytes); |
| 23 proto->set_evicted_ui_resources(evicted_ui_resources); | 26 proto->set_evicted_ui_resources(evicted_ui_resources); |
| 27 proto->set_has_fixed_raster_scale_blurry_content( | |
| 28 has_fixed_raster_scale_blurry_content); | |
| 29 proto->set_has_fixed_raster_scale_potential_performance_regression( | |
| 30 has_fixed_raster_scale_potential_performance_regression); | |
| 24 } | 31 } |
| 25 | 32 |
| 26 void BeginMainFrameAndCommitState::FromProtobuf( | 33 void BeginMainFrameAndCommitState::FromProtobuf( |
| 27 const proto::BeginMainFrameAndCommitState& proto) { | 34 const proto::BeginMainFrameAndCommitState& proto) { |
| 28 begin_frame_id = proto.begin_frame_id(); | 35 begin_frame_id = proto.begin_frame_id(); |
| 29 begin_frame_args.FromProtobuf(proto.begin_frame_args()); | 36 begin_frame_args.FromProtobuf(proto.begin_frame_args()); |
| 30 scroll_info.reset(new ScrollAndScaleSet()); | 37 scroll_info.reset(new ScrollAndScaleSet()); |
| 31 scroll_info->FromProtobuf(proto.scroll_info()); | 38 scroll_info->FromProtobuf(proto.scroll_info()); |
| 32 memory_allocation_limit_bytes = proto.memory_allocation_limit_bytes(); | 39 memory_allocation_limit_bytes = proto.memory_allocation_limit_bytes(); |
| 33 evicted_ui_resources = proto.evicted_ui_resources(); | 40 evicted_ui_resources = proto.evicted_ui_resources(); |
| 41 has_fixed_raster_scale_blurry_content = | |
| 42 proto.has_fixed_raster_scale_blurry_content(); | |
| 43 has_fixed_raster_scale_potential_performance_regression = | |
| 44 proto.has_fixed_raster_scale_potential_performance_regression(); | |
| 34 } | 45 } |
| 35 | 46 |
| 36 } // namespace cc | 47 } // namespace cc |
| OLD | NEW |