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 "SkView.h" | 9 #include "SkView.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 } | 612 } |
613 return true; | 613 return true; |
614 } | 614 } |
615 | 615 |
616 #include "SkGraphics.h" | 616 #include "SkGraphics.h" |
617 #include "SkSurface.h" | 617 #include "SkSurface.h" |
618 #include "SkTaskGroup.h" | 618 #include "SkTaskGroup.h" |
619 #include "SkTDArray.h" | 619 #include "SkTDArray.h" |
620 | 620 |
621 static void path_fuzz_stroker(SkBitmap* bitmap, int seed) { | 621 static void path_fuzz_stroker(SkBitmap* bitmap, int seed) { |
622 sk_parallel_for(100, [&](int i) { | 622 SkTaskGroup().batch(100, [&](int i) { |
623 int localSeed = seed + i; | 623 int localSeed = seed + i; |
624 | 624 |
625 FuzzPath fuzzPath; | 625 FuzzPath fuzzPath; |
626 fuzzPath.setStrokeOnly(); | 626 fuzzPath.setStrokeOnly(); |
627 fuzzPath.setSeed(localSeed); | 627 fuzzPath.setSeed(localSeed); |
628 fuzzPath.randomize(); | 628 fuzzPath.randomize(); |
629 const SkPath& path = fuzzPath.getPath(); | 629 const SkPath& path = fuzzPath.getPath(); |
630 const SkPaint& paint = fuzzPath.getPaint(); | 630 const SkPaint& paint = fuzzPath.getPaint(); |
631 const SkImageInfo& info = bitmap->info(); | 631 const SkImageInfo& info = bitmap->info(); |
632 SkCanvas* canvas( | 632 SkCanvas* canvas( |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 SkBitmap offscreen; | 693 SkBitmap offscreen; |
694 FuzzPath fuzzPath; | 694 FuzzPath fuzzPath; |
695 bool fOneDraw; | 695 bool fOneDraw; |
696 typedef SkView INHERITED; | 696 typedef SkView INHERITED; |
697 }; | 697 }; |
698 | 698 |
699 static SkView* MyFactory() { return new PathFuzzView; } | 699 static SkView* MyFactory() { return new PathFuzzView; } |
700 static SkViewRegister reg(MyFactory); | 700 static SkViewRegister reg(MyFactory); |
701 | 701 |
702 | 702 |
OLD | NEW |