| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 gl_.reset(new GLES2Implementation( | 401 gl_.reset(new GLES2Implementation( |
| 402 helper_.get(), | 402 helper_.get(), |
| 403 NULL, | 403 NULL, |
| 404 transfer_buffer_.get(), | 404 transfer_buffer_.get(), |
| 405 bind_generates_resource, | 405 bind_generates_resource, |
| 406 gpu_control_.get())); | 406 gpu_control_.get())); |
| 407 ASSERT_TRUE(gl_->Initialize( | 407 ASSERT_TRUE(gl_->Initialize( |
| 408 kTransferBufferSize, | 408 kTransferBufferSize, |
| 409 kTransferBufferSize, | 409 kTransferBufferSize, |
| 410 kTransferBufferSize)); | 410 kTransferBufferSize, |
| 411 GLES2Implementation::kNoLimit)); |
| 411 } | 412 } |
| 412 | 413 |
| 413 EXPECT_CALL(*command_buffer(), OnFlush()) | 414 EXPECT_CALL(*command_buffer(), OnFlush()) |
| 414 .Times(1) | 415 .Times(1) |
| 415 .RetiresOnSaturation(); | 416 .RetiresOnSaturation(); |
| 416 helper_->CommandBufferHelper::Finish(); | 417 helper_->CommandBufferHelper::Finish(); |
| 417 ::testing::Mock::VerifyAndClearExpectations(gl_.get()); | 418 ::testing::Mock::VerifyAndClearExpectations(gl_.get()); |
| 418 | 419 |
| 419 Buffer ring_buffer = helper_->get_ring_buffer(); | 420 Buffer ring_buffer = helper_->get_ring_buffer(); |
| 420 commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + | 421 commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + |
| (...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2871 ClearCommands(); | 2872 ClearCommands(); |
| 2872 gl_->Enable(GL_BLEND); | 2873 gl_->Enable(GL_BLEND); |
| 2873 EXPECT_TRUE(NoCommandsWritten()); | 2874 EXPECT_TRUE(NoCommandsWritten()); |
| 2874 } | 2875 } |
| 2875 | 2876 |
| 2876 | 2877 |
| 2877 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 2878 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 2878 | 2879 |
| 2879 } // namespace gles2 | 2880 } // namespace gles2 |
| 2880 } // namespace gpu | 2881 } // namespace gpu |
| OLD | NEW |