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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. 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
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleFontScalerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SkAutoTUnref<SkTypeface> typeface( 518 paint.setTypeface(SkTypeface::MakeFromName(make_font_name().c_str(),
519 SkTypeface::CreateFromName(make_font_name().c_str(), make_ typeface_style())); 519 make_typeface_style()));
520 paint.setTypeface(typeface);
521 } 520 }
522 521
523 SkLayerRasterizer::Builder rasterizerBuilder; 522 SkLayerRasterizer::Builder rasterizerBuilder;
524 SkPaint paintForRasterizer; 523 SkPaint paintForRasterizer;
525 if (R(2) == 1) { 524 if (R(2) == 1) {
526 paintForRasterizer = make_paint(); 525 paintForRasterizer = make_paint();
527 } 526 }
528 rasterizerBuilder.addLayer(paintForRasterizer); 527 rasterizerBuilder.addLayer(paintForRasterizer);
529 paint.setRasterizer(rasterizerBuilder.detach()); 528 paint.setRasterizer(rasterizerBuilder.detach());
530 paint.setImageFilter(make_image_filter()); 529 paint.setImageFilter(make_image_filter());
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 } 830 }
832 831
833 private: 832 private:
834 typedef SkView INHERITED; 833 typedef SkView INHERITED;
835 }; 834 };
836 835
837 ////////////////////////////////////////////////////////////////////////////// 836 //////////////////////////////////////////////////////////////////////////////
838 837
839 static SkView* MyFactory() { return new ImageFilterFuzzView; } 838 static SkView* MyFactory() { return new ImageFilterFuzzView; }
840 static SkViewRegister reg(MyFactory); 839 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleFontScalerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698