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

Side by Side Diff: gm/gm_error.h

Issue 13650002: gm: report ExpectationsMismatch and RenderModeMismatch results separately (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: record_RenderModeMismatch_separately Created 7 years, 8 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') | gm/gmmain.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 7
8 /* 8 /*
9 * Error codes used by gmmain.cpp. 9 * Error codes used by gmmain.cpp.
10 */ 10 */
11 11
12 #ifndef gm_error_DEFINED 12 #ifndef gm_error_DEFINED
13 #define gm_error_DEFINED 13 #define gm_error_DEFINED
14 14
15 #include "gm.h" 15 #include "gm.h"
16 16
17 namespace skiagm { 17 namespace skiagm {
18 18
19 /** 19 /**
20 * The complete list of error types we might encounter in GM. 20 * The complete list of error types we might encounter in GM.
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 kImageMismatch_ErrorType, 29 kRenderModeMismatch_ErrorType,
30 kExpectationsMismatch_ErrorType,
30 kMissingExpectations_ErrorType, 31 kMissingExpectations_ErrorType,
31 kWritingReferenceImage_ErrorType, 32 kWritingReferenceImage_ErrorType,
32 kLast_ErrorType = kWritingReferenceImage_ErrorType 33 kLast_ErrorType = kWritingReferenceImage_ErrorType
33 }; 34 };
34 35
35 /** 36 /**
36 * Returns the name of the given ErrorType. 37 * Returns the name of the given ErrorType.
37 */ 38 */
38 static const char *getErrorTypeName(ErrorType type) { 39 static const char *getErrorTypeName(ErrorType type) {
39 switch(type) { 40 switch(type) {
40 case kNoGpuContext_ErrorType: 41 case kNoGpuContext_ErrorType:
41 return "NoGpuContext"; 42 return "NoGpuContext";
42 case kImageMismatch_ErrorType: 43 case kRenderModeMismatch_ErrorType:
43 return "ImageMismatch"; 44 return "RenderModeMismatch";
45 case kExpectationsMismatch_ErrorType:
46 return "ExpectationsMismatch";
44 case kMissingExpectations_ErrorType: 47 case kMissingExpectations_ErrorType:
45 return "MissingExpectations"; 48 return "MissingExpectations";
46 case kWritingReferenceImage_ErrorType: 49 case kWritingReferenceImage_ErrorType:
47 return "WritingReferenceImage"; 50 return "WritingReferenceImage";
48 } 51 }
49 // control should never reach here 52 // control should never reach here
50 SkDEBUGFAIL("getErrorTypeName() called with unknown type"); 53 SkDEBUGFAIL("getErrorTypeName() called with unknown type");
51 return "Unknown"; 54 return "Unknown";
52 } 55 }
53 56
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 112
110 private: 113 private:
111 int fBitfield; 114 int fBitfield;
112 }; 115 };
113 116
114 // No errors at all. 117 // No errors at all.
115 const static ErrorCombination kEmpty_ErrorCombination; 118 const static ErrorCombination kEmpty_ErrorCombination;
116 } 119 }
117 120
118 #endif // ifndef gm_error_DEFINED 121 #endif // ifndef gm_error_DEFINED
OLDNEW
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | gm/gmmain.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698