| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
| 6 | 6 |
| 7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 helper_->CommandBufferHelper::Flush(); | 2482 helper_->CommandBufferHelper::Flush(); |
| 2483 mapped_textures_.erase(it); | 2483 mapped_textures_.erase(it); |
| 2484 } | 2484 } |
| 2485 | 2485 |
| 2486 void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height) { | 2486 void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height) { |
| 2487 GPU_CLIENT_LOG("[" << this << "] glResizeCHROMIUM(" | 2487 GPU_CLIENT_LOG("[" << this << "] glResizeCHROMIUM(" |
| 2488 << width << ", " << height << ")"); | 2488 << width << ", " << height << ")"); |
| 2489 helper_->ResizeCHROMIUM(width, height); | 2489 helper_->ResizeCHROMIUM(width, height); |
| 2490 } | 2490 } |
| 2491 | 2491 |
| 2492 void GLES2Implementation::SetSurfaceVisibleCHROMIUM(GLboolean visible) { |
| 2493 GPU_CLIENT_LOG("[" << this << "] glSetSurfaceVisibleCHROMIUM(" |
| 2494 << GLES2Util::GetStringBool(visible) << ")"); |
| 2495 helper_->SetSurfaceVisibleCHROMIUM(visible); |
| 2496 } |
| 2497 |
| 2492 const GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() { | 2498 const GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() { |
| 2493 GPU_CLIENT_LOG("[" << this << "] glGetRequestableExtensionsCHROMIUM()"); | 2499 GPU_CLIENT_LOG("[" << this << "] glGetRequestableExtensionsCHROMIUM()"); |
| 2494 TRACE_EVENT0("gpu", | 2500 TRACE_EVENT0("gpu", |
| 2495 "GLES2Implementation::GetRequestableExtensionsCHROMIUM()"); | 2501 "GLES2Implementation::GetRequestableExtensionsCHROMIUM()"); |
| 2496 const char* result = NULL; | 2502 const char* result = NULL; |
| 2497 // Clear the bucket so if the command fails nothing will be in it. | 2503 // Clear the bucket so if the command fails nothing will be in it. |
| 2498 helper_->SetBucketSize(kResultBucketId, 0); | 2504 helper_->SetBucketSize(kResultBucketId, 0); |
| 2499 helper_->GetRequestableExtensionsCHROMIUM(kResultBucketId); | 2505 helper_->GetRequestableExtensionsCHROMIUM(kResultBucketId); |
| 2500 std::string str; | 2506 std::string str; |
| 2501 if (GetBucketAsString(kResultBucketId, &str)) { | 2507 if (GetBucketAsString(kResultBucketId, &str)) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 if (static_cast<size_t>(bufsize) < result.size()) { | 2631 if (static_cast<size_t>(bufsize) < result.size()) { |
| 2626 SetGLError(GL_INVALID_OPERATION, | 2632 SetGLError(GL_INVALID_OPERATION, |
| 2627 "glProgramInfoCHROMIUM: bufsize is too small for result."); | 2633 "glProgramInfoCHROMIUM: bufsize is too small for result."); |
| 2628 return; | 2634 return; |
| 2629 } | 2635 } |
| 2630 memcpy(info, &result[0], result.size()); | 2636 memcpy(info, &result[0], result.size()); |
| 2631 } | 2637 } |
| 2632 | 2638 |
| 2633 } // namespace gles2 | 2639 } // namespace gles2 |
| 2634 } // namespace gpu | 2640 } // namespace gpu |
| OLD | NEW |