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

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

Issue 29103005: update skpdiff visualization (image magnification with alpha mask) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 10
11 #include "SkImageDiffer.h" 11 #include "SkImageDiffer.h"
12 #include "skpdiff_util.h" 12 #include "skpdiff_util.h"
13 13
14 14
15 SkImageDiffer::SkImageDiffer() 15 SkImageDiffer::SkImageDiffer()
16 : fIsGood(true) { 16 : fIsGood(true),
17 fPOIAlphaMask(false) {
17 18
18 } 19 }
19 20
20 SkImageDiffer::~SkImageDiffer() { 21 SkImageDiffer::~SkImageDiffer() {
21 22
22 } 23 }
23 24
24 int SkImageDiffer::queueDiffOfFile(const char baseline[], const char test[]) { 25 int SkImageDiffer::queueDiffOfFile(const char baseline[], const char test[]) {
25 SkBitmap baselineBitmap; 26 SkBitmap baselineBitmap;
26 SkBitmap testBitmap; 27 SkBitmap testBitmap;
27 if (!SkImageDecoder::DecodeFile(baseline, &baselineBitmap)) { 28 if (!SkImageDecoder::DecodeFile(baseline, &baselineBitmap)) {
28 SkDebugf("Failed to load bitmap \"%s\"\n", baseline); 29 SkDebugf("Failed to load bitmap \"%s\"\n", baseline);
29 return -1; 30 return -1;
30 } 31 }
31 if (!SkImageDecoder::DecodeFile(test, &testBitmap)) { 32 if (!SkImageDecoder::DecodeFile(test, &testBitmap)) {
32 SkDebugf("Failed to load bitmap \"%s\"\n", test); 33 SkDebugf("Failed to load bitmap \"%s\"\n", test);
33 return -1; 34 return -1;
34 } 35 }
35 return this->queueDiff(&baselineBitmap, &testBitmap); 36 return this->queueDiff(&baselineBitmap, &testBitmap);
36 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698