| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/service/gl_mock.h" | 9 #include "gpu/command_buffer/service/gl_mock.h" |
| 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 .RetiresOnSaturation(); | 85 .RetiresOnSaturation(); |
| 86 | 86 |
| 87 engine_.reset(new StrictMock<MockCommandBufferEngine>()); | 87 engine_.reset(new StrictMock<MockCommandBufferEngine>()); |
| 88 Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); | 88 Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); |
| 89 shared_memory_offset_ = kSharedMemoryOffset; | 89 shared_memory_offset_ = kSharedMemoryOffset; |
| 90 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + | 90 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + |
| 91 shared_memory_offset_; | 91 shared_memory_offset_; |
| 92 shared_memory_id_ = kSharedMemoryId; | 92 shared_memory_id_ = kSharedMemoryId; |
| 93 | 93 |
| 94 decoder_.reset(GLES2Decoder::Create(&group_)); | 94 decoder_.reset(GLES2Decoder::Create(&group_)); |
| 95 decoder_->Initialize(); | 95 decoder_->Initialize(NULL, gfx::Size(), 0); |
| 96 decoder_->set_engine(engine_.get()); | 96 decoder_->set_engine(engine_.get()); |
| 97 | 97 |
| 98 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) | 98 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) |
| 99 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) | 99 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) |
| 100 .RetiresOnSaturation(); | 100 .RetiresOnSaturation(); |
| 101 GenHelper<GenBuffersImmediate>(client_buffer_id_); | 101 GenHelper<GenBuffersImmediate>(client_buffer_id_); |
| 102 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) | 102 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) |
| 103 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) | 103 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) |
| 104 .RetiresOnSaturation(); | 104 .RetiresOnSaturation(); |
| 105 GenHelper<GenFramebuffersImmediate>(client_framebuffer_id_); | 105 GenHelper<GenFramebuffersImmediate>(client_framebuffer_id_); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; | 452 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; |
| 453 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; | 453 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; |
| 454 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; | 454 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; |
| 455 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2"; | 455 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2"; |
| 456 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3"; | 456 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3"; |
| 457 | 457 |
| 458 } // namespace gles2 | 458 } // namespace gles2 |
| 459 } // namespace gpu | 459 } // namespace gpu |
| 460 | 460 |
| 461 | 461 |
| OLD | NEW |