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

Side by Side Diff: gm/gm_expectations.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 4 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 | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gm/gmmain.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 * 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 Json::Value jsonExpectations; 188 Json::Value jsonExpectations;
189 jsonExpectations[kJsonKey_ExpectedResults_AllowedDigests] = allowedDiges tArray; 189 jsonExpectations[kJsonKey_ExpectedResults_AllowedDigests] = allowedDiges tArray;
190 jsonExpectations[kJsonKey_ExpectedResults_IgnoreFailure] = this->ignore Failure(); 190 jsonExpectations[kJsonKey_ExpectedResults_IgnoreFailure] = this->ignore Failure();
191 return jsonExpectations; 191 return jsonExpectations;
192 } 192 }
193 193
194 // IndividualImageExpectationsSource class... 194 // IndividualImageExpectationsSource class...
195 195
196 Expectations IndividualImageExpectationsSource::get(const char *testName) co nst { 196 Expectations IndividualImageExpectationsSource::get(const char *testName) co nst {
197 SkString path = SkOSPath::SkPathJoin(fRootDir.c_str(), testName); 197 SkString path = SkOSPath::Join(fRootDir.c_str(), testName);
198 SkBitmap referenceBitmap; 198 SkBitmap referenceBitmap;
199 bool decodedReferenceBitmap = 199 bool decodedReferenceBitmap =
200 SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap, kN32_SkCo lorType, 200 SkImageDecoder::DecodeFile(path.c_str(), &referenceBitmap, kN32_SkCo lorType,
201 SkImageDecoder::kDecodePixels_Mode, NULL) ; 201 SkImageDecoder::kDecodePixels_Mode, NULL) ;
202 if (decodedReferenceBitmap) { 202 if (decodedReferenceBitmap) {
203 return Expectations(referenceBitmap); 203 return Expectations(referenceBitmap);
204 } else { 204 } else {
205 return Expectations(); 205 return Expectations();
206 } 206 }
207 } 207 }
(...skipping 22 matching lines...) Expand all
230 size_t size = dataRef.get()->size(); 230 size_t size = dataRef.get()->size();
231 Json::Reader reader; 231 Json::Reader reader;
232 if (!reader.parse(bytes, bytes+size, *jsonRoot)) { 232 if (!reader.parse(bytes, bytes+size, *jsonRoot)) {
233 SkDebugf("error parsing JSON file %s\n", jsonPath); 233 SkDebugf("error parsing JSON file %s\n", jsonPath);
234 DEBUGFAIL_SEE_STDERR; 234 DEBUGFAIL_SEE_STDERR;
235 return false; 235 return false;
236 } 236 }
237 return true; 237 return true;
238 } 238 }
239 } 239 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698