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

Side by Side Diff: gm/gm_error.h

Issue 24811002: Update the SkDocument interface to allow for 1) abort won't emit pdf, 2) close can report success/f… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix typo Created 7 years, 2 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 | 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 7
8 /* 8 /*
9 * Error codes used by gmmain.cpp. 9 * Error codes used by gmmain.cpp.
10 */ 10 */
(...skipping 10 matching lines...) Expand all
21 */ 21 */
22 enum ErrorType { 22 enum ErrorType {
23 // Even though kNoGpuContext_ErrorType only occurs when SK_SUPPORT_GPU 23 // Even though kNoGpuContext_ErrorType only occurs when SK_SUPPORT_GPU
24 // is turned on, we always include this type in our enum so that 24 // is turned on, we always include this type in our enum so that
25 // reports will be consistent whether SK_SUPPORT_GPU is turned on 25 // reports will be consistent whether SK_SUPPORT_GPU is turned on
26 // or off (as long as the number of these errors is 0). 26 // or off (as long as the number of these errors is 0).
27 kNoGpuContext_ErrorType, 27 kNoGpuContext_ErrorType,
28 28
29 kIntentionallySkipped_ErrorType, 29 kIntentionallySkipped_ErrorType,
30 kRenderModeMismatch_ErrorType, 30 kRenderModeMismatch_ErrorType,
31 kGeneratePdfFailed_ErrorType,
31 kExpectationsMismatch_ErrorType, 32 kExpectationsMismatch_ErrorType,
32 kMissingExpectations_ErrorType, 33 kMissingExpectations_ErrorType,
33 kWritingReferenceImage_ErrorType, 34 kWritingReferenceImage_ErrorType,
34 kLast_ErrorType = kWritingReferenceImage_ErrorType 35 kLast_ErrorType = kWritingReferenceImage_ErrorType
35 }; 36 };
36 37
37 /** 38 /**
38 * Returns the name of the given ErrorType. 39 * Returns the name of the given ErrorType.
39 */ 40 */
40 static const char *getErrorTypeName(ErrorType type) { 41 static const char *getErrorTypeName(ErrorType type) {
41 switch(type) { 42 switch(type) {
42 case kNoGpuContext_ErrorType: 43 case kNoGpuContext_ErrorType:
43 return "NoGpuContext"; 44 return "NoGpuContext";
44 case kIntentionallySkipped_ErrorType: 45 case kIntentionallySkipped_ErrorType:
45 return "IntentionallySkipped"; 46 return "IntentionallySkipped";
46 case kRenderModeMismatch_ErrorType: 47 case kRenderModeMismatch_ErrorType:
47 return "RenderModeMismatch"; 48 return "RenderModeMismatch";
49 case kGeneratePdfFailed_ErrorType:
50 return "GeneratePdfFailed";
48 case kExpectationsMismatch_ErrorType: 51 case kExpectationsMismatch_ErrorType:
49 return "ExpectationsMismatch"; 52 return "ExpectationsMismatch";
50 case kMissingExpectations_ErrorType: 53 case kMissingExpectations_ErrorType:
51 return "MissingExpectations"; 54 return "MissingExpectations";
52 case kWritingReferenceImage_ErrorType: 55 case kWritingReferenceImage_ErrorType:
53 return "WritingReferenceImage"; 56 return "WritingReferenceImage";
54 } 57 }
55 // control should never reach here 58 // control should never reach here
56 SkDEBUGFAIL("getErrorTypeName() called with unknown type"); 59 SkDEBUGFAIL("getErrorTypeName() called with unknown type");
57 return "Unknown"; 60 return "Unknown";
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 154
152 private: 155 private:
153 int fBitfield; 156 int fBitfield;
154 }; 157 };
155 158
156 // No errors at all. 159 // No errors at all.
157 const static ErrorCombination kEmpty_ErrorCombination; 160 const static ErrorCombination kEmpty_ErrorCombination;
158 } 161 }
159 162
160 #endif // ifndef gm_error_DEFINED 163 #endif // ifndef gm_error_DEFINED
OLDNEW
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698