| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCullPoints.h" | 10 #include "SkCullPoints.h" |
| 11 #include "SkPath.h" | |
| 12 #include "SkRandom.h" | 11 #include "SkRandom.h" |
| 13 | 12 |
| 14 static void test_hittest(SkCanvas* canvas, const SkPath& path) { | 13 static void test_hittest(SkCanvas* canvas, const SkPath& path) { |
| 15 SkPaint paint; | 14 SkPaint paint; |
| 16 SkRect r = path.getBounds(); | 15 SkRect r = path.getBounds(); |
| 17 | 16 |
| 18 paint.setColor(SK_ColorRED); | 17 paint.setColor(SK_ColorRED); |
| 19 canvas->drawPath(path, paint); | 18 canvas->drawPath(path, paint); |
| 20 | 19 |
| 21 const SkScalar MARGIN = SkIntToScalar(4); | 20 const SkScalar MARGIN = SkIntToScalar(4); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 72 } |
| 74 | 73 |
| 75 private: | 74 private: |
| 76 typedef GM INHERITED; | 75 typedef GM INHERITED; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 ////////////////////////////////////////////////////////////////////////////// | 78 ////////////////////////////////////////////////////////////////////////////// |
| 80 | 79 |
| 81 static skiagm::GM* MyFactory(void*) { return new HitTestPathGM; } | 80 static skiagm::GM* MyFactory(void*) { return new HitTestPathGM; } |
| 82 static skiagm::GMRegistry reg(MyFactory); | 81 static skiagm::GMRegistry reg(MyFactory); |
| OLD | NEW |