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

Side by Side Diff: gm/typeface.cpp

Issue 147683003: fix more 64bit warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « gm/testimagefilters.cpp ('k') | include/core/SkTypes.h » ('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 "SkString.h" 10 #include "SkString.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual SkISize onISize() SK_OVERRIDE { 43 virtual SkISize onISize() SK_OVERRIDE {
44 return SkISize::Make(640, 480); 44 return SkISize::Make(640, 480);
45 } 45 }
46 46
47 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 47 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
48 SkString text("Typefaces are fun!"); 48 SkString text("Typefaces are fun!");
49 SkScalar y = 0; 49 SkScalar y = 0;
50 50
51 SkPaint paint; 51 SkPaint paint;
52 paint.setAntiAlias(true); 52 paint.setAntiAlias(true);
53 for (size_t i = 0; i < SK_ARRAY_COUNT(gFaces); i++) { 53 for (int i = 0; i < (int)SK_ARRAY_COUNT(gFaces); i++) {
54 this->drawWithFace(text, i, y, paint, canvas); 54 this->drawWithFace(text, i, y, paint, canvas);
55 } 55 }
56 // Now go backwards 56 // Now go backwards
57 for (int i = SK_ARRAY_COUNT(gFaces) - 1; i >= 0; i--) { 57 for (int i = SK_ARRAY_COUNT(gFaces) - 1; i >= 0; i--) {
58 this->drawWithFace(text, i, y, paint, canvas); 58 this->drawWithFace(text, i, y, paint, canvas);
59 } 59 }
60 } 60 }
61 61
62 private: 62 private:
63 void drawWithFace(const SkString& text, int i, SkScalar& y, SkPaint& paint, 63 void drawWithFace(const SkString& text, int i, SkScalar& y, SkPaint& paint,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 private: 213 private:
214 typedef skiagm::GM INHERITED; 214 typedef skiagm::GM INHERITED;
215 }; 215 };
216 216
217 /////////////////////////////////////////////////////////////////////////////// 217 ///////////////////////////////////////////////////////////////////////////////
218 218
219 DEF_GM( return new TypefaceGM; ) 219 DEF_GM( return new TypefaceGM; )
220 DEF_GM( return new TypefaceStylesGM(false); ) 220 DEF_GM( return new TypefaceStylesGM(false); )
221 DEF_GM( return new TypefaceStylesGM(true); ) 221 DEF_GM( return new TypefaceStylesGM(true); )
OLDNEW
« no previous file with comments | « gm/testimagefilters.cpp ('k') | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698