Commit e1e267ea authored by Shuangshuang Zhou's avatar Shuangshuang Zhou Committed by Commit Bot

Change trace category for image data judgement in GpuImageDecodeCache

This modification changes two trace operations for
"GetDecodedImageForDraw()" and "DrawWithImageFinished()"
from "cc"to "cc.debug" category. While running Canvas 2D
workloads with quite a lot canvas elements to be drawn,
excessive trace operations introduce expensive performance
overheads, especially for those hardware platforms with
integrated graphics cards or old graphics drivers.

Bug: 1051385

Change-Id: I7cb1b7a3afcb207ac6b7791f21dc621a20e42864
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2059771Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745468}
parent 7b804188
......@@ -1186,7 +1186,8 @@ bool GpuImageDecodeCache::UseCacheForDrawImage(
DecodedDrawImage GpuImageDecodeCache::GetDecodedImageForDraw(
const DrawImage& draw_image) {
TRACE_EVENT0("cc", "GpuImageDecodeCache::GetDecodedImageForDraw");
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
"GpuImageDecodeCache::GetDecodedImageForDraw");
// We are being called during raster. The context lock must already be
// acquired by the caller.
......@@ -1253,7 +1254,8 @@ DecodedDrawImage GpuImageDecodeCache::GetDecodedImageForDraw(
void GpuImageDecodeCache::DrawWithImageFinished(
const DrawImage& draw_image,
const DecodedDrawImage& decoded_draw_image) {
TRACE_EVENT0("cc", "GpuImageDecodeCache::DrawWithImageFinished");
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
"GpuImageDecodeCache::DrawWithImageFinished");
// Release decoded_draw_image to ensure the referenced SkImage can be
// cleaned up below.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment