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

Side by Side Diff: gm/gm_expectations.h

Issue 303543009: replace config() with colorType() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/core/SkBlitRow.h » ('j') | src/core/SkBitmapProcState.cpp » ('J')
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.h, or eliminate one of the two. 7 * TODO(epoger): Combine this with tools/image_expectations.h, or eliminate one of the two.
8 */ 8 */
9 #ifndef gm_expectations_DEFINED 9 #ifndef gm_expectations_DEFINED
10 #define gm_expectations_DEFINED 10 #define gm_expectations_DEFINED
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 */ 151 */
152 bool match(GmResultDigest resultDigest) const; 152 bool match(GmResultDigest resultDigest) const;
153 153
154 /** 154 /**
155 * If this Expectation is based on a single SkBitmap, return a 155 * If this Expectation is based on a single SkBitmap, return a
156 * pointer to that SkBitmap. Otherwise (if the Expectation is 156 * pointer to that SkBitmap. Otherwise (if the Expectation is
157 * empty, or if it was based on a list of checksums rather 157 * empty, or if it was based on a list of checksums rather
158 * than a single bitmap), returns NULL. 158 * than a single bitmap), returns NULL.
159 */ 159 */
160 const SkBitmap *asBitmap() const { 160 const SkBitmap *asBitmap() const {
161 return (SkBitmap::kNo_Config == fBitmap.config()) ? NULL : &fBitmap; 161 return (kUnknown_SkColorType == fBitmap.colorType()) ? NULL : &fBitm ap;
162 } 162 }
163 163
164 #ifdef SK_BUILD_JSON_WRITER 164 #ifdef SK_BUILD_JSON_WRITER
165 /** 165 /**
166 * Return a JSON representation of the expectations. 166 * Return a JSON representation of the expectations.
167 */ 167 */
168 Json::Value asJsonValue() const; 168 Json::Value asJsonValue() const;
169 #endif 169 #endif
170 170
171 private: 171 private:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 */ 234 */
235 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); 235 static bool Parse(const char *jsonPath, Json::Value *jsonRoot);
236 236
237 Json::Value fJsonRoot; 237 Json::Value fJsonRoot;
238 Json::Value fJsonExpectedResults; 238 Json::Value fJsonExpectedResults;
239 }; 239 };
240 #endif // SK_BUILD_JSON_WRITER 240 #endif // SK_BUILD_JSON_WRITER
241 241
242 } 242 }
243 #endif 243 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkBlitRow.h » ('j') | src/core/SkBitmapProcState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698