| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 void LayerImpl::GatherFrameTimingRequestIds(std::vector<int64_t>* request_ids) { | 1219 void LayerImpl::GatherFrameTimingRequestIds(std::vector<int64_t>* request_ids) { |
| 1220 for (const auto& request : frame_timing_requests_) | 1220 for (const auto& request : frame_timing_requests_) |
| 1221 request_ids->push_back(request.id()); | 1221 request_ids->push_back(request.id()); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 void LayerImpl::SetTransform(const gfx::Transform& transform) { | 1224 void LayerImpl::SetTransform(const gfx::Transform& transform) { |
| 1225 if (transform_ == transform) | 1225 if (transform_ == transform) |
| 1226 return; | 1226 return; |
| 1227 transform_ = transform; |
| 1227 | 1228 |
| 1228 transform_ = transform; | |
| 1229 transform_is_invertible_ = transform_.IsInvertible(); | 1229 transform_is_invertible_ = transform_.IsInvertible(); |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 void LayerImpl::SetTransformAndInvertibility(const gfx::Transform& transform, | 1232 void LayerImpl::SetTransformAndInvertibility(const gfx::Transform& transform, |
| 1233 bool transform_is_invertible) { | 1233 bool transform_is_invertible) { |
| 1234 if (transform_ == transform) { | 1234 if (transform_ == transform) { |
| 1235 DCHECK(transform_is_invertible_ == transform_is_invertible) | 1235 DCHECK(transform_is_invertible_ == transform_is_invertible) |
| 1236 << "Can't change invertibility if transform is unchanged"; | 1236 << "Can't change invertibility if transform is unchanged"; |
| 1237 return; | 1237 return; |
| 1238 } | 1238 } |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 .layer_transforms_should_scale_layer_contents) { | 1604 .layer_transforms_should_scale_layer_contents) { |
| 1605 return default_scale; | 1605 return default_scale; |
| 1606 } | 1606 } |
| 1607 | 1607 |
| 1608 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1608 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1609 DrawTransform(), default_scale); | 1609 DrawTransform(), default_scale); |
| 1610 return std::max(transform_scales.x(), transform_scales.y()); | 1610 return std::max(transform_scales.x(), transform_scales.y()); |
| 1611 } | 1611 } |
| 1612 | 1612 |
| 1613 } // namespace cc | 1613 } // namespace cc |
| OLD | NEW |