| 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 "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) | 197 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) |
| 198 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); | 198 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); |
| 199 #endif | 199 #endif |
| 200 buffer_tracker_.reset(); | 200 buffer_tracker_.reset(); |
| 201 | 201 |
| 202 // The share group needs to be able to use a command buffer to talk | 202 // The share group needs to be able to use a command buffer to talk |
| 203 // to service if it's destroyed so set one for it then release the reference. | 203 // to service if it's destroyed so set one for it then release the reference. |
| 204 // If it's destroyed it will use this GLES2Implemenation. | 204 // If it's destroyed it will use this GLES2Implemenation. |
| 205 share_group_->SetGLES2ImplementationForDestruction(this); | 205 share_group_->SetGLES2ImplementationForDestruction(this); |
| 206 share_group_ = NULL; | 206 share_group_ = NULL; |
| 207 // Finally, finish commands and free shared memory buffers. | 207 // Make sure the commands make it the service. |
| 208 FreeEverything(); | 208 Finish(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 GLES2CmdHelper* GLES2Implementation::helper() const { | 211 GLES2CmdHelper* GLES2Implementation::helper() const { |
| 212 return helper_; | 212 return helper_; |
| 213 } | 213 } |
| 214 | 214 |
| 215 GLuint GLES2Implementation::MakeTextureId() { | 215 GLuint GLES2Implementation::MakeTextureId() { |
| 216 GLuint id; | 216 GLuint id; |
| 217 GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, 1, &id); | 217 GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, 1, &id); |
| 218 return id; | 218 return id; |
| (...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3419 return; | 3419 return; |
| 3420 } | 3420 } |
| 3421 | 3421 |
| 3422 // Include the auto-generated part of this file. We split this because it means | 3422 // Include the auto-generated part of this file. We split this because it means |
| 3423 // we can easily edit the non-auto generated parts right here in this file | 3423 // we can easily edit the non-auto generated parts right here in this file |
| 3424 // instead of having to edit some template or the code generator. | 3424 // instead of having to edit some template or the code generator. |
| 3425 #include "../client/gles2_implementation_impl_autogen.h" | 3425 #include "../client/gles2_implementation_impl_autogen.h" |
| 3426 | 3426 |
| 3427 } // namespace gles2 | 3427 } // namespace gles2 |
| 3428 } // namespace gpu | 3428 } // namespace gpu |
| OLD | NEW |