| 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 "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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 .RetiresOnSaturation(); | 851 .RetiresOnSaturation(); |
| 852 DrawArrays cmd; | 852 DrawArrays cmd; |
| 853 cmd.Init(GL_TRIANGLES, 0, kNumVertices); | 853 cmd.Init(GL_TRIANGLES, 0, kNumVertices); |
| 854 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 854 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 855 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 855 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 856 } | 856 } |
| 857 | 857 |
| 858 // Same as DrawArraysValidAttributesSucceeds, but with workaround | 858 // Same as DrawArraysValidAttributesSucceeds, but with workaround |
| 859 // |init_vertex_attributes|. | 859 // |init_vertex_attributes|. |
| 860 TEST_P(GLES2DecoderManualInitTest, InitVertexAttributes) { | 860 TEST_P(GLES2DecoderManualInitTest, InitVertexAttributes) { |
| 861 CommandLine command_line(0, NULL); | 861 base::CommandLine command_line(0, NULL); |
| 862 command_line.AppendSwitchASCII( | 862 command_line.AppendSwitchASCII( |
| 863 switches::kGpuDriverBugWorkarounds, | 863 switches::kGpuDriverBugWorkarounds, |
| 864 base::IntToString(gpu::INIT_VERTEX_ATTRIBUTES)); | 864 base::IntToString(gpu::INIT_VERTEX_ATTRIBUTES)); |
| 865 InitState init; | 865 InitState init; |
| 866 init.gl_version = "3.0"; | 866 init.gl_version = "3.0"; |
| 867 init.has_alpha = true; | 867 init.has_alpha = true; |
| 868 init.has_depth = true; | 868 init.has_depth = true; |
| 869 init.request_alpha = true; | 869 init.request_alpha = true; |
| 870 init.request_depth = true; | 870 init.request_depth = true; |
| 871 init.bind_generates_resource = true; | 871 init.bind_generates_resource = true; |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 .Times(1) | 2387 .Times(1) |
| 2388 .RetiresOnSaturation(); | 2388 .RetiresOnSaturation(); |
| 2389 DrawArrays cmd; | 2389 DrawArrays cmd; |
| 2390 cmd.Init(GL_TRIANGLES, 0, kNumVertices); | 2390 cmd.Init(GL_TRIANGLES, 0, kNumVertices); |
| 2391 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 2391 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 2392 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 2392 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 2393 } | 2393 } |
| 2394 | 2394 |
| 2395 } // namespace gles2 | 2395 } // namespace gles2 |
| 2396 } // namespace gpu | 2396 } // namespace gpu |
| OLD | NEW |