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

Side by Side Diff: gm/imagesource2.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/imagefromyuvtextures.cpp ('k') | gm/internal_links.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 2015 Google Inc. 2 * Copyright 2015 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 "SkImage.h" 9 #include "SkImage.h"
10 #include "SkImageSource.h" 10 #include "SkImageSource.h"
(...skipping 29 matching lines...) Expand all
40 SK_ColorYELLOW, SK_ColorGRAY, 40 SK_ColorYELLOW, SK_ColorGRAY,
41 SK_ColorWHITE, SK_ColorGRAY, 41 SK_ColorWHITE, SK_ColorGRAY,
42 }; 42 };
43 43
44 auto surface(SkSurface::MakeRasterN32Premul(kImageSize, kImageSize)); 44 auto surface(SkSurface::MakeRasterN32Premul(kImageSize, kImageSize));
45 SkCanvas* canvas = surface->getCanvas(); 45 SkCanvas* canvas = surface->getCanvas();
46 46
47 int curColor = 0; 47 int curColor = 0;
48 48
49 for (int x = 0; x < kImageSize; x += 3) { 49 for (int x = 0; x < kImageSize; x += 3) {
50 SkRect r = SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(0), 50 SkRect r = SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(0),
51 SkIntToScalar(3), SkIntToScalar(kImageSi ze)); 51 SkIntToScalar(3), SkIntToScalar(kImageSi ze));
52 SkPaint p; 52 SkPaint p;
53 p.setColor(gColors[curColor]); 53 p.setColor(gColors[curColor]);
54 canvas->drawRect(r, p); 54 canvas->drawRect(r, p);
55 55
56 curColor = (curColor+1) % SK_ARRAY_COUNT(gColors); 56 curColor = (curColor+1) % SK_ARRAY_COUNT(gColors);
57 } 57 }
58 58
59 fImage = surface->makeImageSnapshot(); 59 fImage = surface->makeImageSnapshot();
60 } 60 }
(...skipping 23 matching lines...) Expand all
84 typedef GM INHERITED; 84 typedef GM INHERITED;
85 }; 85 };
86 86
87 ////////////////////////////////////////////////////////////////////////////// 87 //////////////////////////////////////////////////////////////////////////////
88 88
89 DEF_GM(return new ImageSourceGM("none", kNone_SkFilterQuality);) 89 DEF_GM(return new ImageSourceGM("none", kNone_SkFilterQuality);)
90 DEF_GM(return new ImageSourceGM("low", kLow_SkFilterQuality);) 90 DEF_GM(return new ImageSourceGM("low", kLow_SkFilterQuality);)
91 DEF_GM(return new ImageSourceGM("med", kMedium_SkFilterQuality);) 91 DEF_GM(return new ImageSourceGM("med", kMedium_SkFilterQuality);)
92 DEF_GM(return new ImageSourceGM("high", kHigh_SkFilterQuality);) 92 DEF_GM(return new ImageSourceGM("high", kHigh_SkFilterQuality);)
93 } 93 }
OLDNEW
« no previous file with comments | « gm/imagefromyuvtextures.cpp ('k') | gm/internal_links.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698