Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1406213005: [tracing] Add names to memory-infra dumpers for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory-infra-runtime
Patch Set: Rebase + fix android Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/mapped_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698