| 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/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 capabilities.timer_queries = timer_queries; | 480 capabilities.timer_queries = timer_queries; |
| 481 capabilities.major_version = major_version; | 481 capabilities.major_version = major_version; |
| 482 capabilities.minor_version = minor_version; | 482 capabilities.minor_version = minor_version; |
| 483 EXPECT_CALL(*gpu_control_, GetCapabilities()) | 483 EXPECT_CALL(*gpu_control_, GetCapabilities()) |
| 484 .WillOnce(Return(capabilities)); | 484 .WillOnce(Return(capabilities)); |
| 485 | 485 |
| 486 { | 486 { |
| 487 InSequence sequence; | 487 InSequence sequence; |
| 488 | 488 |
| 489 const bool support_client_side_arrays = true; | 489 const bool support_client_side_arrays = true; |
| 490 gl_.reset(new GLES2Implementation(helper_.get(), | 490 gl_.reset(new GLES2Implementation( |
| 491 share_group, | 491 helper_.get(), share_group, transfer_buffer_.get(), |
| 492 transfer_buffer_.get(), | 492 bind_generates_resource_client, lose_context_when_out_of_memory, |
| 493 bind_generates_resource_client, | 493 support_client_side_arrays, gpu_control_.get(), nullptr)); |
| 494 lose_context_when_out_of_memory, | |
| 495 support_client_side_arrays, | |
| 496 gpu_control_.get())); | |
| 497 } | 494 } |
| 498 | 495 |
| 499 // The client should be set to something non-null. | 496 // The client should be set to something non-null. |
| 500 EXPECT_CALL(*gpu_control_, SetGpuControlClient(gl_.get())).Times(1); | 497 EXPECT_CALL(*gpu_control_, SetGpuControlClient(gl_.get())).Times(1); |
| 501 | 498 |
| 502 if (!gl_->Initialize(kTransferBufferSize, kTransferBufferSize, | 499 if (!gl_->Initialize(kTransferBufferSize, kTransferBufferSize, |
| 503 kTransferBufferSize, SharedMemoryLimits::kNoLimit)) | 500 kTransferBufferSize, SharedMemoryLimits::kNoLimit)) |
| 504 return false; | 501 return false; |
| 505 | 502 |
| 506 helper_->CommandBufferHelper::Finish(); | 503 helper_->CommandBufferHelper::Finish(); |
| (...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4649 gl_->Flush(); | 4646 gl_->Flush(); |
| 4650 Mock::VerifyAndClearExpectations(command_buffer()); | 4647 Mock::VerifyAndClearExpectations(command_buffer()); |
| 4651 } | 4648 } |
| 4652 } | 4649 } |
| 4653 | 4650 |
| 4654 #include "base/macros.h" | 4651 #include "base/macros.h" |
| 4655 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 4652 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 4656 | 4653 |
| 4657 } // namespace gles2 | 4654 } // namespace gles2 |
| 4658 } // namespace gpu | 4655 } // namespace gpu |
| OLD | NEW |