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

Side by Side Diff: tools/skpdiff/SkDiffContext.cpp

Issue 233813004: Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/skimage_main.cpp ('k') | tools/skpdiff/SkPMetric.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (alphaMaskPending 115 if (alphaMaskPending
116 && SkImageDiffer::RESULT_CORRECT != diffData.fResult.result 116 && SkImageDiffer::RESULT_CORRECT != diffData.fResult.result
117 && !diffData.fResult.poiAlphaMask.empty() 117 && !diffData.fResult.poiAlphaMask.empty()
118 && !newRecord->fCommonName.isEmpty()) { 118 && !newRecord->fCommonName.isEmpty()) {
119 119
120 newRecord->fDifferencePath = SkOSPath::SkPathJoin(fDifferenceDir.c_s tr(), 120 newRecord->fDifferencePath = SkOSPath::SkPathJoin(fDifferenceDir.c_s tr(),
121 newRecord->fCommon Name.c_str()); 121 newRecord->fCommon Name.c_str());
122 122
123 // compute the image diff and output it 123 // compute the image diff and output it
124 SkBitmap copy; 124 SkBitmap copy;
125 diffData.fResult.poiAlphaMask.copyTo(&copy, kPMColor_SkColorType); 125 diffData.fResult.poiAlphaMask.copyTo(&copy, kN32_SkColorType);
126 SkImageEncoder::EncodeFile(newRecord->fDifferencePath.c_str(), copy, 126 SkImageEncoder::EncodeFile(newRecord->fDifferencePath.c_str(), copy,
127 SkImageEncoder::kPNG_Type, 100); 127 SkImageEncoder::kPNG_Type, 100);
128 128
129 // cleanup the existing bitmap to free up resources; 129 // cleanup the existing bitmap to free up resources;
130 diffData.fResult.poiAlphaMask.reset(); 130 diffData.fResult.poiAlphaMask.reset();
131 131
132 alphaMaskPending = false; 132 alphaMaskPending = false;
133 } 133 }
134 } 134 }
135 } 135 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 for (int i = 0; i < cntColumns; i++) { 351 for (int i = 0; i < cntColumns; i++) {
352 SkString str; 352 SkString str;
353 str.printf(", %f", values[i]); 353 str.printf(", %f", values[i]);
354 stream.writeText(str.c_str()); 354 stream.writeText(str.c_str());
355 } 355 }
356 stream.writeText("\n"); 356 stream.writeText("\n");
357 357
358 currentRecord = iter2.next(); 358 currentRecord = iter2.next();
359 } 359 }
360 } 360 }
OLDNEW
« no previous file with comments | « tools/skimage_main.cpp ('k') | tools/skpdiff/SkPMetric.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698