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

Side by Side Diff: bench/WriterBench.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web 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 | « bench/WritePixelsBench.cpp ('k') | bench/XfermodeBench.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 /* 2 /*
3 * Copyright 2012 The Android Open Source Project 3 * Copyright 2012 The Android Open Source Project
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 8
9 #include "Benchmark.h" 9 #include "Benchmark.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkWriter32.h" 11 #include "SkWriter32.h"
12 12
13 class WriterBench : public Benchmark { 13 class WriterBench : public Benchmark {
14 public: 14 public:
15 bool isSuitableFor(Backend backend) SK_OVERRIDE { 15 bool isSuitableFor(Backend backend) override {
16 return backend == kNonRendering_Backend; 16 return backend == kNonRendering_Backend;
17 } 17 }
18 18
19 protected: 19 protected:
20 const char* onGetName() SK_OVERRIDE { 20 const char* onGetName() override {
21 return "writer"; 21 return "writer";
22 } 22 }
23 23
24 void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { 24 void onDraw(const int loops, SkCanvas*) override {
25 static const char gStr[] = "abcdefghimjklmnopqrstuvwxyz"; 25 static const char gStr[] = "abcdefghimjklmnopqrstuvwxyz";
26 static const size_t gLen = strlen(gStr); 26 static const size_t gLen = strlen(gStr);
27 SkWriter32 writer; 27 SkWriter32 writer;
28 for (int i = 0; i < loops; i++) { 28 for (int i = 0; i < loops; i++) {
29 for (size_t j = 0; j <= gLen; j++) { 29 for (size_t j = 0; j <= gLen; j++) {
30 writer.writeString(gStr, j); 30 writer.writeString(gStr, j);
31 } 31 }
32 } 32 }
33 } 33 }
34 34
35 private: 35 private:
36 typedef Benchmark INHERITED; 36 typedef Benchmark INHERITED;
37 }; 37 };
38 38
39 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
40 40
41 DEF_BENCH( return new WriterBench(); ) 41 DEF_BENCH( return new WriterBench(); )
OLDNEW
« no previous file with comments | « bench/WritePixelsBench.cpp ('k') | bench/XfermodeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698