| Index: cc/trees/layer_tree_host_unittest_copyrequest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
|
| index 6af175690f89ac01a88c0728bf24e12e1ea2e9ba..860f2831bd5b1536c6efbf90bc53872e16fb4ea1 100644
|
| --- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
|
| @@ -21,7 +21,7 @@ class LayerTreeHostCopyRequestTest : public LayerTreeTest {};
|
| class LayerTreeHostCopyRequestTestMultipleRequests
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root = FakeContentLayer::Create(&client_);
|
| root->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -33,9 +33,9 @@ class LayerTreeHostCopyRequestTestMultipleRequests
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
|
|
| - virtual void DidCommitAndDrawFrame() OVERRIDE { WaitForCallback(); }
|
| + virtual void DidCommitAndDrawFrame() override { WaitForCallback(); }
|
|
|
| void WaitForCallback() {
|
| base::MessageLoop::current()->PostTask(
|
| @@ -101,10 +101,10 @@ class LayerTreeHostCopyRequestTestMultipleRequests
|
| callbacks_.push_back(result->size());
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_EQ(4u, callbacks_.size()); }
|
| + virtual void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); }
|
|
|
| virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
|
| - OVERRIDE {
|
| + override {
|
| if (use_gl_renderer_)
|
| return FakeOutputSurface::Create3d();
|
| return FakeOutputSurface::CreateSoftware(
|
| @@ -146,7 +146,7 @@ TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
|
| class LayerTreeHostCopyRequestTestLayerDestroyed
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -162,12 +162,12 @@ class LayerTreeHostCopyRequestTestLayerDestroyed
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| callback_count_ = 0;
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void DidCommit() OVERRIDE {
|
| + virtual void DidCommit() override {
|
| int frame = layer_tree_host()->source_frame_number();
|
| switch (frame) {
|
| case 1:
|
| @@ -224,7 +224,7 @@ class LayerTreeHostCopyRequestTestLayerDestroyed
|
| ++callback_count_;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| int callback_count_;
|
| FakeContentLayerClient client_;
|
| @@ -238,7 +238,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostCopyRequestTestLayerDestroyed);
|
| class LayerTreeHostCopyRequestTestInHiddenSubtree
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -267,7 +267,7 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree
|
| base::Unretained(this))));
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| callback_count_ = 0;
|
| PostSetNeedsCommitToMainThread();
|
|
|
| @@ -321,7 +321,7 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| int callback_count_;
|
| FakeContentLayerClient client_;
|
| @@ -337,7 +337,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
|
| class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -360,7 +360,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| did_draw_ = false;
|
| PostSetNeedsCommitToMainThread();
|
|
|
| @@ -377,7 +377,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
|
| EndTest();
|
| }
|
|
|
| - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
|
| Renderer* renderer = host_impl->renderer();
|
|
|
| LayerImpl* root = host_impl->active_tree()->root_layer();
|
| @@ -398,7 +398,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
|
| did_draw_ = true;
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_TRUE(did_draw_); }
|
| + virtual void AfterTest() override { EXPECT_TRUE(did_draw_); }
|
|
|
| FakeContentLayerClient client_;
|
| bool did_draw_;
|
| @@ -415,7 +415,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
|
| class LayerTreeHostCopyRequestTestClippedOut
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -433,7 +433,7 @@ class LayerTreeHostCopyRequestTestClippedOut
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| PostSetNeedsCommitToMainThread();
|
|
|
| copy_layer_->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
|
| @@ -449,7 +449,7 @@ class LayerTreeHostCopyRequestTestClippedOut
|
| EndTest();
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| FakeContentLayerClient client_;
|
| scoped_refptr<FakeContentLayer> root_;
|
| @@ -463,7 +463,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
|
| class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -482,7 +482,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
|
| base::Unretained(this))));
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| saw_copy_request_ = false;
|
| callback_count_ = 0;
|
| PostSetNeedsCommitToMainThread();
|
| @@ -493,7 +493,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
|
| AddCopyRequest(copy_layer_.get());
|
| }
|
|
|
| - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
|
| if (impl->active_tree()->source_frame_number() == 0) {
|
| LayerImpl* root = impl->active_tree()->root_layer();
|
| EXPECT_TRUE(root->children()[0]->HasCopyRequest());
|
| @@ -501,7 +501,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
|
| }
|
| }
|
|
|
| - virtual void DidCommit() OVERRIDE {
|
| + virtual void DidCommit() override {
|
| if (layer_tree_host()->source_frame_number() == 1) {
|
| // Allow drawing.
|
| layer_tree_host()->SetViewportSize(gfx::Size(root_->bounds()));
|
| @@ -519,7 +519,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
|
| EndTest();
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_TRUE(saw_copy_request_); }
|
| + virtual void AfterTest() override { EXPECT_TRUE(saw_copy_request_); }
|
|
|
| bool saw_copy_request_;
|
| int callback_count_;
|
| @@ -535,7 +535,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
|
| - OVERRIDE {
|
| + override {
|
| if (!first_context_provider_.get()) {
|
| first_context_provider_ = TestContextProvider::Create();
|
| return FakeOutputSurface::Create3d(first_context_provider_);
|
| @@ -546,7 +546,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| return FakeOutputSurface::Create3d(second_context_provider_);
|
| }
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -558,7 +558,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
|
|
| void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
|
| EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
|
| @@ -573,7 +573,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| layer_tree_host()->SetNeedsCommit();
|
| }
|
|
|
| - virtual void DidCommitAndDrawFrame() OVERRIDE {
|
| + virtual void DidCommitAndDrawFrame() override {
|
| switch (layer_tree_host()->source_frame_number()) {
|
| case 1:
|
| // The layers have been pushed to the impl side. The layer textures have
|
| @@ -606,7 +606,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| }
|
|
|
| virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl,
|
| - bool result) OVERRIDE {
|
| + bool result) override {
|
| switch (impl->active_tree()->source_frame_number()) {
|
| case 0:
|
| // The layers have been drawn, so their textures have been allocated.
|
| @@ -646,7 +646,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
|
| EndTest();
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| scoped_refptr<TestContextProvider> first_context_provider_;
|
| scoped_refptr<TestContextProvider> second_context_provider_;
|
| @@ -665,12 +665,12 @@ class LayerTreeHostCopyRequestTestCountTextures
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
|
| - OVERRIDE {
|
| + override {
|
| context_provider_ = TestContextProvider::Create();
|
| return FakeOutputSurface::Create3d(context_provider_);
|
| }
|
|
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -682,7 +682,7 @@ class LayerTreeHostCopyRequestTestCountTextures
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| num_textures_without_readback_ = 0;
|
| num_textures_with_readback_ = 0;
|
| waited_sync_point_after_readback_ = 0;
|
| @@ -691,7 +691,7 @@ class LayerTreeHostCopyRequestTestCountTextures
|
|
|
| virtual void RequestCopy(Layer* layer) = 0;
|
|
|
| - virtual void DidCommitAndDrawFrame() OVERRIDE {
|
| + virtual void DidCommitAndDrawFrame() override {
|
| switch (layer_tree_host()->source_frame_number()) {
|
| case 1:
|
| // The layers have been pushed to the impl side. The layer textures have
|
| @@ -702,7 +702,7 @@ class LayerTreeHostCopyRequestTestCountTextures
|
| }
|
|
|
| virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl,
|
| - bool result) OVERRIDE {
|
| + bool result) override {
|
| switch (impl->active_tree()->source_frame_number()) {
|
| case 0:
|
| // The layers have been drawn, so their textures have been allocated.
|
| @@ -738,7 +738,7 @@ class LayerTreeHostCopyRequestTestCountTextures
|
| class LayerTreeHostCopyRequestTestCreatesTexture
|
| : public LayerTreeHostCopyRequestTestCountTextures {
|
| protected:
|
| - virtual void RequestCopy(Layer* layer) OVERRIDE {
|
| + virtual void RequestCopy(Layer* layer) override {
|
| // Request a normal texture copy. This should create a new texture.
|
| copy_layer_->RequestCopyOfOutput(
|
| CopyOutputRequest::CreateRequest(base::Bind(
|
| @@ -758,7 +758,7 @@ class LayerTreeHostCopyRequestTestCreatesTexture
|
| release->Run(0, false);
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {
|
| + virtual void AfterTest() override {
|
| // No sync point was needed.
|
| EXPECT_EQ(0u, waited_sync_point_after_readback_);
|
| // Except the copy to have made another texture.
|
| @@ -772,7 +772,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
|
| class LayerTreeHostCopyRequestTestProvideTexture
|
| : public LayerTreeHostCopyRequestTestCountTextures {
|
| protected:
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| external_context_provider_ = TestContextProvider::Create();
|
| EXPECT_TRUE(external_context_provider_->BindToCurrentThread());
|
| LayerTreeHostCopyRequestTestCountTextures::BeginTest();
|
| @@ -788,7 +788,7 @@ class LayerTreeHostCopyRequestTestProvideTexture
|
| EXPECT_FALSE(release);
|
| }
|
|
|
| - virtual void RequestCopy(Layer* layer) OVERRIDE {
|
| + virtual void RequestCopy(Layer* layer) override {
|
| // Request a copy to a provided texture. This should not create a new
|
| // texture.
|
| scoped_ptr<CopyOutputRequest> request =
|
| @@ -807,7 +807,7 @@ class LayerTreeHostCopyRequestTestProvideTexture
|
| copy_layer_->RequestCopyOfOutput(request.Pass());
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {
|
| + virtual void AfterTest() override {
|
| // Expect the compositor to have waited for the sync point in the provided
|
| // TextureMailbox.
|
| EXPECT_EQ(sync_point_, waited_sync_point_after_readback_);
|
| @@ -825,7 +825,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
|
| class LayerTreeHostCopyRequestTestDestroyBeforeCopy
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -837,7 +837,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| callback_count_ = 0;
|
| PostSetNeedsCommitToMainThread();
|
| }
|
| @@ -847,7 +847,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy
|
| ++callback_count_;
|
| }
|
|
|
| - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&LayerTreeHostCopyRequestTestDestroyBeforeCopy::DidActivate,
|
| @@ -888,7 +888,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE {}
|
| + virtual void AfterTest() override {}
|
|
|
| int callback_count_;
|
| FakeContentLayerClient client_;
|
| @@ -902,7 +902,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
|
| class LayerTreeHostCopyRequestTestShutdownBeforeCopy
|
| : public LayerTreeHostCopyRequestTest {
|
| protected:
|
| - virtual void SetupTree() OVERRIDE {
|
| + virtual void SetupTree() override {
|
| root_ = FakeContentLayer::Create(&client_);
|
| root_->SetBounds(gfx::Size(20, 20));
|
|
|
| @@ -914,7 +914,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy
|
| LayerTreeHostCopyRequestTest::SetupTree();
|
| }
|
|
|
| - virtual void BeginTest() OVERRIDE {
|
| + virtual void BeginTest() override {
|
| callback_count_ = 0;
|
| PostSetNeedsCommitToMainThread();
|
| }
|
| @@ -924,7 +924,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy
|
| ++callback_count_;
|
| }
|
|
|
| - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&LayerTreeHostCopyRequestTestShutdownBeforeCopy::DidActivate,
|
| @@ -959,7 +959,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy
|
| }
|
| }
|
|
|
| - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, callback_count_); }
|
| + virtual void AfterTest() override { EXPECT_EQ(1, callback_count_); }
|
|
|
| int callback_count_;
|
| FakeContentLayerClient client_;
|
|
|