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

Unified Diff: cc/tiles/gpu_image_decode_controller.cc

Issue 1933723002: cc: Unittest for checking already failed image decode task. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@land_task_manager
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 | « cc/tiles/gpu_image_decode_controller.h ('k') | cc/tiles/gpu_image_decode_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/gpu_image_decode_controller.cc
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc
index 17f66d543d3f43d46bc97d7f06a6e3e2a7e9eb7e..b7dbd55f116d1900fca133a64d710abf086376a3 100644
--- a/cc/tiles/gpu_image_decode_controller.cc
+++ b/cc/tiles/gpu_image_decode_controller.cc
@@ -821,4 +821,13 @@ SkImageInfo GpuImageDecodeController::CreateImageInfoForDrawImage(
ResourceFormatToClosestSkColorType(format_), kPremul_SkAlphaType);
}
+void GpuImageDecodeController::SetImageDecodingFailedForTesting(
+ const DrawImage& image) {
+ base::AutoLock lock(lock_);
+ auto found = image_data_.Peek(image.image()->uniqueID());
+ DCHECK(found != image_data_.end());
+ ImageData* image_data = found->second.get();
+ image_data->decode.decode_failure = true;
+}
+
} // namespace cc
« no previous file with comments | « cc/tiles/gpu_image_decode_controller.h ('k') | cc/tiles/gpu_image_decode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698