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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 407203002: Remove the single-sigma version of SkDropShadowImageFilter::Create(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « include/effects/SkDropShadowImageFilter.h ('k') | src/effects/SkDropShadowImageFilter.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 2013 Google Inc. 2 * Copyright 2013 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 "SkAlphaThresholdFilter.h" 8 #include "SkAlphaThresholdFilter.h"
9 #include "SkBitmapSource.h" 9 #include "SkBitmapSource.h"
10 #include "SkBlurImageFilter.h" 10 #include "SkBlurImageFilter.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 make_scalar(true), make_scalar(true), R(10.0f), make_scalar()) : 334 make_scalar(true), make_scalar(true), R(10.0f), make_scalar()) :
335 SkPerlinNoiseShader::CreateTurbulence( 335 SkPerlinNoiseShader::CreateTurbulence(
336 make_scalar(true), make_scalar(true), R(10.0f), make_scalar())); 336 make_scalar(true), make_scalar(true), R(10.0f), make_scalar()));
337 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize), 337 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize),
338 SkIntToScalar(kBitmapSize)) ); 338 SkIntToScalar(kBitmapSize)) );
339 filter = SkRectShaderImageFilter::Create(shader, &cropR); 339 filter = SkRectShaderImageFilter::Create(shader, &cropR);
340 } 340 }
341 break; 341 break;
342 case DROP_SHADOW: 342 case DROP_SHADOW:
343 filter = SkDropShadowImageFilter::Create(make_scalar(), make_scalar(), 343 filter = SkDropShadowImageFilter::Create(make_scalar(), make_scalar(),
344 make_scalar(true), make_color(), make_image_filter()); 344 make_scalar(true), make_scalar(true), make_color(), make_im age_filter());
345 break; 345 break;
346 case MORPHOLOGY: 346 case MORPHOLOGY:
347 if (R(2) == 1) { 347 if (R(2) == 1) {
348 filter = SkDilateImageFilter::Create(R(static_cast<float>(kBitmapSiz e)), 348 filter = SkDilateImageFilter::Create(R(static_cast<float>(kBitmapSiz e)),
349 R(static_cast<float>(kBitmapSize)), make_image_filter()); 349 R(static_cast<float>(kBitmapSize)), make_image_filter());
350 } else { 350 } else {
351 filter = SkErodeImageFilter::Create(R(static_cast<float>(kBitmapSize )), 351 filter = SkErodeImageFilter::Create(R(static_cast<float>(kBitmapSize )),
352 R(static_cast<float>(kBitmapSize)), make_image_filter()); 352 R(static_cast<float>(kBitmapSize)), make_image_filter());
353 } 353 }
354 break; 354 break;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 private: 475 private:
476 typedef SkView INHERITED; 476 typedef SkView INHERITED;
477 }; 477 };
478 478
479 ////////////////////////////////////////////////////////////////////////////// 479 //////////////////////////////////////////////////////////////////////////////
480 480
481 static SkView* MyFactory() { return new ImageFilterFuzzView; } 481 static SkView* MyFactory() { return new ImageFilterFuzzView; }
482 static SkViewRegister reg(MyFactory); 482 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698