OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // A class to emluate GLES2 over command buffers. | 5 // A class to emluate GLES2 over command buffers. |
6 | 6 |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 #include "../common/gles2_cmd_utils.h" | 8 #include "../common/gles2_cmd_utils.h" |
9 #include "../common/id_allocator.h" | 9 #include "../common/id_allocator.h" |
10 | 10 |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 } | 1441 } |
1442 typedef GetVertexAttribiv::Result Result; | 1442 typedef GetVertexAttribiv::Result Result; |
1443 Result* result = GetResultAs<Result*>(); | 1443 Result* result = GetResultAs<Result*>(); |
1444 result->SetNumResults(0); | 1444 result->SetNumResults(0); |
1445 helper_->GetVertexAttribiv( | 1445 helper_->GetVertexAttribiv( |
1446 index, pname, result_shm_id(), result_shm_offset()); | 1446 index, pname, result_shm_id(), result_shm_offset()); |
1447 WaitForCmd(); | 1447 WaitForCmd(); |
1448 result->CopyResult(params); | 1448 result->CopyResult(params); |
1449 } | 1449 } |
1450 | 1450 |
| 1451 GLboolean GLES2Implementation::CommandBufferEnable(const char* feature) { |
| 1452 typedef CommandBufferEnable::Result Result; |
| 1453 Result* result = GetResultAs<Result*>(); |
| 1454 *result = 0; |
| 1455 SetBucketAsCString(kResultBucketId, feature); |
| 1456 helper_->CommandBufferEnable( |
| 1457 kResultBucketId, result_shm_id(), result_shm_offset()); |
| 1458 WaitForCmd(); |
| 1459 helper_->SetBucketSize(kResultBucketId, 0); |
| 1460 return *result; |
| 1461 } |
| 1462 |
1451 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_BUFFERS) | 1463 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_BUFFERS) |
1452 | 1464 |
1453 } // namespace gles2 | 1465 } // namespace gles2 |
1454 } // namespace gpu | 1466 } // namespace gpu |
OLD | NEW |