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

Unified Diff: tools/skpdiff/SkPMetric.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/skpdiff/SkDiffContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/SkPMetric.cpp
diff --git a/tools/skpdiff/SkPMetric.cpp b/tools/skpdiff/SkPMetric.cpp
index 22337d854dea8ce471bbb8d2c4844a19b4c30dfc..ed807636b63da0694164c6d1e82e9bff93e9842f 100644
--- a/tools/skpdiff/SkPMetric.cpp
+++ b/tools/skpdiff/SkPMetric.cpp
@@ -125,8 +125,8 @@ static void adobergb_to_cielab(float r, float g, float b, LAB* lab) {
/// Converts a 8888 bitmap to LAB color space and puts it into the output
static bool bitmap_to_cielab(const SkBitmap* bitmap, ImageLAB* outImageLAB) {
SkBitmap bm8888;
- if (bitmap->config() != SkBitmap::kARGB_8888_Config) {
- if (!bitmap->copyTo(&bm8888, SkBitmap::kARGB_8888_Config)) {
+ if (bitmap->colorType() != kPMColor_SkColorType) {
+ if (!bitmap->copyTo(&bm8888, kPMColor_SkColorType)) {
return false;
}
bitmap = &bm8888;
« no previous file with comments | « tools/skpdiff/SkDiffContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698