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

Unified Diff: cc/tiles/software_image_decode_cache.cc

Issue 2904743002: cc: Add UMA for tracking decode duration for out of raster decodes. (Closed)
Patch Set: move Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_cache.cc
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index cc1f54fbda0c091f355f0c3a75c338d715879b3e..1b2e5fcd330b1c8ea992f4486b65461f7ad39d85 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -113,7 +113,8 @@ class ImageDecodeTaskImpl : public TileTask {
tracing_info_.prepare_tiles_id);
devtools_instrumentation::ScopedImageDecodeTask image_decode_task(
image_.image().get(),
- devtools_instrumentation::ScopedImageDecodeTask::SOFTWARE);
+ devtools_instrumentation::ScopedImageDecodeTask::kSoftware,
+ ImageDecodeCache::ToScopedTaskType(tracing_info_.task_type));
cache_->DecodeImage(image_key_, image_, task_type_);
}
@@ -227,6 +228,7 @@ bool SoftwareImageDecodeCache::GetTaskForImageAndRef(
const DrawImage& image,
const TracingInfo& tracing_info,
scoped_refptr<TileTask>* task) {
+ DCHECK_EQ(tracing_info.task_type, TaskType::kInRaster);
return GetTaskForImageAndRefInternal(
image, tracing_info, DecodeTaskType::USE_IN_RASTER_TASKS, task);
}
@@ -235,7 +237,8 @@ bool SoftwareImageDecodeCache::GetOutOfRasterDecodeTaskForImageAndRef(
const DrawImage& image,
scoped_refptr<TileTask>* task) {
return GetTaskForImageAndRefInternal(
- image, TracingInfo(), DecodeTaskType::USE_OUT_OF_RASTER_TASKS, task);
+ image, TracingInfo(0, TilePriority::NOW, TaskType::kOutOfRaster),
+ DecodeTaskType::USE_OUT_OF_RASTER_TASKS, task);
}
bool SoftwareImageDecodeCache::GetTaskForImageAndRefInternal(
« no previous file with comments | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698