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

Side by Side Diff: gm/bicubicfilter.cpp

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/beziereffects.cpp ('k') | gm/bigblurs.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 "SkColor.h" 9 #include "SkColor.h"
10 #include "SkBicubicImageFilter.h" 10 #include "SkBicubicImageFilter.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 s = fCheckerboard.getAddr32(0, y + 1); 39 s = fCheckerboard.getAddr32(0, y + 1);
40 for (int x = 0; x < width; x += 2) { 40 for (int x = 0; x < width; x += 2) {
41 *s++ = 0xFF000000; 41 *s++ = 0xFF000000;
42 *s++ = 0xFFFFFFFF; 42 *s++ = 0xFFFFFFFF;
43 } 43 }
44 } 44 }
45 } 45 }
46 46
47 virtual SkISize onISize() { 47 virtual SkISize onISize() {
48 return make_isize(400, 300); 48 return SkISize::Make(400, 300);
49 } 49 }
50 50
51 virtual void onDraw(SkCanvas* canvas) { 51 virtual void onDraw(SkCanvas* canvas) {
52 if (!fInitialized) { 52 if (!fInitialized) {
53 make_checkerboard(4, 4); 53 make_checkerboard(4, 4);
54 fInitialized = true; 54 fInitialized = true;
55 } 55 }
56 SkScalar sk32 = SkIntToScalar(32); 56 SkScalar sk32 = SkIntToScalar(32);
57 canvas->clear(0x00000000); 57 canvas->clear(0x00000000);
58 SkPaint bilinearPaint, bicubicPaint; 58 SkPaint bilinearPaint, bicubicPaint;
(...skipping 18 matching lines...) Expand all
77 SkBitmap fCheckerboard; 77 SkBitmap fCheckerboard;
78 bool fInitialized; 78 bool fInitialized;
79 }; 79 };
80 80
81 ////////////////////////////////////////////////////////////////////////////// 81 //////////////////////////////////////////////////////////////////////////////
82 82
83 static GM* MyFactory(void*) { return new BicubicGM; } 83 static GM* MyFactory(void*) { return new BicubicGM; }
84 static GMRegistry reg(MyFactory); 84 static GMRegistry reg(MyFactory);
85 85
86 } 86 }
OLDNEW
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/bigblurs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698