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