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

Side by Side Diff: gm/gm_expectations.cpp

Issue 334793002: hide Config in SkImageDecoder -- use SkColorType instead (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning Created 6 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
« no previous file with comments | « gm/filterindiabox.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('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 * TODO(epoger): Combine this with tools/image_expectations.cpp, or eliminate on e of the two. 7 * TODO(epoger): Combine this with tools/image_expectations.cpp, or eliminate on e of the two.
8 */ 8 */
9 9
10 #include "gm_expectations.h" 10 #include "gm_expectations.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return jsonExpectations; 200 return jsonExpectations;
201 } 201 }
202 #endif 202 #endif
203 203
204 // IndividualImageExpectationsSource class... 204 // IndividualImageExpectationsSource class...
205 205
206 Expectations IndividualImageExpectationsSource::get(const char *testName) co nst { 206 Expectations IndividualImageExpectationsSource::get(const char *testName) co nst {
207 SkString path = SkOSPath::SkPathJoin(fRootDir.c_str(), testName); 207 SkString path = SkOSPath::SkPathJoin(fRootDir.c_str(), testName);
208 SkBitmap referenceBitmap; 208 SkBitmap referenceBitmap;
209 bool decodedReferenceBitmap = 209 bool decodedReferenceBitmap =
210 SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap, 210 SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap, kN32_SkCo lorType,
211 SkBitmap::kARGB_8888_Config, 211 SkImageDecoder::kDecodePixels_Mode, NULL) ;
212 SkImageDecoder::kDecodePixels_Mode,
213 NULL);
214 if (decodedReferenceBitmap) { 212 if (decodedReferenceBitmap) {
215 return Expectations(referenceBitmap); 213 return Expectations(referenceBitmap);
216 } else { 214 } else {
217 return Expectations(); 215 return Expectations();
218 } 216 }
219 } 217 }
220 218
221 219
222 #ifdef SK_BUILD_JSON_WRITER 220 #ifdef SK_BUILD_JSON_WRITER
223 // JsonExpectationsSource class... 221 // JsonExpectationsSource class...
(...skipping 20 matching lines...) Expand all
244 Json::Reader reader; 242 Json::Reader reader;
245 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { 243 if (!reader.parse(bytes, bytes+size, *jsonRoot)) {
246 SkDebugf("error parsing JSON file %s\n", jsonPath); 244 SkDebugf("error parsing JSON file %s\n", jsonPath);
247 DEBUGFAIL_SEE_STDERR; 245 DEBUGFAIL_SEE_STDERR;
248 return false; 246 return false;
249 } 247 }
250 return true; 248 return true;
251 } 249 }
252 #endif 250 #endif
253 } 251 }
OLDNEW
« no previous file with comments | « gm/filterindiabox.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698