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

Side by Side Diff: gm/offsetimagefilter.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/nonclosedpaths.cpp ('k') | gm/polygons.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 2013 Google Inc. 2 * Copyright 2013 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 "SkOffsetImageFilter.h" 9 #include "SkOffsetImageFilter.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void onDraw(SkCanvas* canvas) { 80 virtual void onDraw(SkCanvas* canvas) {
81 if (!fInitialized) { 81 if (!fInitialized) {
82 make_bitmap(); 82 make_bitmap();
83 make_checkerboard(); 83 make_checkerboard();
84 fInitialized = true; 84 fInitialized = true;
85 } 85 }
86 canvas->clear(0x00000000); 86 canvas->clear(0x00000000);
87 SkPaint paint; 87 SkPaint paint;
88 88
89 int x = 0, y = 0; 89 int x = 0, y = 0;
90 for (size_t i = 0; i < 4; i++) { 90 for (int i = 0; i < 4; i++) {
91 SkBitmap* bitmap = (i & 0x01) ? &fCheckerboard : &fBitmap; 91 SkBitmap* bitmap = (i & 0x01) ? &fCheckerboard : &fBitmap;
92 SkIRect cropRect = SkIRect::MakeXYWH(i * 12, 92 SkIRect cropRect = SkIRect::MakeXYWH(i * 12,
93 i * 8, 93 i * 8,
94 bitmap->width() - i * 8, 94 bitmap->width() - i * 8,
95 bitmap->height() - i * 12); 95 bitmap->height() - i * 12);
96 SkImageFilter::CropRect rect(SkRect::Make(cropRect)); 96 SkImageFilter::CropRect rect(SkRect::Make(cropRect));
97 SkAutoTUnref<SkImageFilter> tileInput(SkNEW_ARGS(SkBitmapSource, (*b itmap))); 97 SkAutoTUnref<SkImageFilter> tileInput(SkNEW_ARGS(SkBitmapSource, (*b itmap)));
98 SkScalar dx = SkIntToScalar(i*5); 98 SkScalar dx = SkIntToScalar(i*5);
99 SkScalar dy = SkIntToScalar(i*10); 99 SkScalar dy = SkIntToScalar(i*10);
100 SkAutoTUnref<SkImageFilter> filter(SkNEW_ARGS( 100 SkAutoTUnref<SkImageFilter> filter(SkNEW_ARGS(
(...skipping 12 matching lines...) Expand all
113 SkBitmap fBitmap, fCheckerboard; 113 SkBitmap fBitmap, fCheckerboard;
114 bool fInitialized; 114 bool fInitialized;
115 }; 115 };
116 116
117 ////////////////////////////////////////////////////////////////////////////// 117 //////////////////////////////////////////////////////////////////////////////
118 118
119 static GM* MyFactory(void*) { return new OffsetImageFilterGM; } 119 static GM* MyFactory(void*) { return new OffsetImageFilterGM; }
120 static GMRegistry reg(MyFactory); 120 static GMRegistry reg(MyFactory);
121 121
122 } 122 }
OLDNEW
« no previous file with comments | « gm/nonclosedpaths.cpp ('k') | gm/polygons.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698