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 |