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

Side by Side Diff: gm/samplerstress.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 SkRect temp; 109 SkRect temp;
110 temp.set(SkIntToScalar(115), 110 temp.set(SkIntToScalar(115),
111 SkIntToScalar(75), 111 SkIntToScalar(75),
112 SkIntToScalar(144), 112 SkIntToScalar(144),
113 SkIntToScalar(110)); 113 SkIntToScalar(110));
114 114
115 SkPath path; 115 SkPath path;
116 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5)); 116 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5));
117 117
118 canvas->clipPath(path, SkRegion::kReplace_Op, true); // AA is on 118 canvas->legacyClipPath(path, SkRegion::kReplace_Op, true); // AA is on
119 119
120 canvas->drawText("M", 1, 120 canvas->drawText("M", 1,
121 SkIntToScalar(100), SkIntToScalar(100), 121 SkIntToScalar(100), SkIntToScalar(100),
122 paint); 122 paint);
123 123
124 canvas->restore(); 124 canvas->restore();
125 125
126 // Now draw stroked versions of the "M" and the round rect so we can 126 // Now draw stroked versions of the "M" and the round rect so we can
127 // see what is going on 127 // see what is going on
128 SkPaint paint2; 128 SkPaint paint2;
(...skipping 19 matching lines...) Expand all
148 148
149 typedef GM INHERITED; 149 typedef GM INHERITED;
150 }; 150 };
151 151
152 ////////////////////////////////////////////////////////////////////////////// 152 //////////////////////////////////////////////////////////////////////////////
153 153
154 static GM* MyFactory(void*) { return new SamplerStressGM; } 154 static GM* MyFactory(void*) { return new SamplerStressGM; }
155 static GMRegistry reg(MyFactory); 155 static GMRegistry reg(MyFactory);
156 156
157 } 157 }
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