Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1584 changed = synced_scroll_offset(key)->PushFromMainThread( | 1584 changed = synced_scroll_offset(key)->PushFromMainThread( |
| 1585 new_scroll_offset_map->at(key)->PendingBase()); | 1585 new_scroll_offset_map->at(key)->PendingBase()); |
| 1586 | 1586 |
| 1587 if (new_scroll_offset_map->at(key)->clobber_active_value()) { | 1587 if (new_scroll_offset_map->at(key)->clobber_active_value()) { |
| 1588 synced_scroll_offset(key)->set_clobber_active_value(); | 1588 synced_scroll_offset(key)->set_clobber_active_value(); |
| 1589 } | 1589 } |
| 1590 if (changed) { | 1590 if (changed) { |
| 1591 layer_tree_impl->DidUpdateScrollOffset(key); | 1591 layer_tree_impl->DidUpdateScrollOffset(key); |
| 1592 } | 1592 } |
| 1593 } else { | 1593 } else { |
| 1594 changed |= | |
| 1595 current_scroll_offset(key) != | |
| 1596 new_scroll_offset_map->at(key)->Current(property_trees()->is_active); | |
|
ajuma
2016/10/05 17:19:21
I wonder if we're just missing a case here. In the
sunxd
2016/10/05 18:48:26
I think as long as we overwrite the scroll offset
ajuma
2016/10/05 19:16:05
Ah, makes sense now, thanks for the explanation! P
| |
| 1594 layer_id_to_scroll_offset_map_[key] = new_scroll_offset_map->at(key); | 1597 layer_id_to_scroll_offset_map_[key] = new_scroll_offset_map->at(key); |
| 1595 changed |= synced_scroll_offset(key)->PushPendingToActive(); | 1598 changed |= synced_scroll_offset(key)->PushPendingToActive(); |
| 1596 if (changed) { | 1599 if (changed) { |
| 1597 layer_tree_impl->DidUpdateScrollOffset(key); | 1600 layer_tree_impl->DidUpdateScrollOffset(key); |
| 1598 } | 1601 } |
| 1599 } | 1602 } |
| 1600 } | 1603 } |
| 1601 | 1604 |
| 1602 void ScrollTree::UpdateScrollOffsetMap( | 1605 void ScrollTree::UpdateScrollOffsetMap( |
| 1603 ScrollTree::ScrollOffsetMap* new_scroll_offset_map, | 1606 ScrollTree::ScrollOffsetMap* new_scroll_offset_map, |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2365 from_target.ConcatTransform(draw_transforms.from_target); | 2368 from_target.ConcatTransform(draw_transforms.from_target); |
| 2366 from_target.Scale(effect_node->surface_contents_scale.x(), | 2369 from_target.Scale(effect_node->surface_contents_scale.x(), |
| 2367 effect_node->surface_contents_scale.y()); | 2370 effect_node->surface_contents_scale.y()); |
| 2368 DCHECK(from_target.ApproximatelyEqual(*transform) || | 2371 DCHECK(from_target.ApproximatelyEqual(*transform) || |
| 2369 !draw_transforms.invertible); | 2372 !draw_transforms.invertible); |
| 2370 } | 2373 } |
| 2371 return success; | 2374 return success; |
| 2372 } | 2375 } |
| 2373 | 2376 |
| 2374 } // namespace cc | 2377 } // namespace cc |
| OLD | NEW |