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

Side by Side Diff: gm/gm.h

Issue 23526065: gm: add --ignoreTests flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: implement_it Created 7 years, 3 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/gm.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef skiagm_DEFINED 8 #ifndef skiagm_DEFINED
9 #define skiagm_DEFINED 9 #define skiagm_DEFINED
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void drawSizeBounds(SkCanvas*, SkColor); 85 void drawSizeBounds(SkCanvas*, SkColor);
86 86
87 static void SetResourcePath(const char* resourcePath) { 87 static void SetResourcePath(const char* resourcePath) {
88 gResourcePath = resourcePath; 88 gResourcePath = resourcePath;
89 } 89 }
90 90
91 static SkString& GetResourcePath() { 91 static SkString& GetResourcePath() {
92 return gResourcePath; 92 return gResourcePath;
93 } 93 }
94 94
95 bool isIgnoringFailures() const { return fIgnoreFailures; }
96 void setIgnoreFailures(bool val) {
97 fIgnoreFailures = val;
98 }
99
95 bool isCanvasDeferred() const { return fCanvasIsDeferred; } 100 bool isCanvasDeferred() const { return fCanvasIsDeferred; }
96 void setCanvasIsDeferred(bool isDeferred) { 101 void setCanvasIsDeferred(bool isDeferred) {
97 fCanvasIsDeferred = isDeferred; 102 fCanvasIsDeferred = isDeferred;
98 } 103 }
99 104
100 #if SK_SUPPORT_GPU 105 #if SK_SUPPORT_GPU
101 static GrContext* GetGr(/*very nearly const*/ SkCanvas*); 106 static GrContext* GetGr(/*very nearly const*/ SkCanvas*);
102 #endif 107 #endif
103 108
104 protected: 109 protected:
105 static SkString gResourcePath; 110 static SkString gResourcePath;
106 111
107 virtual void onOnceBeforeDraw() {} 112 virtual void onOnceBeforeDraw() {}
108 virtual void onDraw(SkCanvas*) = 0; 113 virtual void onDraw(SkCanvas*) = 0;
109 virtual void onDrawBackground(SkCanvas*); 114 virtual void onDrawBackground(SkCanvas*);
110 virtual SkISize onISize() = 0; 115 virtual SkISize onISize() = 0;
111 virtual SkString onShortName() = 0; 116 virtual SkString onShortName() = 0;
112 virtual uint32_t onGetFlags() const { return 0; } 117 virtual uint32_t onGetFlags() const { return 0; }
113 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); } 118 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); }
114 119
115 private: 120 private:
116 SkString fShortName; 121 SkString fShortName;
117 SkColor fBGColor; 122 SkColor fBGColor;
118 bool fCanvasIsDeferred; // work-around problem in srcmode.cpp 123 bool fCanvasIsDeferred; // work-around problem in srcmode.cpp
119 bool fHaveCalledOnceBeforeDraw; 124 bool fHaveCalledOnceBeforeDraw;
125 bool fIgnoreFailures; // whether to file any failures as failure-ign ored
120 }; 126 };
121 127
122 typedef SkTRegistry<GM*(*)(void*)> GMRegistry; 128 typedef SkTRegistry<GM*(*)(void*)> GMRegistry;
123 } 129 }
124 130
125 #endif 131 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/gm.cpp » ('j') | gm/gmmain.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698