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

Side by Side Diff: gm/dashing.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years 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 | « gm/convexpaths.cpp ('k') | gm/gradient_matrix.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 2012 Google Inc. 2 * Copyright 2012 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 "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 // 1on/1off 3x3 squares with phase of 0 - points fast path 257 // 1on/1off 3x3 squares with phase of 0 - points fast path
258 canvas->save(); 258 canvas->save();
259 canvas->translate(2, 110); 259 canvas->translate(2, 110);
260 this->drawDashedLines(canvas, 100, 0, SkIntToScalar(3), 3, false); 260 this->drawDashedLines(canvas, 100, 0, SkIntToScalar(3), 3, false);
261 canvas->restore(); 261 canvas->restore();
262 262
263 // 1on/1off 3x3 squares with phase of 1.5 - rects fast path 263 // 1on/1off 3x3 squares with phase of 1.5 - rects fast path
264 canvas->save(); 264 canvas->save();
265 canvas->translate(112, 110); 265 canvas->translate(112, 110);
266 this->drawDashedLines(canvas, 100, SkFloatToScalar(1.5f), SkIntToSca lar(3), 3, false); 266 this->drawDashedLines(canvas, 100, 1.5f, SkIntToScalar(3), 3, false) ;
267 canvas->restore(); 267 canvas->restore();
268 268
269 // 1on/1off 1x1 circles with phase of 1 - no fast path yet 269 // 1on/1off 1x1 circles with phase of 1 - no fast path yet
270 canvas->save(); 270 canvas->save();
271 canvas->translate(2, 220); 271 canvas->translate(2, 220);
272 this->drawDashedLines(canvas, 100, SK_Scalar1, SK_Scalar1, 1, true); 272 this->drawDashedLines(canvas, 100, SK_Scalar1, SK_Scalar1, 1, true);
273 canvas->restore(); 273 canvas->restore();
274 274
275 // 1on/1off 3x3 circles with phase of 1 - no fast path yet 275 // 1on/1off 3x3 circles with phase of 1 - no fast path yet
276 canvas->save(); 276 canvas->save();
(...skipping 24 matching lines...) Expand all
301 301
302 ////////////////////////////////////////////////////////////////////////////// 302 //////////////////////////////////////////////////////////////////////////////
303 303
304 static skiagm::GM* F0(void*) { return new DashingGM; } 304 static skiagm::GM* F0(void*) { return new DashingGM; }
305 static skiagm::GM* F1(void*) { return new Dashing2GM; } 305 static skiagm::GM* F1(void*) { return new Dashing2GM; }
306 static skiagm::GM* F2(void*) { return new Dashing3GM; } 306 static skiagm::GM* F2(void*) { return new Dashing3GM; }
307 307
308 static skiagm::GMRegistry gR0(F0); 308 static skiagm::GMRegistry gR0(F0);
309 static skiagm::GMRegistry gR1(F1); 309 static skiagm::GMRegistry gR1(F1);
310 static skiagm::GMRegistry gR2(F2); 310 static skiagm::GMRegistry gR2(F2);
OLDNEW
« no previous file with comments | « gm/convexpaths.cpp ('k') | gm/gradient_matrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698