OLD | NEW |
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 "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkInterpolator.h" | 10 #include "SkInterpolator.h" |
11 #include "SkPath.h" | |
12 #include "SkRRect.h" | |
13 #include "SkTime.h" | 11 #include "SkTime.h" |
14 | 12 |
15 // This slide tests out the match up between BW clipping and rendering. It can | 13 // This slide tests out the match up between BW clipping and rendering. It can |
16 // draw a large rect through some clip geometry and draw the same geometry | 14 // draw a large rect through some clip geometry and draw the same geometry |
17 // normally. Which one is drawn first can be toggled. The pair of objects is tra
nslated | 15 // normally. Which one is drawn first can be toggled. The pair of objects is tra
nslated |
18 // fractionally (via an animator) to expose snapping bugs. The key bindings are: | 16 // fractionally (via an animator) to expose snapping bugs. The key bindings are: |
19 // 1-9: the different geometries | 17 // 1-9: the different geometries |
20 // t: toggle which is drawn first the clip or the normal geometry | 18 // t: toggle which is drawn first the clip or the normal geometry |
21 // f: flip-flops which corner the bottom AA clip rect occupies in the com
plex clip cases | 19 // f: flip-flops which corner the bottom AA clip rect occupies in the com
plex clip cases |
22 | 20 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 bool fClipFirst; | 247 bool fClipFirst; |
250 int fSign; | 248 int fSign; |
251 | 249 |
252 typedef SampleView INHERITED; | 250 typedef SampleView INHERITED; |
253 }; | 251 }; |
254 | 252 |
255 ////////////////////////////////////////////////////////////////////////////// | 253 ////////////////////////////////////////////////////////////////////////////// |
256 | 254 |
257 static SkView* MyFactory() { return new ClipDrawMatchView; } | 255 static SkView* MyFactory() { return new ClipDrawMatchView; } |
258 static SkViewRegister reg(MyFactory); | 256 static SkViewRegister reg(MyFactory); |
OLD | NEW |