| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/blimp/layer_tree_host_remote.h" | 5 #include "cc/blimp/layer_tree_host_remote.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 Layer* layer = layer_tree_->LayerById(client_scroll.first); | 430 Layer* layer = layer_tree_->LayerById(client_scroll.first); |
| 431 const gfx::ScrollOffset& scroll_offset = client_scroll.second; | 431 const gfx::ScrollOffset& scroll_offset = client_scroll.second; |
| 432 | 432 |
| 433 // Note the inner viewport scroll delta to report separately. | 433 // Note the inner viewport scroll delta to report separately. |
| 434 if (layer == inner_viewport_scroll_layer) { | 434 if (layer == inner_viewport_scroll_layer) { |
| 435 inner_viewport_scroll_delta = | 435 inner_viewport_scroll_delta = |
| 436 scroll_offset.DeltaFrom(layer->scroll_offset()); | 436 scroll_offset.DeltaFrom(layer->scroll_offset()); |
| 437 } | 437 } |
| 438 | 438 |
| 439 if (layer) | 439 if (layer) |
| 440 layer->SetScrollOffsetFromImplSide(scroll_offset); | 440 layer->SetScrollOffsetFromImplSide(scroll_offset, nullptr); |
| 441 else | 441 else |
| 442 layer_sync_successful = false; | 442 layer_sync_successful = false; |
| 443 } | 443 } |
| 444 | 444 |
| 445 float page_scale_delta = 1.0f; | 445 float page_scale_delta = 1.0f; |
| 446 if (client_page_scale != layer_tree_->page_scale_factor()) { | 446 if (client_page_scale != layer_tree_->page_scale_factor()) { |
| 447 page_scale_delta = client_page_scale / layer_tree_->page_scale_factor(); | 447 page_scale_delta = client_page_scale / layer_tree_->page_scale_factor(); |
| 448 layer_tree_->SetPageScaleFromImplSide(client_page_scale); | 448 layer_tree_->SetPageScaleFromImplSide(client_page_scale); |
| 449 } | 449 } |
| 450 | 450 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 layer_tree_host_proto->mutable_layer_updates(), inputs_only); | 492 layer_tree_host_proto->mutable_layer_updates(), inputs_only); |
| 493 layer_tree_->LayersThatShouldPushProperties().clear(); | 493 layer_tree_->LayersThatShouldPushProperties().clear(); |
| 494 | 494 |
| 495 std::vector<PictureData> pictures = | 495 std::vector<PictureData> pictures = |
| 496 engine_picture_cache_->CalculateCacheUpdateAndFlush(); | 496 engine_picture_cache_->CalculateCacheUpdateAndFlush(); |
| 497 proto::PictureDataVectorToSkPicturesProto( | 497 proto::PictureDataVectorToSkPicturesProto( |
| 498 pictures, layer_tree_host_proto->mutable_pictures()); | 498 pictures, layer_tree_host_proto->mutable_pictures()); |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // namespace cc | 501 } // namespace cc |
| OLD | NEW |