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

Side by Side Diff: cc/raster/one_copy_tile_task_worker_pool.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 | « cc/output/output_surface.cc ('k') | cc/resources/resource_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/raster/one_copy_tile_task_worker_pool.h" 5 #include "cc/raster/one_copy_tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 max_staging_buffer_usage_in_bytes_(max_staging_buffer_usage_in_bytes), 209 max_staging_buffer_usage_in_bytes_(max_staging_buffer_usage_in_bytes),
210 use_rgba_4444_texture_format_(use_rgba_4444_texture_format), 210 use_rgba_4444_texture_format_(use_rgba_4444_texture_format),
211 staging_buffer_usage_in_bytes_(0), 211 staging_buffer_usage_in_bytes_(0),
212 free_staging_buffer_usage_in_bytes_(0), 212 free_staging_buffer_usage_in_bytes_(0),
213 staging_buffer_expiration_delay_( 213 staging_buffer_expiration_delay_(
214 base::TimeDelta::FromMilliseconds(kStagingBufferExpirationDelayMs)), 214 base::TimeDelta::FromMilliseconds(kStagingBufferExpirationDelayMs)),
215 reduce_memory_usage_pending_(false), 215 reduce_memory_usage_pending_(false),
216 weak_ptr_factory_(this), 216 weak_ptr_factory_(this),
217 task_set_finished_weak_ptr_factory_(this) { 217 task_set_finished_weak_ptr_factory_(this) {
218 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 218 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
219 this, base::ThreadTaskRunnerHandle::Get()); 219 this, "OneCopyTileTaskWorkerPool", base::ThreadTaskRunnerHandle::Get());
220 reduce_memory_usage_callback_ = 220 reduce_memory_usage_callback_ =
221 base::Bind(&OneCopyTileTaskWorkerPool::ReduceMemoryUsage, 221 base::Bind(&OneCopyTileTaskWorkerPool::ReduceMemoryUsage,
222 weak_ptr_factory_.GetWeakPtr()); 222 weak_ptr_factory_.GetWeakPtr());
223 } 223 }
224 224
225 OneCopyTileTaskWorkerPool::~OneCopyTileTaskWorkerPool() { 225 OneCopyTileTaskWorkerPool::~OneCopyTileTaskWorkerPool() {
226 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( 226 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
227 this); 227 this);
228 } 228 }
229 229
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 816
817 staging_state->SetInteger("staging_buffer_count", 817 staging_state->SetInteger("staging_buffer_count",
818 static_cast<int>(buffers_.size())); 818 static_cast<int>(buffers_.size()));
819 staging_state->SetInteger("busy_count", 819 staging_state->SetInteger("busy_count",
820 static_cast<int>(busy_buffers_.size())); 820 static_cast<int>(busy_buffers_.size()));
821 staging_state->SetInteger("free_count", 821 staging_state->SetInteger("free_count",
822 static_cast<int>(free_buffers_.size())); 822 static_cast<int>(free_buffers_.size()));
823 } 823 }
824 824
825 } // namespace cc 825 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698