OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef skdiff_DEFINED | 8 #ifndef skdiff_DEFINED |
9 #define skdiff_DEFINED | 9 #define skdiff_DEFINED |
10 | 10 |
11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
12 #include "SkColor.h" | 12 #include "SkColor.h" |
13 #include "SkColorPriv.h" | 13 #include "SkColorPriv.h" |
14 #include "SkString.h" | 14 #include "SkString.h" |
15 #include "SkTDArray.h" | 15 #include "SkTDArray.h" |
16 | 16 |
17 #if SK_BUILD_FOR_WIN32 | 17 #if defined(SK_BUILD_FOR_WIN32) |
18 #define PATH_DIV_STR "\\" | 18 #define PATH_DIV_STR "\\" |
19 #define PATH_DIV_CHAR '\\' | 19 #define PATH_DIV_CHAR '\\' |
20 #else | 20 #else |
21 #define PATH_DIV_STR "/" | 21 #define PATH_DIV_STR "/" |
22 #define PATH_DIV_CHAR '/' | 22 #define PATH_DIV_CHAR '/' |
23 #endif | 23 #endif |
24 | 24 |
25 #define MAX2(a,b) (((b) < (a)) ? (a) : (b)) | 25 #define MAX2(a,b) (((b) < (a)) ? (a) : (b)) |
26 #define MAX3(a,b,c) (((b) < (a)) ? MAX2((a), (c)) : MAX2((b), (c))) | 26 #define MAX3(a,b,c) (((b) < (a)) ? MAX2((a), (c)) : MAX2((b), (c))) |
27 | 27 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 return SkPackARGB32(0xFF, SkAbs32(dr), SkAbs32(dg), SkAbs32(db)); | 263 return SkPackARGB32(0xFF, SkAbs32(dr), SkAbs32(dg), SkAbs32(db)); |
264 } | 264 } |
265 | 265 |
266 /** When finished, dr->fResult should have some value other than kUnknown_Result
. | 266 /** When finished, dr->fResult should have some value other than kUnknown_Result
. |
267 * Expects dr->fWhite.fBitmap and dr->fDifference.fBitmap to have the same boun
ds as | 267 * Expects dr->fWhite.fBitmap and dr->fDifference.fBitmap to have the same boun
ds as |
268 * dr->fBase.fBitmap and have a valid pixelref. | 268 * dr->fBase.fBitmap and have a valid pixelref. |
269 */ | 269 */ |
270 void compute_diff(DiffRecord* dr, DiffMetricProc diffFunction, const int colorTh
reshold); | 270 void compute_diff(DiffRecord* dr, DiffMetricProc diffFunction, const int colorTh
reshold); |
271 | 271 |
272 #endif | 272 #endif |
OLD | NEW |