| 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 7053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7064 EndQueryEXT end_cmd; | 7064 EndQueryEXT end_cmd; |
| 7065 end_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, 1); | 7065 end_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, 1); |
| 7066 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); | 7066 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); |
| 7067 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 7067 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 7068 EXPECT_FALSE(query->pending()); | 7068 EXPECT_FALSE(query->pending()); |
| 7069 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), | 7069 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), |
| 7070 static_cast<GLenum>(sync->result)); | 7070 static_cast<GLenum>(sync->result)); |
| 7071 } | 7071 } |
| 7072 | 7072 |
| 7073 TEST_F(GLES2DecoderTest, ProduceAndConsumeTextureCHROMIUM) { | 7073 TEST_F(GLES2DecoderTest, ProduceAndConsumeTextureCHROMIUM) { |
| 7074 Mailbox mailbox; | 7074 Mailbox mailbox = Mailbox::Generate(); |
| 7075 group().mailbox_manager()->GenerateMailbox(&mailbox); | |
| 7076 | 7075 |
| 7077 memcpy(shared_memory_address_, mailbox.name, sizeof(mailbox.name)); | 7076 memcpy(shared_memory_address_, mailbox.name, sizeof(mailbox.name)); |
| 7078 | 7077 |
| 7079 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 7078 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
| 7080 DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 3, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, | 7079 DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 3, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, |
| 7081 0, 0); | 7080 0, 0); |
| 7082 DoTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, 2, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, | 7081 DoTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, 2, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, |
| 7083 0, 0); | 7082 0, 0); |
| 7084 TextureRef* texture_ref = group().texture_manager()->GetTexture( | 7083 TextureRef* texture_ref = group().texture_manager()->GetTexture( |
| 7085 client_texture_id_); | 7084 client_texture_id_); |
| (...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9004 // TODO(gman): TexImage2DImmediate | 9003 // TODO(gman): TexImage2DImmediate |
| 9005 | 9004 |
| 9006 // TODO(gman): TexSubImage2DImmediate | 9005 // TODO(gman): TexSubImage2DImmediate |
| 9007 | 9006 |
| 9008 // TODO(gman): UseProgram | 9007 // TODO(gman): UseProgram |
| 9009 | 9008 |
| 9010 // TODO(gman): SwapBuffers | 9009 // TODO(gman): SwapBuffers |
| 9011 | 9010 |
| 9012 } // namespace gles2 | 9011 } // namespace gles2 |
| 9013 } // namespace gpu | 9012 } // namespace gpu |
| OLD | NEW |