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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « samplecode/SampleFilter2.cpp ('k') | samplecode/SampleFilterQuality.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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 { 304 {
305 SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(make_xfermode())); 305 SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(make_xfermode()));
306 filter = SkXfermodeImageFilter::Create(mode, make_image_filter(), make_i mage_filter()); 306 filter = SkXfermodeImageFilter::Create(mode, make_image_filter(), make_i mage_filter());
307 } 307 }
308 break; 308 break;
309 case OFFSET: 309 case OFFSET:
310 filter = SkOffsetImageFilter::Create(make_scalar(), make_scalar(), make_ image_filter()); 310 filter = SkOffsetImageFilter::Create(make_scalar(), make_scalar(), make_ image_filter());
311 break; 311 break;
312 case MATRIX: 312 case MATRIX:
313 filter = SkMatrixImageFilter::Create(make_matrix(), 313 filter = SkMatrixImageFilter::Create(make_matrix(),
314 (SkPaint::FilterLevel)R(4), 314 (SkFilterQuality)R(4),
315 make_image_filter()); 315 make_image_filter());
316 break; 316 break;
317 case MATRIX_CONVOLUTION: 317 case MATRIX_CONVOLUTION:
318 { 318 {
319 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize), 319 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize),
320 SkIntToScalar(kBitmapSize)) ); 320 SkIntToScalar(kBitmapSize)) );
321 SkISize size = SkISize::Make(R(10)+1, R(10)+1); 321 SkISize size = SkISize::Make(R(10)+1, R(10)+1);
322 int arraySize = size.width() * size.height(); 322 int arraySize = size.width() * size.height();
323 SkTArray<SkScalar> kernel(arraySize); 323 SkTArray<SkScalar> kernel(arraySize);
324 for (int i = 0; i < arraySize; ++i) { 324 for (int i = 0; i < arraySize; ++i) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 514 }
515 515
516 private: 516 private:
517 typedef SkView INHERITED; 517 typedef SkView INHERITED;
518 }; 518 };
519 519
520 ////////////////////////////////////////////////////////////////////////////// 520 //////////////////////////////////////////////////////////////////////////////
521 521
522 static SkView* MyFactory() { return new ImageFilterFuzzView; } 522 static SkView* MyFactory() { return new ImageFilterFuzzView; }
523 static SkViewRegister reg(MyFactory); 523 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFilter2.cpp ('k') | samplecode/SampleFilterQuality.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698