| 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 // Tests for GLES2Implementation. | 5 // Tests for GLES2Implementation. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
| 10 #include <GLES2/gl2extchromium.h> | 10 #include <GLES2/gl2extchromium.h> |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 EXPECT_CALL(*command_buffer(), OnFlush()) | 394 EXPECT_CALL(*command_buffer(), OnFlush()) |
| 395 .WillOnce(SetMemory(mem1.ptr + sizeof(int_state), int_state)) | 395 .WillOnce(SetMemory(mem1.ptr + sizeof(int_state), int_state)) |
| 396 .RetiresOnSaturation(); | 396 .RetiresOnSaturation(); |
| 397 GetNextToken(); // eat the token that starting up will use. | 397 GetNextToken(); // eat the token that starting up will use. |
| 398 | 398 |
| 399 gl_.reset(new GLES2Implementation( | 399 gl_.reset(new GLES2Implementation( |
| 400 helper_.get(), | 400 helper_.get(), |
| 401 NULL, | 401 NULL, |
| 402 transfer_buffer_.get(), | 402 transfer_buffer_.get(), |
| 403 shared_resources, | 403 shared_resources, |
| 404 bind_generates_resource)); | 404 bind_generates_resource, |
| 405 NULL)); |
| 405 ASSERT_TRUE(gl_->Initialize( | 406 ASSERT_TRUE(gl_->Initialize( |
| 406 kTransferBufferSize, | 407 kTransferBufferSize, |
| 407 kTransferBufferSize, | 408 kTransferBufferSize, |
| 408 kTransferBufferSize)); | 409 kTransferBufferSize)); |
| 409 } | 410 } |
| 410 | 411 |
| 411 EXPECT_CALL(*command_buffer(), OnFlush()) | 412 EXPECT_CALL(*command_buffer(), OnFlush()) |
| 412 .Times(1) | 413 .Times(1) |
| 413 .RetiresOnSaturation(); | 414 .RetiresOnSaturation(); |
| 414 helper_->CommandBufferHelper::Finish(); | 415 helper_->CommandBufferHelper::Finish(); |
| (...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2866 ClearCommands(); | 2867 ClearCommands(); |
| 2867 gl_->Enable(GL_BLEND); | 2868 gl_->Enable(GL_BLEND); |
| 2868 EXPECT_TRUE(NoCommandsWritten()); | 2869 EXPECT_TRUE(NoCommandsWritten()); |
| 2869 } | 2870 } |
| 2870 | 2871 |
| 2871 | 2872 |
| 2872 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 2873 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 2873 | 2874 |
| 2874 } // namespace gles2 | 2875 } // namespace gles2 |
| 2875 } // namespace gpu | 2876 } // namespace gpu |
| OLD | NEW |