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

Side by Side Diff: gm/samplerstress.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 3 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/rrects.cpp ('k') | gm/simpleaaclip.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 SkRect temp; 102 SkRect temp;
103 temp.set(SkIntToScalar(115), 103 temp.set(SkIntToScalar(115),
104 SkIntToScalar(75), 104 SkIntToScalar(75),
105 SkIntToScalar(144), 105 SkIntToScalar(144),
106 SkIntToScalar(110)); 106 SkIntToScalar(110));
107 107
108 SkPath path; 108 SkPath path;
109 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5)); 109 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5));
110 110
111 canvas->clipPath(path, SkRegion::kReplace_Op, true); // AA is on 111 canvas->clipPath(path, SkCanvas::kReplace_Op, true); // AA is on
112 112
113 canvas->drawText("M", 1, 113 canvas->drawText("M", 1,
114 SkIntToScalar(100), SkIntToScalar(100), 114 SkIntToScalar(100), SkIntToScalar(100),
115 paint); 115 paint);
116 116
117 canvas->restore(); 117 canvas->restore();
118 118
119 // Now draw stroked versions of the "M" and the round rect so we can 119 // Now draw stroked versions of the "M" and the round rect so we can
120 // see what is going on 120 // see what is going on
121 SkPaint paint2; 121 SkPaint paint2;
(...skipping 20 matching lines...) Expand all
142 142
143 typedef GM INHERITED; 143 typedef GM INHERITED;
144 }; 144 };
145 145
146 ////////////////////////////////////////////////////////////////////////////// 146 //////////////////////////////////////////////////////////////////////////////
147 147
148 static GM* MyFactory(void*) { return new SamplerStressGM; } 148 static GM* MyFactory(void*) { return new SamplerStressGM; }
149 static GMRegistry reg(MyFactory); 149 static GMRegistry reg(MyFactory);
150 150
151 } 151 }
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | gm/simpleaaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698