OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 /* | 8 /* |
9 * Code for the "gm" (Golden Master) rendering comparison tool. | 9 * Code for the "gm" (Golden Master) rendering comparison tool. |
10 * | 10 * |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 }; | 167 }; |
168 | 168 |
169 struct PDFRasterizerData { | 169 struct PDFRasterizerData { |
170 bool (*fRasterizerFunction)(SkStream*, SkBitmap*); | 170 bool (*fRasterizerFunction)(SkStream*, SkBitmap*); |
171 const char* fName; | 171 const char* fName; |
172 bool fRunByDefault; | 172 bool fRunByDefault; |
173 }; | 173 }; |
174 | 174 |
175 class BWTextDrawFilter : public SkDrawFilter { | 175 class BWTextDrawFilter : public SkDrawFilter { |
176 public: | 176 public: |
177 virtual bool filter(SkPaint*, Type) SK_OVERRIDE; | 177 bool filter(SkPaint*, Type) SK_OVERRIDE; |
178 }; | 178 }; |
179 bool BWTextDrawFilter::filter(SkPaint* p, Type t) { | 179 bool BWTextDrawFilter::filter(SkPaint* p, Type t) { |
180 if (kText_Type == t) { | 180 if (kText_Type == t) { |
181 p->setAntiAlias(false); | 181 p->setAntiAlias(false); |
182 } | 182 } |
183 return true; | 183 return true; |
184 } | 184 } |
185 | 185 |
186 struct PipeFlagComboData { | 186 struct PipeFlagComboData { |
187 const char* name; | 187 const char* name; |
(...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 if (FLAGS_forceBWtext) { | 2540 if (FLAGS_forceBWtext) { |
2541 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2541 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
2542 } | 2542 } |
2543 } | 2543 } |
2544 | 2544 |
2545 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2545 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
2546 int main(int argc, char * const argv[]) { | 2546 int main(int argc, char * const argv[]) { |
2547 return tool_main(argc, (char**) argv); | 2547 return tool_main(argc, (char**) argv); |
2548 } | 2548 } |
2549 #endif | 2549 #endif |
OLD | NEW |