| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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           bind_generates_resource, | 403           bind_generates_resource, | 
| 404           NULL)); | 404           NULL)); | 
| 405       ASSERT_TRUE(gl_->Initialize( | 405       ASSERT_TRUE(gl_->Initialize( | 
| 406           kTransferBufferSize, | 406           kTransferBufferSize, | 
| 407           kTransferBufferSize, | 407           kTransferBufferSize, | 
| 408           kTransferBufferSize)); | 408           kTransferBufferSize, | 
|  | 409           GLES2Implementation::kNoLimit)); | 
| 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(); | 
| 415     ::testing::Mock::VerifyAndClearExpectations(gl_.get()); | 416     ::testing::Mock::VerifyAndClearExpectations(gl_.get()); | 
| 416 | 417 | 
| 417     Buffer ring_buffer = helper_->get_ring_buffer(); | 418     Buffer ring_buffer = helper_->get_ring_buffer(); | 
| 418     commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + | 419     commands_ = static_cast<CommandBufferEntry*>(ring_buffer.ptr) + | 
| (...skipping 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2867   ClearCommands(); | 2868   ClearCommands(); | 
| 2868   gl_->Enable(GL_BLEND); | 2869   gl_->Enable(GL_BLEND); | 
| 2869   EXPECT_TRUE(NoCommandsWritten()); | 2870   EXPECT_TRUE(NoCommandsWritten()); | 
| 2870 } | 2871 } | 
| 2871 | 2872 | 
| 2872 | 2873 | 
| 2873 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 2874 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 
| 2874 | 2875 | 
| 2875 }  // namespace gles2 | 2876 }  // namespace gles2 | 
| 2876 }  // namespace gpu | 2877 }  // namespace gpu | 
| OLD | NEW | 
|---|