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

Side by Side Diff: gm/convex_all_line_paths.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/conicpaths.cpp ('k') | gm/convexpaths.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 "SkPathPriv.h" 9 #include "SkPathPriv.h"
10 10
(...skipping 10 matching lines...) Expand all
21 angle += angleStep; 21 angle += angleStep;
22 } 22 }
23 } 23 }
24 24
25 namespace skiagm { 25 namespace skiagm {
26 26
27 // This GM is intended to exercise Ganesh's handling of convex line-only 27 // This GM is intended to exercise Ganesh's handling of convex line-only
28 // paths 28 // paths
29 class ConvexLineOnlyPathsGM : public GM { 29 class ConvexLineOnlyPathsGM : public GM {
30 public: 30 public:
31 ConvexLineOnlyPathsGM() { 31 ConvexLineOnlyPathsGM() {
32 this->setBGColor(0xFFFFFFFF); 32 this->setBGColor(0xFFFFFFFF);
33 } 33 }
34 34
35 protected: 35 protected:
36 SkString onShortName() override { return SkString("convex-lineonly-paths"); } 36 SkString onShortName() override { return SkString("convex-lineonly-paths"); }
37 SkISize onISize() override { return SkISize::Make(kGMWidth, kGMHeight); } 37 SkISize onISize() override { return SkISize::Make(kGMWidth, kGMHeight); }
38 bool runAsBench() const override { return true; } 38 bool runAsBench() const override { return true; }
39 39
40 static SkPath GetPath(int index, int offset, SkPath::Direction dir) { 40 static SkPath GetPath(int index, int offset, SkPath::Direction dir) {
41 // narrow rect 41 // narrow rect
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 canvas->translate(center.fX, center.fY); 277 canvas->translate(center.fX, center.fY);
278 canvas->scale(scales[i], scales[i]); 278 canvas->scale(scales[i], scales[i]);
279 paint.setColor(colors[i%2]); 279 paint.setColor(colors[i%2]);
280 canvas->drawPath(path, paint); 280 canvas->drawPath(path, paint);
281 canvas->restore(); 281 canvas->restore();
282 } 282 }
283 } 283 }
284 284
285 void onDraw(SkCanvas* canvas) override { 285 void onDraw(SkCanvas* canvas) override {
286 // the right edge of the last drawn path 286 // the right edge of the last drawn path
287 SkPoint offset = { 0, SkScalarHalf(kMaxPathHeight) }; 287 SkPoint offset = { 0, SkScalarHalf(kMaxPathHeight) };
288 288
289 for (int i = 0; i < kNumPaths; ++i) { 289 for (int i = 0; i < kNumPaths; ++i) {
290 this->drawPath(canvas, i, &offset); 290 this->drawPath(canvas, i, &offset);
291 } 291 }
292 292
293 // Repro for crbug.com/472723 (Missing AA on portions of graphic with GP U rasterization) 293 // Repro for crbug.com/472723 (Missing AA on portions of graphic with GP U rasterization)
294 { 294 {
295 canvas->translate(356.0f, 50.0f); 295 canvas->translate(356.0f, 50.0f);
296 296
297 SkPaint p; 297 SkPaint p;
(...skipping 14 matching lines...) Expand all
312 static const int kGMWidth = 512; 312 static const int kGMWidth = 512;
313 static const int kGMHeight = 512; 313 static const int kGMHeight = 512;
314 314
315 typedef GM INHERITED; 315 typedef GM INHERITED;
316 }; 316 };
317 317
318 ////////////////////////////////////////////////////////////////////////////// 318 //////////////////////////////////////////////////////////////////////////////
319 319
320 DEF_GM(return new ConvexLineOnlyPathsGM;) 320 DEF_GM(return new ConvexLineOnlyPathsGM;)
321 } 321 }
OLDNEW
« no previous file with comments | « gm/conicpaths.cpp ('k') | gm/convexpaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698