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

Side by Side Diff: samplecode/SampleSlides.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 | « 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 /* 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 "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 canvas->restore(); 471 canvas->restore();
472 472
473 canvas->translate(0, SkIntToScalar(250)); 473 canvas->translate(0, SkIntToScalar(250));
474 } 474 }
475 } 475 }
476 476
477 /////////////////////////////////////////////////////////////////////////////// 477 ///////////////////////////////////////////////////////////////////////////////
478 478
479 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) 479 static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p)
480 { 480 {
481 p.setMaskFilter(SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle , 481 p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
482 SkBlurMask::ConvertRadiusToSigma(Sk IntToScalar(3))))->unref(); 482 SkBlurMask::ConvertRadiusToSigma(Sk IntToScalar(3))))->unref();
483 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); 483 rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
484 484
485 p.setMaskFilter(NULL); 485 p.setMaskFilter(NULL);
486 p.setStyle(SkPaint::kStroke_Style); 486 p.setStyle(SkPaint::kStroke_Style);
487 p.setStrokeWidth(SK_Scalar1); 487 p.setStrokeWidth(SK_Scalar1);
488 rastBuilder->addLayer(p); 488 rastBuilder->addLayer(p);
489 489
490 p.setAlpha(0x11); 490 p.setAlpha(0x11);
491 p.setStyle(SkPaint::kFill_Style); 491 p.setStyle(SkPaint::kFill_Style);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 725 }
726 726
727 private: 727 private:
728 typedef SampleView INHERITED; 728 typedef SampleView INHERITED;
729 }; 729 };
730 730
731 ////////////////////////////////////////////////////////////////////////////// 731 //////////////////////////////////////////////////////////////////////////////
732 732
733 static SkView* MyFactory() { return new SlideView; } 733 static SkView* MyFactory() { return new SlideView; }
734 static SkViewRegister reg(MyFactory); 734 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