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

Side by Side Diff: bench/PathIterBench.cpp

Issue 19569012: Turn on -Wall -Wextra on Mac, and fix all the warnings that crop up for /usr/bin/g++ and Clang 3.3. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: nit Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gyp/common_conditions.gypi » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return fName.c_str(); 65 return fName.c_str();
66 } 66 }
67 67
68 virtual void onDraw(SkCanvas*) SK_OVERRIDE { 68 virtual void onDraw(SkCanvas*) SK_OVERRIDE {
69 if (fRaw) { 69 if (fRaw) {
70 for (int i = 0; i < N; ++i) { 70 for (int i = 0; i < N; ++i) {
71 SkPath::RawIter iter(fPath); 71 SkPath::RawIter iter(fPath);
72 SkPath::Verb verb; 72 SkPath::Verb verb;
73 SkPoint pts[4]; 73 SkPoint pts[4];
74 74
75 while ((verb = iter.next(pts)) != SkPath::kDone_Verb); 75 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
76 } 76 }
77 } else { 77 } else {
78 for (int i = 0; i < N; ++i) { 78 for (int i = 0; i < N; ++i) {
79 SkPath::Iter iter(fPath, false); 79 SkPath::Iter iter(fPath, false);
80 SkPath::Verb verb; 80 SkPath::Verb verb;
81 SkPoint pts[4]; 81 SkPoint pts[4];
82 82
83 while ((verb = iter.next(pts)) != SkPath::kDone_Verb); 83 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 private: 88 private:
89 typedef SkBenchmark INHERITED; 89 typedef SkBenchmark INHERITED;
90 }; 90 };
91 91
92 /////////////////////////////////////////////////////////////////////////////// 92 ///////////////////////////////////////////////////////////////////////////////
93 93
94 static SkBenchmark* F0(void* p) { return new PathIterBench(p, false); } 94 static SkBenchmark* F0(void* p) { return new PathIterBench(p, false); }
95 static SkBenchmark* F1(void* p) { return new PathIterBench(p, true); } 95 static SkBenchmark* F1(void* p) { return new PathIterBench(p, true); }
96 96
97 static BenchRegistry gR0(F0); 97 static BenchRegistry gR0(F0);
98 static BenchRegistry gR1(F1); 98 static BenchRegistry gR1(F1);
OLDNEW
« no previous file with comments | « no previous file | gyp/common_conditions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698