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

Side by Side Diff: samplecode/SampleSlides.cpp

Issue 21835004: Blur refactoring (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: hide constant Created 7 years, 4 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
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 "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 /////////////////////////////////////////////////////////////////////////////// 472 ///////////////////////////////////////////////////////////////////////////////
473 473
474 #include "SkGradientShader.h" 474 #include "SkGradientShader.h"
475 #include "SkLayerRasterizer.h" 475 #include "SkLayerRasterizer.h"
476 #include "SkBlurMaskFilter.h" 476 #include "SkBlurMaskFilter.h"
477 477
478 static void r0(SkLayerRasterizer* rast, SkPaint& p) 478 static void r0(SkLayerRasterizer* rast, SkPaint& p)
479 { 479 {
480 p.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(3), 480 p.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(3),
481 SkBlurMaskFilter::kNormal_BlurStyle ))->unref(); 481 SkBlurMaskFilter::kNormal_BlurStyle ,
482 SkBlurMaskFilter::kNone_BlurFlag))- >unref();
482 rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); 483 rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
483 484
484 p.setMaskFilter(NULL); 485 p.setMaskFilter(NULL);
485 p.setStyle(SkPaint::kStroke_Style); 486 p.setStyle(SkPaint::kStroke_Style);
486 p.setStrokeWidth(SK_Scalar1); 487 p.setStrokeWidth(SK_Scalar1);
487 rast->addLayer(p); 488 rast->addLayer(p);
488 489
489 p.setAlpha(0x11); 490 p.setAlpha(0x11);
490 p.setStyle(SkPaint::kFill_Style); 491 p.setStyle(SkPaint::kFill_Style);
491 p.setXfermodeMode(SkXfermode::kSrc_Mode); 492 p.setXfermodeMode(SkXfermode::kSrc_Mode);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 726 }
726 727
727 private: 728 private:
728 typedef SampleView INHERITED; 729 typedef SampleView INHERITED;
729 }; 730 };
730 731
731 ////////////////////////////////////////////////////////////////////////////// 732 //////////////////////////////////////////////////////////////////////////////
732 733
733 static SkView* MyFactory() { return new SlideView; } 734 static SkView* MyFactory() { return new SlideView; }
734 static SkViewRegister reg(MyFactory); 735 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698