| 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 share_group_->SetGLES2ImplementationForDestruction(this); | 272 share_group_->SetGLES2ImplementationForDestruction(this); |
| 273 share_group_ = NULL; | 273 share_group_ = NULL; |
| 274 // Make sure the commands make it the service. | 274 // Make sure the commands make it the service. |
| 275 WaitForCmd(); | 275 WaitForCmd(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 GLES2CmdHelper* GLES2Implementation::helper() const { | 278 GLES2CmdHelper* GLES2Implementation::helper() const { |
| 279 return helper_; | 279 return helper_; |
| 280 } | 280 } |
| 281 | 281 |
| 282 GLuint GLES2Implementation::MakeTextureId() { | |
| 283 GLuint id; | |
| 284 GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, 1, &id); | |
| 285 return id; | |
| 286 } | |
| 287 | |
| 288 void GLES2Implementation::FreeTextureId(GLuint id) { | |
| 289 GetIdHandler(id_namespaces::kTextures)->FreeIds( | |
| 290 this, 1, &id, &GLES2Implementation::DeleteTexturesStub); | |
| 291 } | |
| 292 | |
| 293 IdHandlerInterface* GLES2Implementation::GetIdHandler(int namespace_id) const { | 282 IdHandlerInterface* GLES2Implementation::GetIdHandler(int namespace_id) const { |
| 294 return share_group_->GetIdHandler(namespace_id); | 283 return share_group_->GetIdHandler(namespace_id); |
| 295 } | 284 } |
| 296 | 285 |
| 297 void* GLES2Implementation::GetResultBuffer() { | 286 void* GLES2Implementation::GetResultBuffer() { |
| 298 return transfer_buffer_->GetResultBuffer(); | 287 return transfer_buffer_->GetResultBuffer(); |
| 299 } | 288 } |
| 300 | 289 |
| 301 int32 GLES2Implementation::GetResultShmId() { | 290 int32 GLES2Implementation::GetResultShmId() { |
| 302 return transfer_buffer_->GetShmId(); | 291 return transfer_buffer_->GetShmId(); |
| (...skipping 3556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3859 CheckGLError(); | 3848 CheckGLError(); |
| 3860 } | 3849 } |
| 3861 | 3850 |
| 3862 // Include the auto-generated part of this file. We split this because it means | 3851 // Include the auto-generated part of this file. We split this because it means |
| 3863 // we can easily edit the non-auto generated parts right here in this file | 3852 // we can easily edit the non-auto generated parts right here in this file |
| 3864 // instead of having to edit some template or the code generator. | 3853 // instead of having to edit some template or the code generator. |
| 3865 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 3854 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 3866 | 3855 |
| 3867 } // namespace gles2 | 3856 } // namespace gles2 |
| 3868 } // namespace gpu | 3857 } // namespace gpu |
| OLD | NEW |