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

Side by Side Diff: tools/imgblur.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/gpuveto.cpp ('k') | tools/imgslice.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 2015 Google Inc. 2 * Copyright 2015 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 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkCommonFlags.h" 10 #include "SkCommonFlags.h"
(...skipping 19 matching lines...) Expand all
30 30
31 int tool_main(int argc, char** argv); 31 int tool_main(int argc, char** argv);
32 int tool_main(int argc, char** argv) { 32 int tool_main(int argc, char** argv) {
33 SkCommandLineFlags::SetUsage("Brute force blur of an image."); 33 SkCommandLineFlags::SetUsage("Brute force blur of an image.");
34 SkCommandLineFlags::Parse(argc, argv); 34 SkCommandLineFlags::Parse(argc, argv);
35 35
36 if (FLAGS_sigma <= 0) { 36 if (FLAGS_sigma <= 0) {
37 if (!FLAGS_quiet) { 37 if (!FLAGS_quiet) {
38 SkDebugf("Sigma must be greater than zero (it is %f).\n", FLAGS_sigm a); 38 SkDebugf("Sigma must be greater than zero (it is %f).\n", FLAGS_sigm a);
39 } 39 }
40 return kError; 40 return kError;
41 } 41 }
42 42
43 sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_in[0])); 43 sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_in[0]));
44 if (nullptr == data) { 44 if (nullptr == data) {
45 if (!FLAGS_quiet) { 45 if (!FLAGS_quiet) {
46 SkDebugf("Couldn't open file: %s\n", FLAGS_in[0]); 46 SkDebugf("Couldn't open file: %s\n", FLAGS_in[0]);
47 } 47 }
48 return kError; 48 return kError;
49 } 49 }
50 50
(...skipping 12 matching lines...) Expand all
63 } 63 }
64 return kError; 64 return kError;
65 } 65 }
66 66
67 SkBitmap dst = sk_tool_utils::slow_blur(src, (float) FLAGS_sigma); 67 SkBitmap dst = sk_tool_utils::slow_blur(src, (float) FLAGS_sigma);
68 68
69 if (!SkImageEncoder::EncodeFile(FLAGS_out[0], dst, SkImageEncoder::kPNG_Type , 100)) { 69 if (!SkImageEncoder::EncodeFile(FLAGS_out[0], dst, SkImageEncoder::kPNG_Type , 100)) {
70 if (!FLAGS_quiet) { 70 if (!FLAGS_quiet) {
71 SkDebugf("Couldn't write to file: %s\n", FLAGS_out[0]); 71 SkDebugf("Couldn't write to file: %s\n", FLAGS_out[0]);
72 } 72 }
73 return kError; 73 return kError;
74 } 74 }
75 75
76 return kSuccess; 76 return kSuccess;
77 } 77 }
78 78
79 #if !defined SK_BUILD_FOR_IOS 79 #if !defined SK_BUILD_FOR_IOS
80 int main(int argc, char * const argv[]) { 80 int main(int argc, char * const argv[]) {
81 return tool_main(argc, (char**) argv); 81 return tool_main(argc, (char**) argv);
82 } 82 }
83 #endif 83 #endif
OLDNEW
« no previous file with comments | « tools/gpuveto.cpp ('k') | tools/imgslice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698