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 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 .RetiresOnSaturation(); | 1329 .RetiresOnSaturation(); |
1330 } | 1330 } |
1331 } | 1331 } |
1332 | 1332 |
1333 void GLES2DecoderTestBase::AddExpectationsForSimulatedAttrib0( | 1333 void GLES2DecoderTestBase::AddExpectationsForSimulatedAttrib0( |
1334 GLsizei num_vertices, GLuint buffer_id) { | 1334 GLsizei num_vertices, GLuint buffer_id) { |
1335 AddExpectationsForSimulatedAttrib0WithError( | 1335 AddExpectationsForSimulatedAttrib0WithError( |
1336 num_vertices, buffer_id, GL_NO_ERROR); | 1336 num_vertices, buffer_id, GL_NO_ERROR); |
1337 } | 1337 } |
1338 | 1338 |
| 1339 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine:: |
| 1340 MockCommandBufferEngine() { |
| 1341 data_.reset(new int8[kSharedBufferSize]); |
| 1342 ClearSharedMemory(); |
| 1343 valid_buffer_.ptr = data_.get(); |
| 1344 valid_buffer_.size = kSharedBufferSize; |
| 1345 } |
| 1346 |
| 1347 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine:: |
| 1348 ~MockCommandBufferEngine() {} |
| 1349 |
| 1350 Buffer |
| 1351 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetSharedMemoryBuffer( |
| 1352 int32 shm_id) { |
| 1353 return shm_id == kSharedMemoryId ? valid_buffer_ : invalid_buffer_; |
| 1354 } |
| 1355 |
| 1356 void GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::set_token( |
| 1357 int32 token) { |
| 1358 DCHECK(false); |
| 1359 } |
| 1360 |
| 1361 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetBuffer( |
| 1362 int32 /* transfer_buffer_id */) { |
| 1363 DCHECK(false); |
| 1364 return false; |
| 1365 } |
| 1366 |
| 1367 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetOffset( |
| 1368 int32 offset) { |
| 1369 DCHECK(false); |
| 1370 return false; |
| 1371 } |
| 1372 |
| 1373 int32 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetGetOffset() { |
| 1374 DCHECK(false); |
| 1375 return 0; |
| 1376 } |
| 1377 |
1339 void GLES2DecoderWithShaderTestBase::SetUp() { | 1378 void GLES2DecoderWithShaderTestBase::SetUp() { |
1340 GLES2DecoderTestBase::SetUp(); | 1379 GLES2DecoderTestBase::SetUp(); |
1341 SetupDefaultProgram(); | 1380 SetupDefaultProgram(); |
1342 } | 1381 } |
1343 | 1382 |
1344 } // namespace gles2 | 1383 } // namespace gles2 |
1345 } // namespace gpu | 1384 } // namespace gpu |
OLD | NEW |