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

Side by Side Diff: tools/chrome_fuzz.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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 | « tools/bench_pictures_main.cpp ('k') | tools/create_test_font.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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "SkCanvas.h" 5 #include "SkCanvas.h"
6 #include "SkFlattenableSerialization.h" 6 #include "SkFlattenableSerialization.h"
7 #include "SkImageFilter.h" 7 #include "SkImageFilter.h"
8 #include "SkOSFile.h" 8 #include "SkOSFile.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 10
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 static void run_test_case(const SkString& testdata, const SkBitmap& bitmap, 29 static void run_test_case(const SkString& testdata, const SkBitmap& bitmap,
30 SkCanvas* canvas) { 30 SkCanvas* canvas) {
31 // This call shouldn't crash or cause ASAN to flag any memory issues 31 // This call shouldn't crash or cause ASAN to flag any memory issues
32 // If nothing bad happens within this call, everything is fine 32 // If nothing bad happens within this call, everything is fine
33 SkFlattenable* flattenable = SkValidatingDeserializeFlattenable( 33 SkFlattenable* flattenable = SkValidatingDeserializeFlattenable(
34 testdata.c_str(), testdata.size(), SkImageFilter::GetFlattenableType()); 34 testdata.c_str(), testdata.size(), SkImageFilter::GetFlattenableType());
35 35
36 // Adding some info, but the test passed if we got here without any trouble 36 // Adding some info, but the test passed if we got here without any trouble
37 if (flattenable != NULL) { 37 if (flattenable != nullptr) {
38 SkDebugf("Valid stream detected.\n"); 38 SkDebugf("Valid stream detected.\n");
39 // Let's see if using the filters can cause any trouble... 39 // Let's see if using the filters can cause any trouble...
40 SkPaint paint; 40 SkPaint paint;
41 paint.setImageFilter(static_cast<SkImageFilter*>(flattenable))->unref(); 41 paint.setImageFilter(static_cast<SkImageFilter*>(flattenable))->unref();
42 canvas->save(); 42 canvas->save();
43 canvas->clipRect(SkRect::MakeXYWH( 43 canvas->clipRect(SkRect::MakeXYWH(
44 0, 0, SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize))); 44 0, 0, SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)));
45 45
46 // This call shouldn't crash or cause ASAN to flag any memory issues 46 // This call shouldn't crash or cause ASAN to flag any memory issues
47 // If nothing bad happens within this call, everything is fine 47 // If nothing bad happens within this call, everything is fine
(...skipping 25 matching lines...) Expand all
73 canvas.clear(0x00000000); 73 canvas.clear(0x00000000);
74 for (int i = 1; i < argc; i++) 74 for (int i = 1; i < argc; i++)
75 if (!read_and_run_test_case(argv[i], bitmap, &canvas)) 75 if (!read_and_run_test_case(argv[i], bitmap, &canvas))
76 ret = 2; 76 ret = 2;
77 // Cluster-Fuzz likes "#EOF" as the last line of output to help distinguish 77 // Cluster-Fuzz likes "#EOF" as the last line of output to help distinguish
78 // successful runs from crashes. 78 // successful runs from crashes.
79 SkDebugf("#EOF\n"); 79 SkDebugf("#EOF\n");
80 return ret; 80 return ret;
81 } 81 }
82 82
OLDNEW
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/create_test_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698