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

Unified Diff: cc/tiles/software_image_decode_controller.cc

Issue 1869573002: cc: Images: Add more information to image decode controller DCHECKs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_controller.cc
diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc
index 93d017f186fa0dd34000ca815ef3f7ff637cdc17..b6e84de7b1751698cbfd0fc20a2b1d136ab3f0d2 100644
--- a/cc/tiles/software_image_decode_controller.cc
+++ b/cc/tiles/software_image_decode_controller.cc
@@ -267,7 +267,7 @@ void SoftwareImageDecodeController::UnrefImage(const DrawImage& image) {
// it yet (or failed to decode it).
// 2b. Unlock the image but keep it in list.
const ImageKey& key = ImageKey::FromDrawImage(image);
- DCHECK(CanHandleImage(key));
+ DCHECK(CanHandleImage(key)) << key.ToString();
TRACE_EVENT1("disabled-by-default-cc.debug",
"SoftwareImageDecodeController::UnrefImage", "key",
key.ToString());
@@ -427,7 +427,8 @@ SoftwareImageDecodeController::DecodeImageInternal(
ImageKey original_size_key =
ImageKey::FromDrawImage(original_size_draw_image);
// Sanity checks.
- DCHECK(original_size_key.can_use_original_decode());
+ DCHECK(original_size_key.can_use_original_decode())
+ << original_size_key.ToString();
DCHECK(full_image_rect.size() == original_size_key.target_size());
auto decoded_draw_image = GetDecodedImageForDrawInternal(
@@ -439,11 +440,11 @@ SoftwareImageDecodeController::DecodeImageInternal(
SkPixmap decoded_pixmap;
bool result = decoded_draw_image.image()->peekPixels(&decoded_pixmap);
- DCHECK(result);
+ DCHECK(result) << key.ToString();
if (key.src_rect() != full_image_rect) {
result = decoded_pixmap.extractSubset(&decoded_pixmap,
gfx::RectToSkIRect(key.src_rect()));
- DCHECK(result);
+ DCHECK(result) << key.ToString();
}
// Now we have a decoded_pixmap which represents the src_rect at the
@@ -471,7 +472,7 @@ SoftwareImageDecodeController::DecodeImageInternal(
"SoftwareImageDecodeController::DecodeImageInternal - scale pixels");
bool result =
decoded_pixmap.scalePixels(scaled_pixmap, key.filter_quality());
- DCHECK(result);
+ DCHECK(result) << key.ToString();
}
// Release the original sized decode. Any other intermediate result to release
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698