Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: cc/trees/layer_tree_host_in_process.cc

Issue 2641023002: cc: Remove ReflectedMainFrameState. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_in_process.h ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_in_process.cc
diff --git a/cc/trees/layer_tree_host_in_process.cc b/cc/trees/layer_tree_host_in_process.cc
index 574b9770a92ca2fa0cc9a140ff09fd4d3b9054ac..24ee5e974af4328487ae41d072882521e1988d90 100644
--- a/cc/trees/layer_tree_host_in_process.cc
+++ b/cc/trees/layer_tree_host_in_process.cc
@@ -302,10 +302,7 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
if (layer_tree_->needs_full_tree_sync())
TreeSynchronizer::SynchronizeTrees(layer_tree_->root_layer(), sync_tree);
- float page_scale_delta = 1.f;
- if (reflected_main_frame_state_)
- page_scale_delta = reflected_main_frame_state_->page_scale_delta;
- layer_tree_->PushPropertiesTo(sync_tree, page_scale_delta);
+ layer_tree_->PushPropertiesTo(sync_tree);
sync_tree->PassSwapPromises(swap_promise_manager_.TakeSwapPromises());
@@ -326,19 +323,6 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
TreeSynchronizer::PushLayerProperties(layer_tree_.get(), sync_tree);
- if (reflected_main_frame_state_) {
- for (const auto& scroll_update : reflected_main_frame_state_->scrolls) {
- int layer_id = scroll_update.layer_id;
- gfx::Vector2dF scroll_delta = scroll_update.scroll_delta;
-
- PropertyTrees* property_trees = layer_tree_->property_trees();
- property_trees->scroll_tree.SetScrollOffset(
- layer_id, gfx::ScrollOffsetWithDelta(
- layer_tree_->LayerById(layer_id)->scroll_offset(),
- scroll_delta));
- }
- }
-
// This must happen after synchronizing property trees and after pushing
// properties, which updates the clobber_active_value flag.
sync_tree->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread(
@@ -358,7 +342,6 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl);
layer_tree_->property_trees()->ResetAllChangeTracking();
- reflected_main_frame_state_ = nullptr;
}
void LayerTreeHostInProcess::WillCommit() {
@@ -777,14 +760,6 @@ void LayerTreeHostInProcess::ApplyScrollAndScale(ScrollAndScaleSet* info) {
ApplyViewportDeltas(info);
}
-void LayerTreeHostInProcess::SetReflectedMainFrameState(
- std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state) {
- DCHECK(IsThreaded());
-
- reflected_main_frame_state_ = std::move(reflected_main_frame_state);
- SetNeedsCommit();
-}
-
const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler()
const {
return input_handler_weak_ptr_;
« no previous file with comments | « cc/trees/layer_tree_host_in_process.h ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698