Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1974783002: Revert of Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698