OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SampleCode.h" | 7 #include "SampleCode.h" |
8 #include "Sk1DPathEffect.h" | 8 #include "Sk1DPathEffect.h" |
9 #include "Sk2DPathEffect.h" | 9 #include "Sk2DPathEffect.h" |
10 #include "SkAlphaThresholdFilter.h" | 10 #include "SkAlphaThresholdFilter.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 paint.setStrokeMiter(make_scalar()); | 508 paint.setStrokeMiter(make_scalar()); |
509 paint.setStrokeCap(make_paint_cap()); | 509 paint.setStrokeCap(make_paint_cap()); |
510 paint.setStrokeJoin(make_paint_join()); | 510 paint.setStrokeJoin(make_paint_join()); |
511 paint.setColorFilter(make_color_filter()); | 511 paint.setColorFilter(make_color_filter()); |
512 paint.setXfermodeMode(make_xfermode()); | 512 paint.setXfermodeMode(make_xfermode()); |
513 paint.setPathEffect(make_path_effect()); | 513 paint.setPathEffect(make_path_effect()); |
514 paint.setMaskFilter(make_mask_filter()); | 514 paint.setMaskFilter(make_mask_filter()); |
515 | 515 |
516 if (false) { | 516 if (false) { |
517 // our validating buffer does not support typefaces yet, so skip this fo
r now | 517 // our validating buffer does not support typefaces yet, so skip this fo
r now |
518 paint.setTypeface(SkTypeface::MakeFromName(make_font_name().c_str(), | 518 SkAutoTUnref<SkTypeface> typeface( |
519 make_typeface_style())); | 519 SkTypeface::CreateFromName(make_font_name().c_str(), make_
typeface_style())); |
| 520 paint.setTypeface(typeface); |
520 } | 521 } |
521 | 522 |
522 SkLayerRasterizer::Builder rasterizerBuilder; | 523 SkLayerRasterizer::Builder rasterizerBuilder; |
523 SkPaint paintForRasterizer; | 524 SkPaint paintForRasterizer; |
524 if (R(2) == 1) { | 525 if (R(2) == 1) { |
525 paintForRasterizer = make_paint(); | 526 paintForRasterizer = make_paint(); |
526 } | 527 } |
527 rasterizerBuilder.addLayer(paintForRasterizer); | 528 rasterizerBuilder.addLayer(paintForRasterizer); |
528 paint.setRasterizer(rasterizerBuilder.detach()); | 529 paint.setRasterizer(rasterizerBuilder.detach()); |
529 paint.setImageFilter(make_image_filter()); | 530 paint.setImageFilter(make_image_filter()); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 } | 831 } |
831 | 832 |
832 private: | 833 private: |
833 typedef SkView INHERITED; | 834 typedef SkView INHERITED; |
834 }; | 835 }; |
835 | 836 |
836 ////////////////////////////////////////////////////////////////////////////// | 837 ////////////////////////////////////////////////////////////////////////////// |
837 | 838 |
838 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 839 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
839 static SkViewRegister reg(MyFactory); | 840 static SkViewRegister reg(MyFactory); |
OLD | NEW |