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

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

Issue 16284007: add skpdiff tool to compare bitmaps (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add commmand line opts Created 7 years, 6 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
« no previous file with comments | « experimental/skpdiff/SkImageDiffer.h ('k') | experimental/skpdiff/diff_pixels.cl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include <cstring>
9
10 #include "SkBitmap.h"
11 #include "SkImageDecoder.h"
12
13 #include "SkImageDiffer.h"
14
15 #include "skpdiff_util.h"
16
17
18 SkImageDiffer::SkImageDiffer()
19 : fIsGood(true) {
20
21 }
22
23 SkImageDiffer::~SkImageDiffer() {
24
25 }
26
27 int SkImageDiffer::queueDiffOfFile(const char baseline[], const char test[]) {
28 SkBitmap baselineBitmap;
29 SkBitmap testBitmap;
30 if (!SkImageDecoder::DecodeFile(baseline, &baselineBitmap)) {
31 SkDebugf("Failed to load bitmap \"%s\"\n", baseline);
32 return -1;
33 }
34 if (!SkImageDecoder::DecodeFile(test, &testBitmap)) {
35 SkDebugf("Failed to load bitmap \"%s\"\n", test);
36 return -1;
37 }
38 return this->queueDiff(&baselineBitmap, &testBitmap);
39 }
OLDNEW
« no previous file with comments | « experimental/skpdiff/SkImageDiffer.h ('k') | experimental/skpdiff/diff_pixels.cl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698