OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 5454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5465 PostSetNeedsCommitToMainThread(); | 5465 PostSetNeedsCommitToMainThread(); |
5466 } | 5466 } |
5467 | 5467 |
5468 void BeginMainFrame(const BeginFrameArgs& args) override { | 5468 void BeginMainFrame(const BeginFrameArgs& args) override { |
5469 EXPECT_EQ(nullptr, layer_tree_host()->root_layer()); | 5469 EXPECT_EQ(nullptr, layer_tree_host()->root_layer()); |
5470 | 5470 |
5471 layer_tree_host()->ApplyScrollAndScale(&info_); | 5471 layer_tree_host()->ApplyScrollAndScale(&info_); |
5472 EndTest(); | 5472 EndTest(); |
5473 } | 5473 } |
5474 | 5474 |
5475 void ApplyViewportDeltas( | 5475 void ApplyViewportDeltas(const gfx::Vector2d& inner, |
5476 const gfx::Vector2d& inner, | 5476 const gfx::Vector2d& outer, |
5477 const gfx::Vector2d& outer, | 5477 const gfx::Vector2dF& elastic_overscroll_delta, |
5478 float scale_delta, | 5478 float scale_delta, |
5479 float top_controls_delta) override { | 5479 float top_controls_delta) override { |
5480 EXPECT_EQ(info_.page_scale_delta, scale_delta); | 5480 EXPECT_EQ(info_.page_scale_delta, scale_delta); |
5481 EXPECT_EQ(info_.top_controls_delta, top_controls_delta); | 5481 EXPECT_EQ(info_.top_controls_delta, top_controls_delta); |
5482 deltas_sent_to_client_ = true; | 5482 deltas_sent_to_client_ = true; |
5483 } | 5483 } |
5484 | 5484 |
5485 void ApplyViewportDeltas( | 5485 void ApplyViewportDeltas( |
5486 const gfx::Vector2d& scroll, | 5486 const gfx::Vector2d& scroll, |
5487 float scale_delta, | 5487 float scale_delta, |
5488 float top_controls_delta) override { | 5488 float top_controls_delta) override { |
5489 EXPECT_EQ(info_.page_scale_delta, scale_delta); | 5489 EXPECT_EQ(info_.page_scale_delta, scale_delta); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5935 | 5935 |
5936 protected: | 5936 protected: |
5937 FakeContentLayerClient client_; | 5937 FakeContentLayerClient client_; |
5938 size_t notify_ready_to_activate_count_; | 5938 size_t notify_ready_to_activate_count_; |
5939 size_t scheduled_manage_tiles_count_; | 5939 size_t scheduled_manage_tiles_count_; |
5940 }; | 5940 }; |
5941 | 5941 |
5942 MULTI_THREAD_IMPL_TEST_F(LayerTreeHostTestOneActivatePerManageTiles); | 5942 MULTI_THREAD_IMPL_TEST_F(LayerTreeHostTestOneActivatePerManageTiles); |
5943 | 5943 |
5944 } // namespace cc | 5944 } // namespace cc |
OLD | NEW |