| 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/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 // the raster_source_scale_ in place. | 1113 // the raster_source_scale_ in place. |
| 1114 if (old_raster_source_scale && | 1114 if (old_raster_source_scale && |
| 1115 !draw_properties().screen_space_transform_is_animating && | 1115 !draw_properties().screen_space_transform_is_animating && |
| 1116 !was_screen_space_transform_animating_ && | 1116 !was_screen_space_transform_animating_ && |
| 1117 old_raster_source_scale != ideal_source_scale_) | 1117 old_raster_source_scale != ideal_source_scale_) |
| 1118 raster_source_scale_is_fixed_ = true; | 1118 raster_source_scale_is_fixed_ = true; |
| 1119 | 1119 |
| 1120 // TODO(danakj): Adjust raster source scale closer to ideal source scale at | 1120 // TODO(danakj): Adjust raster source scale closer to ideal source scale at |
| 1121 // a throttled rate. Possibly make use of invalidation_.IsEmpty() on pending | 1121 // a throttled rate. Possibly make use of invalidation_.IsEmpty() on pending |
| 1122 // tree. This will allow CSS scale changes to get re-rastered at an | 1122 // tree. This will allow CSS scale changes to get re-rastered at an |
| 1123 // appropriate rate. | 1123 // appropriate rate. (crbug.com/413636) |
| 1124 if (raster_source_scale_is_fixed_) { | 1124 if (raster_source_scale_is_fixed_) { |
| 1125 raster_contents_scale_ /= raster_source_scale_; | 1125 raster_contents_scale_ /= raster_source_scale_; |
| 1126 raster_source_scale_ = 1.f; | 1126 raster_source_scale_ = 1.f; |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 // During pinch we completely ignore the current ideal scale, and just use | 1129 // During pinch we completely ignore the current ideal scale, and just use |
| 1130 // a multiple of the previous scale. | 1130 // a multiple of the previous scale. |
| 1131 // TODO(danakj): This seems crazy, we should use the current ideal, no? | 1131 // TODO(danakj): This seems crazy, we should use the current ideal, no? |
| 1132 bool is_pinching = layer_tree_impl()->PinchGestureActive(); | 1132 bool is_pinching = layer_tree_impl()->PinchGestureActive(); |
| 1133 if (is_pinching && old_raster_contents_scale) { | 1133 if (is_pinching && old_raster_contents_scale) { |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1762 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
| 1763 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1763 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
| 1764 return tiling_range.end - 1 - current_tiling_range_offset; | 1764 return tiling_range.end - 1 - current_tiling_range_offset; |
| 1765 } | 1765 } |
| 1766 } | 1766 } |
| 1767 NOTREACHED(); | 1767 NOTREACHED(); |
| 1768 return 0; | 1768 return 0; |
| 1769 } | 1769 } |
| 1770 | 1770 |
| 1771 } // namespace cc | 1771 } // namespace cc |
| OLD | NEW |