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

Side by Side Diff: gm/convexpolyclip.cpp

Issue 1457123002: Make block size a template parameter of SkTLList (Closed) Base URL: https://skia.googlesource.com/skia.git@forward
Patch Set: another missing typename Created 5 years, 1 month 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 | « no previous file | gm/convexpolyeffect.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 8
9 #include "gm.h" 9 #include "gm.h"
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkPaint txtPaint; 151 SkPaint txtPaint;
152 txtPaint.setTextSize(23.f); 152 txtPaint.setTextSize(23.f);
153 txtPaint.setAntiAlias(true); 153 txtPaint.setAntiAlias(true);
154 sk_tool_utils::set_portable_typeface(&txtPaint); 154 sk_tool_utils::set_portable_typeface(&txtPaint);
155 txtPaint.setColor(sk_tool_utils::color_to_565(SK_ColorDKGRAY)); 155 txtPaint.setColor(sk_tool_utils::color_to_565(SK_ColorDKGRAY));
156 SkScalar textW = txtPaint.measureText(kTxt, SK_ARRAY_COUNT(kTxt)-1); 156 SkScalar textW = txtPaint.measureText(kTxt, SK_ARRAY_COUNT(kTxt)-1);
157 157
158 SkScalar startX = 0; 158 SkScalar startX = 0;
159 int testLayers = kBench_Mode != this->getMode(); 159 int testLayers = kBench_Mode != this->getMode();
160 for (int doLayer = 0; doLayer <= testLayers; ++doLayer) { 160 for (int doLayer = 0; doLayer <= testLayers; ++doLayer) {
161 for (SkTLList<Clip>::Iter iter(fClips, SkTLList<Clip>::Iter::kHead_I terStart); 161 for (ClipList::Iter iter(fClips, ClipList::Iter::kHead_IterStart);
162 iter.get(); 162 iter.get();
163 iter.next()) { 163 iter.next()) {
164 const Clip* clip = iter.get(); 164 const Clip* clip = iter.get();
165 SkScalar x = startX; 165 SkScalar x = startX;
166 for (int aa = 0; aa < 2; ++aa) { 166 for (int aa = 0; aa < 2; ++aa) {
167 if (doLayer) { 167 if (doLayer) {
168 SkRect bounds; 168 SkRect bounds;
169 clip->getBounds(&bounds); 169 clip->getBounds(&bounds);
170 bounds.outset(2, 2); 170 bounds.outset(2, 2);
171 bounds.offset(x, y); 171 bounds.offset(x, y);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 break; 284 break;
285 } 285 }
286 } 286 }
287 287
288 private: 288 private:
289 ClipType fClipType; 289 ClipType fClipType;
290 SkPath fPath; 290 SkPath fPath;
291 SkRect fRect; 291 SkRect fRect;
292 }; 292 };
293 293
294 SkTLList<Clip> fClips; 294 typedef SkTLList<Clip, 1> ClipList;
295 ClipList fClips;
295 SkBitmap fBmp; 296 SkBitmap fBmp;
296 297
297 typedef GM INHERITED; 298 typedef GM INHERITED;
298 }; 299 };
299 300
300 DEF_GM(return new ConvexPolyClip;) 301 DEF_GM(return new ConvexPolyClip;)
301 } 302 }
OLDNEW
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698