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