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

Unified Diff: dm/DMSrcSink.cpp

Issue 1395383002: SkBitmapRegionDecoder clean-up (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments 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/SkBitmapRegionCanvas.h » ('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 88371a8e28fdf68e1e0e5e041588a3a475e4adc1..c7b389d36da4338ed55d38613966045c33f05f81 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -114,6 +114,10 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
return Error::Nonfatal(SkStringPrintf("Could not create brd for %s.", fPath.c_str()));
}
+ if (!brd->conversionSupported(colorType)) {
+ return Error::Nonfatal("Cannot convert to color type.\n");
+ }
+
const uint32_t width = brd->width();
const uint32_t height = brd->height();
// Visually inspecting very small output images is not necessary.
« no previous file with comments | « no previous file | tools/SkBitmapRegionCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698