| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_tree_host_in_process.h" | 5 #include "cc/trees/layer_tree_host_in_process.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 // LayerTreeHostInProcess. | 976 // LayerTreeHostInProcess. |
| 977 // TODO(nyquist): Figure out how to support animations. See crbug.com/570376. | 977 // TODO(nyquist): Figure out how to support animations. See crbug.com/570376. |
| 978 TRACE_EVENT0("cc.remote", "LayerTreeHostInProcess::ToProtobufForCommit"); | 978 TRACE_EVENT0("cc.remote", "LayerTreeHostInProcess::ToProtobufForCommit"); |
| 979 *swap_promises = swap_promise_manager_.TakeSwapPromises(); | 979 *swap_promises = swap_promise_manager_.TakeSwapPromises(); |
| 980 | 980 |
| 981 proto->set_source_frame_number(source_frame_number_); | 981 proto->set_source_frame_number(source_frame_number_); |
| 982 | 982 |
| 983 // Serialize the LayerTree before serializing the properties. During layer | 983 // Serialize the LayerTree before serializing the properties. During layer |
| 984 // property serialization, we clear the list |layer_that_should_properties_| | 984 // property serialization, we clear the list |layer_that_should_properties_| |
| 985 // from the LayerTree. | 985 // from the LayerTree. |
| 986 layer_tree_->ToProtobuf(proto->mutable_layer_tree()); | 986 // The serialization code here need to serialize the complete state, including |
| 987 // the result of the main frame update. |
| 988 const bool inputs_only = false; |
| 989 layer_tree_->ToProtobuf(proto->mutable_layer_tree(), inputs_only); |
| 987 | 990 |
| 988 LayerProtoConverter::SerializeLayerProperties(this, | 991 LayerProtoConverter::SerializeLayerProperties(this, |
| 989 proto->mutable_layer_updates()); | 992 proto->mutable_layer_updates()); |
| 990 | 993 |
| 991 std::vector<PictureData> pictures = | 994 std::vector<PictureData> pictures = |
| 992 engine_picture_cache_->CalculateCacheUpdateAndFlush(); | 995 engine_picture_cache_->CalculateCacheUpdateAndFlush(); |
| 993 proto::PictureDataVectorToSkPicturesProto(pictures, | 996 proto::PictureDataVectorToSkPicturesProto(pictures, |
| 994 proto->mutable_pictures()); | 997 proto->mutable_pictures()); |
| 995 | 998 |
| 996 debug_state_.ToProtobuf(proto->mutable_debug_state()); | 999 debug_state_.ToProtobuf(proto->mutable_debug_state()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1027 | 1030 |
| 1028 debug_state_.FromProtobuf(proto.debug_state()); | 1031 debug_state_.FromProtobuf(proto.debug_state()); |
| 1029 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); | 1032 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); |
| 1030 content_is_suitable_for_gpu_rasterization_ = | 1033 content_is_suitable_for_gpu_rasterization_ = |
| 1031 proto.content_is_suitable_for_gpu_rasterization(); | 1034 proto.content_is_suitable_for_gpu_rasterization(); |
| 1032 id_ = proto.id(); | 1035 id_ = proto.id(); |
| 1033 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); | 1036 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); |
| 1034 } | 1037 } |
| 1035 | 1038 |
| 1036 } // namespace cc | 1039 } // namespace cc |
| OLD | NEW |