| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 gfx::BoxF box; | 961 gfx::BoxF box; |
| 962 if (LayerUtils::GetAnimationBounds(*this, &box)) | 962 if (LayerUtils::GetAnimationBounds(*this, &box)) |
| 963 MathUtil::AddToTracedValue("animation_bounds", box, state); | 963 MathUtil::AddToTracedValue("animation_bounds", box, state); |
| 964 | 964 |
| 965 if (debug_info_) { | 965 if (debug_info_) { |
| 966 std::string str; | 966 std::string str; |
| 967 debug_info_->AppendAsTraceFormat(&str); | 967 debug_info_->AppendAsTraceFormat(&str); |
| 968 base::JSONReader json_reader; | 968 base::JSONReader json_reader; |
| 969 std::unique_ptr<base::Value> debug_info_value(json_reader.ReadToValue(str)); | 969 std::unique_ptr<base::Value> debug_info_value(json_reader.ReadToValue(str)); |
| 970 | 970 |
| 971 if (debug_info_value->IsType(base::Value::TYPE_DICTIONARY)) { | 971 if (debug_info_value->IsType(base::Value::Type::DICTIONARY)) { |
| 972 base::DictionaryValue* dictionary_value = nullptr; | 972 base::DictionaryValue* dictionary_value = nullptr; |
| 973 bool converted_to_dictionary = | 973 bool converted_to_dictionary = |
| 974 debug_info_value->GetAsDictionary(&dictionary_value); | 974 debug_info_value->GetAsDictionary(&dictionary_value); |
| 975 DCHECK(converted_to_dictionary); | 975 DCHECK(converted_to_dictionary); |
| 976 for (base::DictionaryValue::Iterator it(*dictionary_value); !it.IsAtEnd(); | 976 for (base::DictionaryValue::Iterator it(*dictionary_value); !it.IsAtEnd(); |
| 977 it.Advance()) { | 977 it.Advance()) { |
| 978 state->SetValue(it.key().data(), it.value().CreateDeepCopy()); | 978 state->SetValue(it.key().data(), it.value().CreateDeepCopy()); |
| 979 } | 979 } |
| 980 } else { | 980 } else { |
| 981 NOTREACHED(); | 981 NOTREACHED(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 .layer_transforms_should_scale_layer_contents) { | 1099 .layer_transforms_should_scale_layer_contents) { |
| 1100 return default_scale; | 1100 return default_scale; |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1103 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1104 ScreenSpaceTransform(), default_scale); | 1104 ScreenSpaceTransform(), default_scale); |
| 1105 return std::max(transform_scales.x(), transform_scales.y()); | 1105 return std::max(transform_scales.x(), transform_scales.y()); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 } // namespace cc | 1108 } // namespace cc |
| OLD | NEW |