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

Unified Diff: dm/DMSrcSink.cpp

Issue 1405273004: Make DMSrcSink fail fatally when decodeRegion() fails for BRDSrcs (Closed) Base URL: https://skia.googlesource.com/skia.git@brd-new-apis
Patch Set: Created 5 years, 2 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 | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index b14c57367908229782086112ae76c57f041db84f..1a845507d6c4258d85026f0ff5ce47450d9aee9e 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -128,10 +128,7 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
SkBitmap bitmap;
if (!brd->decodeRegion(&bitmap, nullptr, SkIRect::MakeXYWH(0, 0, width, height),
fSampleSize, colorType, false)) {
- // FIXME: Make this a fatal error. We need to disable webps for kCanvas_Strategy
- // because we have not implemented kCanvas_Strategy for webp. We may also need to
- // deal with color conversion errors for kOriginal_Strategy.
- return Error::Nonfatal("Cannot decode region.\n");
+ return "Cannot decode region.\n";
}
if (colorType != bitmap.colorType()) {
return Error::Nonfatal("Cannot convert to color type.\n");
@@ -187,11 +184,7 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
SkBitmap bitmap;
if (!brd->decodeRegion(&bitmap, nullptr, SkIRect::MakeXYWH(decodeLeft,
decodeTop, decodeWidth, decodeHeight), fSampleSize, colorType, false)) {
- // FIXME: Make this a fatal error. We need to disable webps for
- // kCanvas_Strategy because we have not implemented kCanvas_Strategy for
- // webp. We may also need to deal with color conversion errors for
- // kOriginal_Strategy.
- return Error::Nonfatal("Cannot not decode region.\n");
+ return "Cannot not decode region.\n";
}
if (colorType != bitmap.colorType()) {
return Error::Nonfatal("Cannot convert to color type.\n");
« no previous file with comments | « no previous file | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698