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

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: .. 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
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..73cd0150f6790c742c2ac6d7721604e705a33174 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::SOFTWARE,
+ ImageDecodeCache::ToScopedDecodeTaskType(tracing_info_.type));
cache_->DecodeImage(image_key_, image_, task_type_);
}
@@ -227,15 +228,19 @@ bool SoftwareImageDecodeCache::GetTaskForImageAndRef(
const DrawImage& image,
const TracingInfo& tracing_info,
scoped_refptr<TileTask>* task) {
+ DCHECK_EQ(tracing_info.type, ImageDecodeType::kInRaster);
return GetTaskForImageAndRefInternal(
image, tracing_info, DecodeTaskType::USE_IN_RASTER_TASKS, task);
}
bool SoftwareImageDecodeCache::GetOutOfRasterDecodeTaskForImageAndRef(
const DrawImage& image,
+ ImageDecodeType decode_type,
scoped_refptr<TileTask>* task) {
+ DCHECK_NE(decode_type, ImageDecodeType::kInRaster);
return GetTaskForImageAndRefInternal(
- image, TracingInfo(), DecodeTaskType::USE_OUT_OF_RASTER_TASKS, task);
+ image, TracingInfo(0, TilePriority::NOW, decode_type),
+ DecodeTaskType::USE_OUT_OF_RASTER_TASKS, task);
}
bool SoftwareImageDecodeCache::GetTaskForImageAndRefInternal(

Powered by Google App Engine
This is Rietveld 408576698