OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 5645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5656 false, // has alpha | 5656 false, // has alpha |
5657 false, // has depth | 5657 false, // has depth |
5658 false, // has stencil | 5658 false, // has stencil |
5659 false, // request alpha | 5659 false, // request alpha |
5660 false, // request depth | 5660 false, // request depth |
5661 false, // request stencil | 5661 false, // request stencil |
5662 false); // bind generates resource | 5662 false); // bind generates resource |
5663 | 5663 |
5664 BindTexture cmd1; | 5664 BindTexture cmd1; |
5665 cmd1.Init(GL_TEXTURE_2D, kInvalidClientId); | 5665 cmd1.Init(GL_TEXTURE_2D, kInvalidClientId); |
5666 EXPECT_NE(error::kNoError, ExecuteCmd(cmd1)); | 5666 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); |
| 5667 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
5667 | 5668 |
5668 BindBuffer cmd2; | 5669 BindBuffer cmd2; |
5669 cmd2.Init(GL_ARRAY_BUFFER, kInvalidClientId); | 5670 cmd2.Init(GL_ARRAY_BUFFER, kInvalidClientId); |
5670 EXPECT_NE(error::kNoError, ExecuteCmd(cmd2)); | 5671 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
| 5672 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
5671 | 5673 |
5672 BindFramebuffer cmd3; | 5674 BindFramebuffer cmd3; |
5673 cmd3.Init(GL_FRAMEBUFFER, kInvalidClientId); | 5675 cmd3.Init(GL_FRAMEBUFFER, kInvalidClientId); |
5674 EXPECT_NE(error::kNoError, ExecuteCmd(cmd3)); | 5676 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd3)); |
| 5677 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
5675 | 5678 |
5676 BindRenderbuffer cmd4; | 5679 BindRenderbuffer cmd4; |
5677 cmd4.Init(GL_RENDERBUFFER, kInvalidClientId); | 5680 cmd4.Init(GL_RENDERBUFFER, kInvalidClientId); |
5678 EXPECT_NE(error::kNoError, ExecuteCmd(cmd4)); | 5681 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd4)); |
| 5682 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
5679 } | 5683 } |
5680 | 5684 |
5681 TEST_F(GLES2DecoderManualInitTest, ARBTextureRectangleBindTexture) { | 5685 TEST_F(GLES2DecoderManualInitTest, ARBTextureRectangleBindTexture) { |
5682 InitDecoder( | 5686 InitDecoder( |
5683 "GL_ARB_texture_rectangle", // extensions | 5687 "GL_ARB_texture_rectangle", // extensions |
5684 "3.0", // gl version | 5688 "3.0", // gl version |
5685 false, // has alpha | 5689 false, // has alpha |
5686 false, // has depth | 5690 false, // has depth |
5687 false, // has stencil | 5691 false, // has stencil |
5688 false, // request alpha | 5692 false, // request alpha |
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8929 // TODO(gman): TexImage2DImmediate | 8933 // TODO(gman): TexImage2DImmediate |
8930 | 8934 |
8931 // TODO(gman): TexSubImage2DImmediate | 8935 // TODO(gman): TexSubImage2DImmediate |
8932 | 8936 |
8933 // TODO(gman): UseProgram | 8937 // TODO(gman): UseProgram |
8934 | 8938 |
8935 // TODO(gman): SwapBuffers | 8939 // TODO(gman): SwapBuffers |
8936 | 8940 |
8937 } // namespace gles2 | 8941 } // namespace gles2 |
8938 } // namespace gpu | 8942 } // namespace gpu |
OLD | NEW |