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

Side by Side Diff: gm/variedtext.cpp

Issue 867963004: remove unused GM flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guarded flags Created 5 years, 11 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
« no previous file with comments | « gm/tilemodes_scaled.cpp ('k') | gm/vertices.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 2014 Google Inc. 2 * Copyright 2014 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 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SkPaint wirePaint; 129 SkPaint wirePaint;
130 wirePaint.setAntiAlias(true); 130 wirePaint.setAntiAlias(true);
131 wirePaint.setStrokeWidth(0); 131 wirePaint.setStrokeWidth(0);
132 wirePaint.setStyle(SkPaint::kStroke_Style); 132 wirePaint.setStyle(SkPaint::kStroke_Style);
133 for (int i = 0; i < kCnt; ++i) { 133 for (int i = 0; i < kCnt; ++i) {
134 canvas->drawRect(fClipRects[i], wirePaint); 134 canvas->drawRect(fClipRects[i], wirePaint);
135 } 135 }
136 } 136 }
137 } 137 }
138 138
139 uint32_t onGetFlags() const SK_OVERRIDE {
140 // The aa hairline stroked rects used to visualize the clip draw slightl y differently in
141 // quilt mode in dm.
142 return kSkipTiled_Flag;
143 }
144 bool runAsBench() const SK_OVERRIDE { return true; } 139 bool runAsBench() const SK_OVERRIDE { return true; }
145 140
146 private: 141 private:
147 static const int kCnt = 30; 142 static const int kCnt = 30;
148 static const int kMinLength = 15; 143 static const int kMinLength = 15;
149 static const int kMaxLength = 40; 144 static const int kMaxLength = 40;
150 145
151 bool fEffectiveClip; 146 bool fEffectiveClip;
152 bool fLCD; 147 bool fLCD;
153 SkTypeface* fTypefacesToUnref[4]; 148 SkTypeface* fTypefacesToUnref[4];
154 SkPaint fPaint; 149 SkPaint fPaint;
155 150
156 // precomputed for each text draw 151 // precomputed for each text draw
157 SkString fStrings[kCnt]; 152 SkString fStrings[kCnt];
158 SkColor fColors[kCnt]; 153 SkColor fColors[kCnt];
159 SkScalar fPtSizes[kCnt]; 154 SkScalar fPtSizes[kCnt];
160 SkTypeface* fTypefaces[kCnt]; 155 SkTypeface* fTypefaces[kCnt];
161 SkPoint fPositions[kCnt]; 156 SkPoint fPositions[kCnt];
162 SkRect fClipRects[kCnt]; 157 SkRect fClipRects[kCnt];
163 158
164 typedef skiagm::GM INHERITED; 159 typedef skiagm::GM INHERITED;
165 }; 160 };
166 161
167 DEF_GM( return SkNEW(VariedTextGM(false, false)); ) 162 DEF_GM( return SkNEW(VariedTextGM(false, false)); )
168 DEF_GM( return SkNEW(VariedTextGM(true, false)); ) 163 DEF_GM( return SkNEW(VariedTextGM(true, false)); )
169 DEF_GM( return SkNEW(VariedTextGM(false, true)); ) 164 DEF_GM( return SkNEW(VariedTextGM(false, true)); )
170 DEF_GM( return SkNEW(VariedTextGM(true, true)); ) 165 DEF_GM( return SkNEW(VariedTextGM(true, true)); )
OLDNEW
« no previous file with comments | « gm/tilemodes_scaled.cpp ('k') | gm/vertices.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698