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

Side by Side Diff: cc/output/output_surface.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
« no previous file with comments | « base/trace_event/trace_log.cc ('k') | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 client_ = NULL; 223 client_ = NULL;
224 224
225 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview). 225 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
226 // Don't register a dump provider in these cases. 226 // Don't register a dump provider in these cases.
227 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156 227 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156
228 if (client_ && base::ThreadTaskRunnerHandle::IsSet()) { 228 if (client_ && base::ThreadTaskRunnerHandle::IsSet()) {
229 // Now that we are on the context thread, register a dump provider with this 229 // Now that we are on the context thread, register a dump provider with this
230 // thread's task runner. This will overwrite any previous dump provider 230 // thread's task runner. This will overwrite any previous dump provider
231 // registered. 231 // registered.
232 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 232 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
233 this, base::ThreadTaskRunnerHandle::Get()); 233 this, "OutputSurface", base::ThreadTaskRunnerHandle::Get());
234 } 234 }
235 235
236 return success; 236 return success;
237 } 237 }
238 238
239 void OutputSurface::DetachFromClient() { 239 void OutputSurface::DetachFromClient() {
240 DetachFromClientInternal(); 240 DetachFromClientInternal();
241 } 241 }
242 242
243 void OutputSurface::EnsureBackbuffer() { 243 void OutputSurface::EnsureBackbuffer() {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (context_provider_.get()) { 363 if (context_provider_.get()) {
364 context_provider_->SetLostContextCallback( 364 context_provider_->SetLostContextCallback(
365 ContextProvider::LostContextCallback()); 365 ContextProvider::LostContextCallback());
366 } 366 }
367 context_provider_ = nullptr; 367 context_provider_ = nullptr;
368 client_ = nullptr; 368 client_ = nullptr;
369 weak_ptr_factory_.InvalidateWeakPtrs(); 369 weak_ptr_factory_.InvalidateWeakPtrs();
370 } 370 }
371 371
372 } // namespace cc 372 } // namespace cc
OLDNEW
« no previous file with comments | « base/trace_event/trace_log.cc ('k') | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698