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

Side by Side Diff: bench/SkBenchmark.cpp

Issue 73643005: Implement a benchmark for GrResourceCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address comments Created 7 years, 1 month 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 | « bench/SkBenchmark.h ('k') | bench/SkipZeroesBench.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBenchmark.h" 7 #include "SkBenchmark.h"
8 #include "SkPaint.h" 8 #include "SkPaint.h"
9 #include "SkParse.h" 9 #include "SkParse.h"
10 10
11 const char* SkTriState::Name[] = { "default", "true", "false" }; 11 const char* SkTriState::Name[] = { "default", "true", "false" };
12 12
13 SK_DEFINE_INST_COUNT(SkBenchmark) 13 SK_DEFINE_INST_COUNT(SkBenchmark)
14 14
15 template BenchRegistry* BenchRegistry::gHead; 15 template BenchRegistry* BenchRegistry::gHead;
16 16
17 SkString SkBenchmark::gResourcePath; 17 SkString SkBenchmark::gResourcePath;
18 18
19 SkBenchmark::SkBenchmark() { 19 SkBenchmark::SkBenchmark() {
20 fForceAlpha = 0xFF; 20 fForceAlpha = 0xFF;
21 fForceAA = true; 21 fForceAA = true;
22 fForceFilter = false; 22 fForceFilter = false;
23 fDither = SkTriState::kDefault; 23 fDither = SkTriState::kDefault;
24 fIsRendering = true;
25 fOrMask = fClearMask = 0; 24 fOrMask = fClearMask = 0;
26 fLoops = 1; 25 fLoops = 1;
27 } 26 }
28 27
29 const char* SkBenchmark::getName() { 28 const char* SkBenchmark::getName() {
30 return this->onGetName(); 29 return this->onGetName();
31 } 30 }
32 31
33 SkIPoint SkBenchmark::getSize() { 32 SkIPoint SkBenchmark::getSize() {
34 return this->onGetSize(); 33 return this->onGetSize();
(...skipping 23 matching lines...) Expand all
58 paint->setDither(SkTriState::kTrue == fDither); 57 paint->setDither(SkTriState::kTrue == fDither);
59 } 58 }
60 } 59 }
61 60
62 61
63 /////////////////////////////////////////////////////////////////////////////// 62 ///////////////////////////////////////////////////////////////////////////////
64 63
65 SkIPoint SkBenchmark::onGetSize() { 64 SkIPoint SkBenchmark::onGetSize() {
66 return SkIPoint::Make(640, 480); 65 return SkIPoint::Make(640, 480);
67 } 66 }
OLDNEW
« no previous file with comments | « bench/SkBenchmark.h ('k') | bench/SkipZeroesBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698