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

Side by Side Diff: gm/distantclip.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/displacement.cpp ('k') | gm/drawbitmaprect.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 2
3 /* 3 /*
4 * Copyright 2012 Google Inc. 4 * Copyright 2012 Google Inc.
5 * 5 *
6 * Use of this source code is governed by a BSD-style license that can be 6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file. 7 * found in the LICENSE file.
8 */ 8 */
9 9
10 #include "gm.h" 10 #include "gm.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkPicture.h" 12 #include "SkPicture.h"
13 #include "SkPictureRecorder.h" 13 #include "SkPictureRecorder.h"
14 14
15 namespace skiagm { 15 namespace skiagm {
16 16
17 class DistantClipGM : public GM { 17 class DistantClipGM : public GM {
18 public: 18 public:
19 DistantClipGM() { } 19 DistantClipGM() { }
20 20
21 protected: 21 protected:
22 22
23 SkString onShortName() { 23 SkString onShortName() {
24 return SkString("distantclip"); 24 return SkString("distantclip");
25 } 25 }
26 26
27 SkISize onISize() { return make_isize(100, 100); } 27 SkISize onISize() { return SkISize::Make(100, 100); }
28 28
29 virtual void onDraw(SkCanvas* canvas) { 29 virtual void onDraw(SkCanvas* canvas) {
30 int offset = 35000; 30 int offset = 35000;
31 int extents = 1000; 31 int extents = 1000;
32 32
33 SkPictureRecorder recorder; 33 SkPictureRecorder recorder;
34 // We record a picture of huge vertical extents in which we clear the ca nvas to red, create 34 // We record a picture of huge vertical extents in which we clear the ca nvas to red, create
35 // a 'extents' by 'extents' round rect clip at a vertical offset of 'off set', then draw 35 // a 'extents' by 'extents' round rect clip at a vertical offset of 'off set', then draw
36 // green into that. 36 // green into that.
37 SkCanvas* rec = recorder.beginRecording(100, offset + extents, NULL, 0); 37 SkCanvas* rec = recorder.beginRecording(100, offset + extents, NULL, 0);
(...skipping 30 matching lines...) Expand all
68 private: 68 private:
69 typedef GM INHERITED; 69 typedef GM INHERITED;
70 }; 70 };
71 71
72 /////////////////////////////////////////////////////////////////////////////// 72 ///////////////////////////////////////////////////////////////////////////////
73 73
74 static GM* MyFactory(void*) { return new DistantClipGM; } 74 static GM* MyFactory(void*) { return new DistantClipGM; }
75 static GMRegistry reg(MyFactory); 75 static GMRegistry reg(MyFactory);
76 76
77 } 77 }
OLDNEW
« no previous file with comments | « gm/displacement.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698