| 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 8802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8813 DiscardFramebufferEXTImmediate& cmd = | 8813 DiscardFramebufferEXTImmediate& cmd = |
| 8814 *GetImmediateAs<DiscardFramebufferEXTImmediate>(); | 8814 *GetImmediateAs<DiscardFramebufferEXTImmediate>(); |
| 8815 cmd.Init(target, count, attachments); | 8815 cmd.Init(target, count, attachments); |
| 8816 | 8816 |
| 8817 // Should not result into a call into GL. | 8817 // Should not result into a call into GL. |
| 8818 EXPECT_EQ(error::kNoError, | 8818 EXPECT_EQ(error::kNoError, |
| 8819 ExecuteImmediateCmd(cmd, sizeof(attachments))); | 8819 ExecuteImmediateCmd(cmd, sizeof(attachments))); |
| 8820 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); | 8820 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 8821 } | 8821 } |
| 8822 | 8822 |
| 8823 TEST_F(GLES2DecoderManualInitTest, RestoreState) { |
| 8824 InitDecoder( |
| 8825 "", // extensions |
| 8826 false, // has alpha |
| 8827 false, // has depth |
| 8828 false, // has stencil |
| 8829 false, // request alpha |
| 8830 false, // request depth |
| 8831 false, // request stencil |
| 8832 true); // bind generates resource |
| 8833 SetupTexture(); |
| 8834 // TODO(kaanb): do not hardcode size |
| 8835 for (int i = 0; i < 8; ++i) { |
| 8836 EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE0 + i)) |
| 8837 .Times(1) |
| 8838 .RetiresOnSaturation(); |
| 8839 } |
| 8840 GetDecoder()->RestoreState(NULL); |
| 8841 } |
| 8842 |
| 8823 // TODO(gman): Complete this test. | 8843 // TODO(gman): Complete this test. |
| 8824 // TEST_F(GLES2DecoderTest, CompressedTexImage2DGLError) { | 8844 // TEST_F(GLES2DecoderTest, CompressedTexImage2DGLError) { |
| 8825 // } | 8845 // } |
| 8826 | 8846 |
| 8827 // TODO(gman): BufferData | 8847 // TODO(gman): BufferData |
| 8828 | 8848 |
| 8829 // TODO(gman): BufferDataImmediate | 8849 // TODO(gman): BufferDataImmediate |
| 8830 | 8850 |
| 8831 // TODO(gman): BufferSubData | 8851 // TODO(gman): BufferSubData |
| 8832 | 8852 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 8849 // TODO(gman): TexImage2DImmediate | 8869 // TODO(gman): TexImage2DImmediate |
| 8850 | 8870 |
| 8851 // TODO(gman): TexSubImage2DImmediate | 8871 // TODO(gman): TexSubImage2DImmediate |
| 8852 | 8872 |
| 8853 // TODO(gman): UseProgram | 8873 // TODO(gman): UseProgram |
| 8854 | 8874 |
| 8855 // TODO(gman): SwapBuffers | 8875 // TODO(gman): SwapBuffers |
| 8856 | 8876 |
| 8857 } // namespace gles2 | 8877 } // namespace gles2 |
| 8858 } // namespace gpu | 8878 } // namespace gpu |
| OLD | NEW |