| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // Make sure the queries are finished otherwise we'll delete the | 268 // Make sure the queries are finished otherwise we'll delete the |
| 269 // shared memory (mapped_memory_) which will free the memory used | 269 // shared memory (mapped_memory_) which will free the memory used |
| 270 // by the queries. The GPU process when validating that memory is still | 270 // by the queries. The GPU process when validating that memory is still |
| 271 // shared will fail and abort (ie, it will stop running). | 271 // shared will fail and abort (ie, it will stop running). |
| 272 WaitForCmd(); | 272 WaitForCmd(); |
| 273 query_tracker_.reset(); | 273 query_tracker_.reset(); |
| 274 | 274 |
| 275 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) | 275 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) |
| 276 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); | 276 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); |
| 277 #endif | 277 #endif |
| 278 |
| 279 // Release any per-context data in share group. |
| 280 share_group_->FreeContext(this); |
| 281 |
| 278 buffer_tracker_.reset(); | 282 buffer_tracker_.reset(); |
| 279 | 283 |
| 280 // Make sure the commands make it the service. | 284 // Make sure the commands make it the service. |
| 281 WaitForCmd(); | 285 WaitForCmd(); |
| 282 } | 286 } |
| 283 | 287 |
| 284 GLES2CmdHelper* GLES2Implementation::helper() const { | 288 GLES2CmdHelper* GLES2Implementation::helper() const { |
| 285 return helper_; | 289 return helper_; |
| 286 } | 290 } |
| 287 | 291 |
| (...skipping 3609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3897 CheckGLError(); | 3901 CheckGLError(); |
| 3898 } | 3902 } |
| 3899 | 3903 |
| 3900 // Include the auto-generated part of this file. We split this because it means | 3904 // Include the auto-generated part of this file. We split this because it means |
| 3901 // we can easily edit the non-auto generated parts right here in this file | 3905 // we can easily edit the non-auto generated parts right here in this file |
| 3902 // instead of having to edit some template or the code generator. | 3906 // instead of having to edit some template or the code generator. |
| 3903 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 3907 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 3904 | 3908 |
| 3905 } // namespace gles2 | 3909 } // namespace gles2 |
| 3906 } // namespace gpu | 3910 } // namespace gpu |
| OLD | NEW |