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 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2802 | 2802 |
2803 SINGLE_THREAD_TEST_F(LayerTreeHostTestChangeLayerPropertiesInPaintContents); | 2803 SINGLE_THREAD_TEST_F(LayerTreeHostTestChangeLayerPropertiesInPaintContents); |
2804 | 2804 |
2805 class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D { | 2805 class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D { |
2806 public: | 2806 public: |
2807 MockIOSurfaceWebGraphicsContext3D() { | 2807 MockIOSurfaceWebGraphicsContext3D() { |
2808 test_capabilities_.iosurface = true; | 2808 test_capabilities_.iosurface = true; |
2809 test_capabilities_.texture_rectangle = true; | 2809 test_capabilities_.texture_rectangle = true; |
2810 } | 2810 } |
2811 | 2811 |
2812 virtual blink::WebGLId createTexture() OVERRIDE { | 2812 virtual GLuint createTexture() OVERRIDE { |
2813 return 1; | 2813 return 1; |
2814 } | 2814 } |
2815 | 2815 |
2816 MOCK_METHOD1(activeTexture, void(blink::WGC3Denum texture)); | 2816 MOCK_METHOD1(activeTexture, void(GLenum texture)); |
2817 MOCK_METHOD2(bindTexture, void(blink::WGC3Denum target, | 2817 MOCK_METHOD2(bindTexture, void(GLenum target, |
2818 blink::WebGLId texture_id)); | 2818 GLuint texture_id)); |
2819 MOCK_METHOD3(texParameteri, void(blink::WGC3Denum target, | 2819 MOCK_METHOD3(texParameteri, void(GLenum target, |
2820 blink::WGC3Denum pname, | 2820 GLenum pname, |
2821 blink::WGC3Dint param)); | 2821 GLint param)); |
2822 MOCK_METHOD5(texImageIOSurface2DCHROMIUM, void(blink::WGC3Denum target, | 2822 MOCK_METHOD5(texImageIOSurface2DCHROMIUM, void(GLenum target, |
2823 blink::WGC3Dint width, | 2823 GLint width, |
2824 blink::WGC3Dint height, | 2824 GLint height, |
2825 blink::WGC3Duint ioSurfaceId, | 2825 GLuint ioSurfaceId, |
2826 blink::WGC3Duint plane)); | 2826 GLuint plane)); |
2827 MOCK_METHOD4(drawElements, void(blink::WGC3Denum mode, | 2827 MOCK_METHOD4(drawElements, void(GLenum mode, |
2828 blink::WGC3Dsizei count, | 2828 GLsizei count, |
2829 blink::WGC3Denum type, | 2829 GLenum type, |
2830 blink::WGC3Dintptr offset)); | 2830 GLintptr offset)); |
2831 MOCK_METHOD1(deleteTexture, void(blink::WGC3Denum texture)); | 2831 MOCK_METHOD1(deleteTexture, void(GLenum texture)); |
2832 }; | 2832 }; |
2833 | 2833 |
2834 | 2834 |
2835 class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { | 2835 class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { |
2836 protected: | 2836 protected: |
2837 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) | 2837 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) |
2838 OVERRIDE { | 2838 OVERRIDE { |
2839 scoped_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned( | 2839 scoped_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned( |
2840 new MockIOSurfaceWebGraphicsContext3D); | 2840 new MockIOSurfaceWebGraphicsContext3D); |
2841 mock_context_ = mock_context_owned.get(); | 2841 mock_context_ = mock_context_owned.get(); |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4766 | 4766 |
4767 EndTest(); | 4767 EndTest(); |
4768 } | 4768 } |
4769 | 4769 |
4770 virtual void AfterTest() OVERRIDE {} | 4770 virtual void AfterTest() OVERRIDE {} |
4771 }; | 4771 }; |
4772 | 4772 |
4773 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); | 4773 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); |
4774 | 4774 |
4775 } // namespace cc | 4775 } // namespace cc |
OLD | NEW |