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

Unified Diff: tools/skimage_main.cpp

Issue 171723007: add new copyTo version to SkBitmap, which takes SkColorType (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « tools/skdiff_utils.cpp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skimage_main.cpp
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index f5a2b3d738a6dce5709a8bbd8525849e5e364fcd..d34d57cd35017ef0f0f496690261969c60f94082 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -164,7 +164,7 @@ static bool write_bitmap(const char outDir[], const char src[],
return true;
}
- if (bm.config() == SkBitmap::kARGB_8888_Config) {
+ if (bm.colorType() == kPMColor_SkColorType) {
// First attempt at encoding failed, and the bitmap was already 8888. Making
// a copy is not going to help.
return false;
@@ -172,7 +172,7 @@ static bool write_bitmap(const char outDir[], const char src[],
// Encoding failed. Copy to 8888 and try again.
SkBitmap bm8888;
- if (!bm.copyTo(&bm8888, SkBitmap::kARGB_8888_Config)) {
+ if (!bm.copyTo(&bm8888, kPMColor_SkColorType)) {
return false;
}
return SkImageEncoder::EncodeFile(filename.c_str(), bm8888, SkImageEncoder::kPNG_Type, 100);
« no previous file with comments | « tools/skdiff_utils.cpp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698