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

Side by Side Diff: samplecode/SampleSlides.cpp

Issue 23701006: Push sigma-based blur interface into our GMs/benches/tests/samplecode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Cleaned up Created 7 years, 3 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
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(SkBlurMaskFilter::kNormal_BlurStyle ,
481 SkBlurMaskFilter::kNormal_BlurStyle ))->unref(); 481 SkFloatToScalar(2.23205f)))->unref( );
482 rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); 482 rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
483 483
484 p.setMaskFilter(NULL); 484 p.setMaskFilter(NULL);
485 p.setStyle(SkPaint::kStroke_Style); 485 p.setStyle(SkPaint::kStroke_Style);
486 p.setStrokeWidth(SK_Scalar1); 486 p.setStrokeWidth(SK_Scalar1);
487 rast->addLayer(p); 487 rast->addLayer(p);
488 488
489 p.setAlpha(0x11); 489 p.setAlpha(0x11);
490 p.setStyle(SkPaint::kFill_Style); 490 p.setStyle(SkPaint::kFill_Style);
491 p.setXfermodeMode(SkXfermode::kSrc_Mode); 491 p.setXfermodeMode(SkXfermode::kSrc_Mode);
(...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

Powered by Google App Engine
This is Rietveld 408576698