| Index: cc/trees/layer_tree_host_unittest_scroll.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
|
| index 4f18d00eaf182d0ff5a3eee962769cecaf3d2fef..82cee89f30379da5cbe5a4963eb27ac201911e51 100644
|
| --- a/cc/trees/layer_tree_host_unittest_scroll.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_scroll.cc
|
| @@ -33,7 +33,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
|
| scroll_amount_(2, -1),
|
| num_scrolls_(0) {}
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scoped_refptr<Layer> scroll_layer = Layer::Create();
|
| root_layer->AddChild(scroll_layer);
|
| @@ -48,7 +48,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void Layout() OVERRIDE {
|
| + virtual void Layout() override {
|
| Layer* root = layer_tree_host()->root_layer();
|
| Layer* scroll_layer = root->children()[0].get();
|
| if (!layer_tree_host()->source_frame_number()) {
|
| @@ -63,7 +63,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
|
| }
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| LayerImpl* scroll_layer = root->children()[0];
|
| EXPECT_VECTOR_EQ(gfx::Vector2d(), scroll_layer->ScrollDelta());
|
| @@ -89,11 +89,11 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
|
|
|
| virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
|
| float scale,
|
| - float top_controls_delta) OVERRIDE {
|
| + float top_controls_delta) override {
|
| num_scrolls_++;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); }
|
| + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
|
|
|
| private:
|
| gfx::ScrollOffset initial_scroll_;
|
| @@ -110,7 +110,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw
|
| LayerTreeHostScrollTestScrollMultipleRedraw()
|
| : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {}
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scroll_layer_ = Layer::Create();
|
| root_layer->AddChild(scroll_layer_);
|
| @@ -125,7 +125,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
|
| switch (layer_tree_host()->source_frame_number()) {
|
| case 0:
|
| EXPECT_VECTOR_EQ(scroll_layer_->scroll_offset(), initial_scroll_);
|
| @@ -144,7 +144,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw
|
| }
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* scroll_layer =
|
| impl->active_tree()->LayerById(scroll_layer_->id());
|
| if (impl->active_tree()->source_frame_number() == 0 &&
|
| @@ -180,11 +180,11 @@ class LayerTreeHostScrollTestScrollMultipleRedraw
|
|
|
| virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
|
| float scale,
|
| - float top_controls_delta) OVERRIDE {
|
| + float top_controls_delta) override {
|
| num_scrolls_++;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); }
|
| + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
|
|
|
| private:
|
| gfx::ScrollOffset initial_scroll_;
|
| @@ -210,9 +210,9 @@ class LayerTreeHostScrollTestScrollAbortedCommit
|
| num_impl_commits_(0),
|
| num_impl_scrolls_(0) {}
|
|
|
| - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| LayerTreeHostScrollTest::SetupTree();
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scoped_refptr<Layer> root_scroll_layer = Layer::Create();
|
| @@ -228,7 +228,7 @@ class LayerTreeHostScrollTestScrollAbortedCommit
|
| layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
|
| }
|
|
|
| - virtual void WillBeginMainFrame() OVERRIDE {
|
| + virtual void WillBeginMainFrame() override {
|
| num_will_begin_main_frames_++;
|
| Layer* root_scroll_layer =
|
| layer_tree_host()->root_layer()->children()[0].get();
|
| @@ -280,17 +280,17 @@ class LayerTreeHostScrollTestScrollAbortedCommit
|
| }
|
| }
|
|
|
| - virtual void DidBeginMainFrame() OVERRIDE { num_did_begin_main_frames_++; }
|
| + virtual void DidBeginMainFrame() override { num_did_begin_main_frames_++; }
|
|
|
| - virtual void WillCommit() OVERRIDE { num_will_commits_++; }
|
| + virtual void WillCommit() override { num_will_commits_++; }
|
|
|
| - virtual void DidCommit() OVERRIDE { num_did_commits_++; }
|
| + virtual void DidCommit() override { num_did_commits_++; }
|
|
|
| - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
|
| num_impl_commits_++;
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root_scroll_layer =
|
| impl->active_tree()->root_layer()->children()[0];
|
|
|
| @@ -360,11 +360,11 @@ class LayerTreeHostScrollTestScrollAbortedCommit
|
|
|
| virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
|
| float scale,
|
| - float top_controls_delta) OVERRIDE {
|
| + float top_controls_delta) override {
|
| num_impl_scrolls_++;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {
|
| + virtual void AfterTest() override {
|
| EXPECT_EQ(3, num_impl_scrolls_);
|
| // Verify that the embedder sees aborted commits as real commits.
|
| EXPECT_EQ(4, num_will_begin_main_frames_);
|
| @@ -394,7 +394,7 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
|
| public:
|
| LayerTreeHostScrollTestFractionalScroll() : scroll_amount_(1.75, 0) {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| LayerTreeHostScrollTest::SetupTree();
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scoped_refptr<Layer> root_scroll_layer = Layer::Create();
|
| @@ -411,11 +411,11 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
|
| layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| LayerImpl* scroll_layer = root->children()[0];
|
|
|
| @@ -447,7 +447,7 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
|
| scroll_layer->ScrollBy(scroll_amount_);
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| private:
|
| gfx::Vector2dF scroll_amount_;
|
| @@ -463,7 +463,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
|
| scroll_amount_(2, -1),
|
| num_scrolls_(0) {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_);
|
|
|
| scoped_refptr<Layer> root_layer = Layer::Create();
|
| @@ -516,9 +516,9 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
|
| LayerTreeHostScrollTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
|
|
| - virtual void WillCommit() OVERRIDE {
|
| + virtual void WillCommit() override {
|
| // Keep the test committing (otherwise the early out for no update
|
| // will stall the test).
|
| if (layer_tree_host()->source_frame_number() < 2) {
|
| @@ -532,11 +532,11 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
|
|
|
| virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
|
| float scale,
|
| - float top_controls_delta) OVERRIDE {
|
| + float top_controls_delta) override {
|
| num_scrolls_++;
|
| }
|
|
|
| - virtual void Layout() OVERRIDE {
|
| + virtual void Layout() override {
|
| EXPECT_VECTOR_EQ(gfx::Vector2d(),
|
| expected_no_scroll_layer_->scroll_offset());
|
|
|
| @@ -561,7 +561,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
|
| }
|
| }
|
|
|
| - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root_impl = impl->active_tree()->root_layer();
|
| FakePictureLayerImpl* root_scroll_layer_impl =
|
| static_cast<FakePictureLayerImpl*>(root_impl->children()[0]);
|
| @@ -632,7 +632,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {
|
| + virtual void AfterTest() override {
|
| if (scroll_child_layer_) {
|
| EXPECT_EQ(0, num_scrolls_);
|
| EXPECT_VECTOR_EQ(gfx::ScrollOffsetWithDelta(javascript_scroll_,
|
| @@ -748,11 +748,11 @@ TEST_F(LayerTreeHostScrollTestCaseWithChild,
|
|
|
| class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest {
|
| public:
|
| - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
|
| + virtual void InitializeSettings(LayerTreeSettings* settings) override {
|
| settings->impl_side_painting = true;
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| if (impl->pending_tree())
|
| impl->SetNeedsRedraw();
|
| }
|
| @@ -767,7 +767,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
|
| impl_thread_scroll2_(-3, 10),
|
| num_scrolls_(0) {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| LayerTreeHostScrollTest::SetupTree();
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scoped_refptr<Layer> root_scroll_layer = Layer::Create();
|
| @@ -785,11 +785,11 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
|
| layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void Layout() OVERRIDE {
|
| + virtual void Layout() override {
|
| Layer* root = layer_tree_host()->root_layer();
|
| Layer* scroll_layer = root->children()[0].get();
|
| if (!layer_tree_host()->source_frame_number()) {
|
| @@ -807,14 +807,14 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
|
| }
|
| }
|
|
|
| - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
|
| // We force a second draw here of the first commit before activating
|
| // the second commit.
|
| if (impl->active_tree()->source_frame_number() == 0)
|
| impl->SetNeedsRedraw();
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| ImplSidePaintingScrollTest::DrawLayersOnThread(impl);
|
|
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| @@ -874,11 +874,11 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
|
|
|
| virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
|
| float scale,
|
| - float top_controls_delta) OVERRIDE {
|
| + float top_controls_delta) override {
|
| num_scrolls_++;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); }
|
| + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
|
|
|
| private:
|
| gfx::ScrollOffset initial_scroll_;
|
| @@ -900,7 +900,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| ImplSidePaintingScrollTestImplOnlyScroll()
|
| : initial_scroll_(20, 10), impl_thread_scroll_(-2, 3) {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| LayerTreeHostScrollTest::SetupTree();
|
| Layer* root_layer = layer_tree_host()->root_layer();
|
| scoped_refptr<Layer> root_scroll_layer = Layer::Create();
|
| @@ -918,11 +918,11 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void WillCommit() OVERRIDE {
|
| + virtual void WillCommit() override {
|
| Layer* root = layer_tree_host()->root_layer();
|
| Layer* scroll_layer = root->children()[0].get();
|
| switch (layer_tree_host()->source_frame_number()) {
|
| @@ -938,7 +938,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| }
|
| }
|
|
|
| - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
|
| // Scroll after the 2nd commit has started.
|
| if (impl->active_tree()->source_frame_number() == 0) {
|
| LayerImpl* active_root = impl->active_tree()->root_layer();
|
| @@ -949,7 +949,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| }
|
| }
|
|
|
| - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
|
| // We force a second draw here of the first commit before activating
|
| // the second commit.
|
| LayerImpl* active_root = impl->active_tree()->root_layer();
|
| @@ -998,7 +998,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| }
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| ImplSidePaintingScrollTest::DrawLayersOnThread(impl);
|
|
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| @@ -1020,7 +1020,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| private:
|
| gfx::ScrollOffset initial_scroll_;
|
| @@ -1034,15 +1034,15 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
|
| public:
|
| LayerTreeHostScrollTestScrollZeroMaxScrollOffset() {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| LayerTreeTest::SetupTree();
|
| scoped_refptr<Layer> scroll_layer = Layer::Create();
|
| layer_tree_host()->root_layer()->AddChild(scroll_layer);
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| LayerImpl* scroll_layer = root->children()[0];
|
| scroll_layer->SetScrollClipLayer(root->id());
|
| @@ -1069,7 +1069,7 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
|
| EndTest();
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
| };
|
|
|
| SINGLE_AND_MULTI_THREAD_TEST_F(
|
| @@ -1081,17 +1081,17 @@ class ThreadCheckingInputHandlerClient : public InputHandlerClient {
|
| bool* received_stop_flinging)
|
| : task_runner_(runner), received_stop_flinging_(received_stop_flinging) {}
|
|
|
| - virtual void WillShutdown() OVERRIDE {
|
| + virtual void WillShutdown() override {
|
| if (!received_stop_flinging_)
|
| ADD_FAILURE() << "WillShutdown() called before fling stopped";
|
| }
|
|
|
| - virtual void Animate(base::TimeTicks time) OVERRIDE {
|
| + virtual void Animate(base::TimeTicks time) override {
|
| if (!task_runner_->BelongsToCurrentThread())
|
| ADD_FAILURE() << "Animate called on wrong thread";
|
| }
|
|
|
| - virtual void MainThreadHasStoppedFlinging() OVERRIDE {
|
| + virtual void MainThreadHasStoppedFlinging() override {
|
| if (!task_runner_->BelongsToCurrentThread())
|
| ADD_FAILURE() << "MainThreadHasStoppedFlinging called on wrong thread";
|
| *received_stop_flinging_ = true;
|
| @@ -1100,7 +1100,7 @@ class ThreadCheckingInputHandlerClient : public InputHandlerClient {
|
| virtual void DidOverscroll(
|
| const gfx::PointF& causal_event_viewport_point,
|
| const gfx::Vector2dF& accumulated_overscroll,
|
| - const gfx::Vector2dF& latest_overscroll_delta) OVERRIDE {
|
| + const gfx::Vector2dF& latest_overscroll_delta) override {
|
| if (!task_runner_->BelongsToCurrentThread())
|
| ADD_FAILURE() << "DidOverscroll called on wrong thread";
|
| }
|
| @@ -1155,7 +1155,7 @@ class LayerTreeHostScrollTestLayerStructureChange
|
| LayerTreeHostScrollTestLayerStructureChange()
|
| : scroll_destroy_whole_tree_(false) {}
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| scoped_refptr<Layer> root_layer = Layer::Create();
|
| root_layer->SetBounds(gfx::Size(10, 10));
|
|
|
| @@ -1168,11 +1168,11 @@ class LayerTreeHostScrollTestLayerStructureChange
|
| LayerTreeHostScrollTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| switch (impl->active_tree()->source_frame_number()) {
|
| case 0:
|
| @@ -1187,7 +1187,7 @@ class LayerTreeHostScrollTestLayerStructureChange
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| virtual void DidScroll(Layer* layer) {
|
| if (scroll_destroy_whole_tree_) {
|
|
|