OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/debug/test_web_graphics_context_3d.h" | 10 #include "cc/debug/test_web_graphics_context_3d.h" |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 "GL_CHROMIUM_post_sub_buffer GL_CHROMIUM_discard_backbuffer"); | 1474 "GL_CHROMIUM_post_sub_buffer GL_CHROMIUM_discard_backbuffer"); |
1475 return WebString(); | 1475 return WebString(); |
1476 } | 1476 } |
1477 }; | 1477 }; |
1478 | 1478 |
1479 class MockOutputSurface : public OutputSurface { | 1479 class MockOutputSurface : public OutputSurface { |
1480 public: | 1480 public: |
1481 MockOutputSurface() | 1481 MockOutputSurface() |
1482 : OutputSurface(TestContextProvider::Create( | 1482 : OutputSurface(TestContextProvider::Create( |
1483 scoped_ptr<TestWebGraphicsContext3D>( | 1483 scoped_ptr<TestWebGraphicsContext3D>( |
1484 new StrictMock<OutputSurfaceMockContext>))) { | 1484 new StrictMock<OutputSurfaceMockContext>)), |
| 1485 OutputSurface::kDefaultMaxTransferBufferUsageBytes) { |
1485 surface_size_ = gfx::Size(100, 100); | 1486 surface_size_ = gfx::Size(100, 100); |
1486 } | 1487 } |
1487 virtual ~MockOutputSurface() {} | 1488 virtual ~MockOutputSurface() {} |
1488 | 1489 |
1489 MOCK_METHOD0(EnsureBackbuffer, void()); | 1490 MOCK_METHOD0(EnsureBackbuffer, void()); |
1490 MOCK_METHOD0(DiscardBackbuffer, void()); | 1491 MOCK_METHOD0(DiscardBackbuffer, void()); |
1491 MOCK_METHOD2(Reshape, void(gfx::Size size, float scale_factor)); | 1492 MOCK_METHOD2(Reshape, void(gfx::Size size, float scale_factor)); |
1492 MOCK_METHOD0(BindFramebuffer, void()); | 1493 MOCK_METHOD0(BindFramebuffer, void()); |
1493 MOCK_METHOD1(SwapBuffers, void(CompositorFrame* frame)); | 1494 MOCK_METHOD1(SwapBuffers, void(CompositorFrame* frame)); |
1494 }; | 1495 }; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 base::MessageLoop::current()->Run(); | 1643 base::MessageLoop::current()->Run(); |
1643 | 1644 |
1644 // The sync point should have happened. | 1645 // The sync point should have happened. |
1645 EXPECT_EQ(1, sync_point_callback_count); | 1646 EXPECT_EQ(1, sync_point_callback_count); |
1646 EXPECT_EQ(1, other_callback_count); | 1647 EXPECT_EQ(1, other_callback_count); |
1647 } | 1648 } |
1648 #endif // OS_ANDROID | 1649 #endif // OS_ANDROID |
1649 | 1650 |
1650 } // namespace | 1651 } // namespace |
1651 } // namespace cc | 1652 } // namespace cc |
OLD | NEW |