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

Side by Side Diff: samplecode/SampleSlides.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SampleFuzz.cpp ('k') | samplecode/SampleStrokePath.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 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 #include "SampleCode.h" 7 #include "SampleCode.h"
8 #include "SkBlurMask.h" 8 #include "SkBlurMask.h"
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 canvas->restore(); 455 canvas->restore();
456 456
457 canvas->translate(0, SkIntToScalar(250)); 457 canvas->translate(0, SkIntToScalar(250));
458 } 458 }
459 } 459 }
460 460
461 /////////////////////////////////////////////////////////////////////////////// 461 ///////////////////////////////////////////////////////////////////////////////
462 462
463 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) 463 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
464 { 464 {
465 p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 465 p.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
466 SkBlurMask::ConvertRadiusToSigma(Sk IntToScalar(3))))->unref(); 466 SkBlurMask::ConvertRadiusToSigma(3))) ;
467 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); 467 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
468 468
469 p.setMaskFilter(nullptr); 469 p.setMaskFilter(nullptr);
470 p.setStyle(SkPaint::kStroke_Style); 470 p.setStyle(SkPaint::kStroke_Style);
471 p.setStrokeWidth(SK_Scalar1); 471 p.setStrokeWidth(SK_Scalar1);
472 rastBuilder->addLayer(p); 472 rastBuilder->addLayer(p);
473 473
474 p.setAlpha(0x11); 474 p.setAlpha(0x11);
475 p.setStyle(SkPaint::kFill_Style); 475 p.setStyle(SkPaint::kFill_Style);
476 p.setXfermodeMode(SkXfermode::kSrc_Mode); 476 p.setXfermodeMode(SkXfermode::kSrc_Mode);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 709 }
710 710
711 private: 711 private:
712 typedef SampleView INHERITED; 712 typedef SampleView INHERITED;
713 }; 713 };
714 714
715 ////////////////////////////////////////////////////////////////////////////// 715 //////////////////////////////////////////////////////////////////////////////
716 716
717 static SkView* MyFactory() { return new SlideView; } 717 static SkView* MyFactory() { return new SlideView; }
718 static SkViewRegister reg(MyFactory); 718 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFuzz.cpp ('k') | samplecode/SampleStrokePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698