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 <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 "Initialize", | 218 "Initialize", |
219 "Service bind_generates_resource mismatch."); | 219 "Service bind_generates_resource mismatch."); |
220 return false; | 220 return false; |
221 } | 221 } |
222 | 222 |
223 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview). | 223 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview). |
224 // Don't register a dump provider in these cases. | 224 // Don't register a dump provider in these cases. |
225 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156 | 225 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156 |
226 if (base::ThreadTaskRunnerHandle::IsSet()) { | 226 if (base::ThreadTaskRunnerHandle::IsSet()) { |
227 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 227 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
228 this, base::ThreadTaskRunnerHandle::Get()); | 228 this, "GLES2Implementation", base::ThreadTaskRunnerHandle::Get()); |
229 } | 229 } |
230 | 230 |
231 return true; | 231 return true; |
232 } | 232 } |
233 | 233 |
234 GLES2Implementation::~GLES2Implementation() { | 234 GLES2Implementation::~GLES2Implementation() { |
235 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( | 235 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
236 this); | 236 this); |
237 | 237 |
238 // Make sure the queries are finished otherwise we'll delete the | 238 // Make sure the queries are finished otherwise we'll delete the |
(...skipping 6051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6290 CheckGLError(); | 6290 CheckGLError(); |
6291 } | 6291 } |
6292 | 6292 |
6293 // Include the auto-generated part of this file. We split this because it means | 6293 // Include the auto-generated part of this file. We split this because it means |
6294 // we can easily edit the non-auto generated parts right here in this file | 6294 // we can easily edit the non-auto generated parts right here in this file |
6295 // instead of having to edit some template or the code generator. | 6295 // instead of having to edit some template or the code generator. |
6296 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6296 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
6297 | 6297 |
6298 } // namespace gles2 | 6298 } // namespace gles2 |
6299 } // namespace gpu | 6299 } // namespace gpu |
OLD | NEW |