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 "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 3779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3790 EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL); | 3790 EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL); |
3791 } | 3791 } |
3792 | 3792 |
3793 class MockGLImage : public gl::GLImage { | 3793 class MockGLImage : public gl::GLImage { |
3794 public: | 3794 public: |
3795 MockGLImage() {} | 3795 MockGLImage() {} |
3796 | 3796 |
3797 // Overridden from gl::GLImage: | 3797 // Overridden from gl::GLImage: |
3798 MOCK_METHOD0(GetSize, gfx::Size()); | 3798 MOCK_METHOD0(GetSize, gfx::Size()); |
3799 MOCK_METHOD0(GetInternalFormat, unsigned()); | 3799 MOCK_METHOD0(GetInternalFormat, unsigned()); |
3800 MOCK_METHOD1(Destroy, void(bool)); | |
3801 MOCK_METHOD1(BindTexImage, bool(unsigned)); | 3800 MOCK_METHOD1(BindTexImage, bool(unsigned)); |
3802 MOCK_METHOD1(ReleaseTexImage, void(unsigned)); | 3801 MOCK_METHOD1(ReleaseTexImage, void(unsigned)); |
3803 MOCK_METHOD1(CopyTexImage, bool(unsigned)); | 3802 MOCK_METHOD1(CopyTexImage, bool(unsigned)); |
3804 MOCK_METHOD3(CopyTexSubImage, | 3803 MOCK_METHOD3(CopyTexSubImage, |
3805 bool(unsigned, const gfx::Point&, const gfx::Rect&)); | 3804 bool(unsigned, const gfx::Point&, const gfx::Rect&)); |
3806 MOCK_METHOD5(ScheduleOverlayPlane, bool(gfx::AcceleratedWidget, | 3805 MOCK_METHOD5(ScheduleOverlayPlane, bool(gfx::AcceleratedWidget, |
3807 int, | 3806 int, |
3808 gfx::OverlayTransform, | 3807 gfx::OverlayTransform, |
3809 const gfx::Rect&, | 3808 const gfx::Rect&, |
3810 const gfx::RectF&)); | 3809 const gfx::RectF&)); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3926 .RetiresOnSaturation(); | 3925 .RetiresOnSaturation(); |
3927 FramebufferTexture2D fbtex_cmd; | 3926 FramebufferTexture2D fbtex_cmd; |
3928 fbtex_cmd.Init(GL_FRAMEBUFFER, | 3927 fbtex_cmd.Init(GL_FRAMEBUFFER, |
3929 GL_COLOR_ATTACHMENT0, | 3928 GL_COLOR_ATTACHMENT0, |
3930 GL_TEXTURE_2D, | 3929 GL_TEXTURE_2D, |
3931 client_texture_id_, | 3930 client_texture_id_, |
3932 0); | 3931 0); |
3933 EXPECT_EQ(error::kNoError, ExecuteCmd(fbtex_cmd)); | 3932 EXPECT_EQ(error::kNoError, ExecuteCmd(fbtex_cmd)); |
3934 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 3933 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
3935 | 3934 |
3936 EXPECT_CALL(*image.get(), Destroy(true)).Times(1).RetiresOnSaturation(); | |
3937 image = nullptr; | 3935 image = nullptr; |
3938 } | 3936 } |
3939 | 3937 |
3940 TEST_P(GLES2DecoderManualInitTest, DrawWithGLImageExternal) { | 3938 TEST_P(GLES2DecoderManualInitTest, DrawWithGLImageExternal) { |
3941 InitState init; | 3939 InitState init; |
3942 init.extensions = "GL_OES_EGL_image_external"; | 3940 init.extensions = "GL_OES_EGL_image_external"; |
3943 init.gl_version = "opengl es 2.0"; | 3941 init.gl_version = "opengl es 2.0"; |
3944 init.has_alpha = true; | 3942 init.has_alpha = true; |
3945 init.has_depth = true; | 3943 init.has_depth = true; |
3946 init.request_alpha = true; | 3944 init.request_alpha = true; |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4689 // TODO(gman): CompressedTexSubImage2DImmediate | 4687 // TODO(gman): CompressedTexSubImage2DImmediate |
4690 | 4688 |
4691 // TODO(gman): TexImage2D | 4689 // TODO(gman): TexImage2D |
4692 | 4690 |
4693 // TODO(gman): TexImage2DImmediate | 4691 // TODO(gman): TexImage2DImmediate |
4694 | 4692 |
4695 // TODO(gman): TexSubImage2DImmediate | 4693 // TODO(gman): TexSubImage2DImmediate |
4696 | 4694 |
4697 } // namespace gles2 | 4695 } // namespace gles2 |
4698 } // namespace gpu | 4696 } // namespace gpu |
OLD | NEW |