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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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
« no previous file with comments | « samplecode/SampleChart.cpp ('k') | samplecode/SampleTiling.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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 static void do_fuzz(SkCanvas* canvas) { 428 static void do_fuzz(SkCanvas* canvas) {
429 SkImageFilter* filter = make_serialized_image_filter(); 429 SkImageFilter* filter = make_serialized_image_filter();
430 430
431 #ifdef SK_FUZZER_IS_VERBOSE 431 #ifdef SK_FUZZER_IS_VERBOSE
432 static uint32_t numFilters = 0; 432 static uint32_t numFilters = 0;
433 static uint32_t numValidFilters = 0; 433 static uint32_t numValidFilters = 0;
434 if (0 == numFilters) { 434 if (0 == numFilters) {
435 printf("Fuzzing with %u\n", kSeed); 435 printf("Fuzzing with %u\n", kSeed);
436 } 436 }
437 numFilters++; 437 numFilters++;
438 if (NULL != filter) { 438 if (filter) {
439 numValidFilters++; 439 numValidFilters++;
440 } 440 }
441 printf("Filter no : %u. Valid filters so far : %u\r", numFilters, numValidFi lters); 441 printf("Filter no : %u. Valid filters so far : %u\r", numFilters, numValidFi lters);
442 fflush(stdout); 442 fflush(stdout);
443 #endif 443 #endif
444 444
445 SkPaint paint; 445 SkPaint paint;
446 SkSafeUnref(paint.setImageFilter(filter)); 446 SkSafeUnref(paint.setImageFilter(filter));
447 drawClippedBitmap(canvas, 0, 0, paint); 447 drawClippedBitmap(canvas, 0, 0, paint);
448 } 448 }
(...skipping 26 matching lines...) Expand all
475 } 475 }
476 476
477 private: 477 private:
478 typedef SkView INHERITED; 478 typedef SkView INHERITED;
479 }; 479 };
480 480
481 ////////////////////////////////////////////////////////////////////////////// 481 //////////////////////////////////////////////////////////////////////////////
482 482
483 static SkView* MyFactory() { return new ImageFilterFuzzView; } 483 static SkView* MyFactory() { return new ImageFilterFuzzView; }
484 static SkViewRegister reg(MyFactory); 484 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleChart.cpp ('k') | samplecode/SampleTiling.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698