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

Side by Side Diff: samplecode/SampleAll.cpp

Issue 253833002: move common blur types into central header (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/effects/SkBlurMaskFilter.h ('k') | samplecode/SampleAnimBlur.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 } 76 }
77 77
78 private: 78 private:
79 SkPMColor fMask; 79 SkPMColor fMask;
80 }; 80 };
81 81
82 /////////////////////////////////////////////////////////// 82 ///////////////////////////////////////////////////////////
83 83
84 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { 84 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) {
85 p.setMaskFilter(SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle , 85 p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
86 SkBlurMask::ConvertRadiusToSigma(Sk IntToScalar(3)), 86 SkBlurMask::ConvertRadiusToSigma(Sk IntToScalar(3)),
87 SkBlurMaskFilter::kNone_BlurFlag))- >unref(); 87 SkBlurMaskFilter::kNone_BlurFlag))- >unref();
88 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); 88 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
89 89
90 p.setMaskFilter(NULL); 90 p.setMaskFilter(NULL);
91 p.setStyle(SkPaint::kStroke_Style); 91 p.setStyle(SkPaint::kStroke_Style);
92 p.setStrokeWidth(SK_Scalar1); 92 p.setStrokeWidth(SK_Scalar1);
93 rastBuilder->addLayer(p); 93 rastBuilder->addLayer(p);
94 94
95 p.setAlpha(0x11); 95 p.setAlpha(0x11);
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 private: 647 private:
648 SkPoint fClickPt; 648 SkPoint fClickPt;
649 SkBitmap fBug, fTb, fTx; 649 SkBitmap fBug, fTb, fTx;
650 typedef SampleView INHERITED; 650 typedef SampleView INHERITED;
651 }; 651 };
652 652
653 ////////////////////////////////////////////////////////////////////////////// 653 //////////////////////////////////////////////////////////////////////////////
654 654
655 static SkView* MyFactory() { return new DemoView; } 655 static SkView* MyFactory() { return new DemoView; }
656 static SkViewRegister reg(MyFactory); 656 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkBlurMaskFilter.h ('k') | samplecode/SampleAnimBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698