| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/output/delegating_renderer.h" | 5 #include "cc/output/delegating_renderer.h" |
| 6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
| 7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
| 8 #include "cc/test/fake_output_surface_client.h" | 8 #include "cc/test/fake_output_surface_client.h" |
| 9 #include "cc/test/fake_renderer_client.h" | 9 #include "cc/test/fake_renderer_client.h" |
| 10 #include "cc/test/fake_resource_provider.h" | 10 #include "cc/test/fake_resource_provider.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 void TestOutputSurface::SwapBuffers(CompositorFrame frame) { | 37 void TestOutputSurface::SwapBuffers(CompositorFrame frame) { |
| 38 client_->DidSwapBuffersComplete(); | 38 client_->DidSwapBuffersComplete(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 class MockContextProvider : public TestContextProvider { | 41 class MockContextProvider : public TestContextProvider { |
| 42 public: | 42 public: |
| 43 explicit MockContextProvider( | 43 explicit MockContextProvider( |
| 44 std::unique_ptr<TestWebGraphicsContext3D> context) | 44 std::unique_ptr<TestWebGraphicsContext3D> context) |
| 45 : TestContextProvider(base::MakeUnique<TestContextSupport>(), | 45 : TestContextProvider(base::MakeUnique<TestGLES2Interface>(), |
| 46 base::MakeUnique<TestGLES2Interface>(), | |
| 47 std::move(context)) {} | 46 std::move(context)) {} |
| 48 MOCK_METHOD0(DeleteCachedResources, void()); | 47 MOCK_METHOD0(DeleteCachedResources, void()); |
| 49 | 48 |
| 50 protected: | 49 protected: |
| 51 ~MockContextProvider() {} | 50 ~MockContextProvider() {} |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 template <class T> | 53 template <class T> |
| 55 std::unique_ptr<Renderer> CreateRenderer(RendererClient* client, | 54 std::unique_ptr<Renderer> CreateRenderer(RendererClient* client, |
| 56 const RendererSettings* settings, | 55 const RendererSettings* settings, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 EXPECT_CALL(*(this->context_provider_.get()), DeleteCachedResources()) | 108 EXPECT_CALL(*(this->context_provider_.get()), DeleteCachedResources()) |
| 110 .Times(1); | 109 .Times(1); |
| 111 | 110 |
| 112 EXPECT_TRUE(this->renderer_->visible()); | 111 EXPECT_TRUE(this->renderer_->visible()); |
| 113 this->renderer_->SetVisible(false); | 112 this->renderer_->SetVisible(false); |
| 114 EXPECT_FALSE(this->renderer_->visible()); | 113 EXPECT_FALSE(this->renderer_->visible()); |
| 115 } | 114 } |
| 116 | 115 |
| 117 } // namespace | 116 } // namespace |
| 118 } // namespace cc | 117 } // namespace cc |
| OLD | NEW |