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

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: 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
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; 24 #if SK_SUPPORT_GPU
25 fContext = NULL;
26 #endif
25 fOrMask = fClearMask = 0; 27 fOrMask = fClearMask = 0;
26 fLoops = 1; 28 fLoops = 1;
27 } 29 }
28 30
29 const char* SkBenchmark::getName() { 31 const char* SkBenchmark::getName() {
30 return this->onGetName(); 32 return this->onGetName();
31 } 33 }
32 34
33 SkIPoint SkBenchmark::getSize() { 35 SkIPoint SkBenchmark::getSize() {
34 return this->onGetSize(); 36 return this->onGetSize();
(...skipping 23 matching lines...) Expand all
58 paint->setDither(SkTriState::kTrue == fDither); 60 paint->setDither(SkTriState::kTrue == fDither);
59 } 61 }
60 } 62 }
61 63
62 64
63 /////////////////////////////////////////////////////////////////////////////// 65 ///////////////////////////////////////////////////////////////////////////////
64 66
65 SkIPoint SkBenchmark::onGetSize() { 67 SkIPoint SkBenchmark::onGetSize() {
66 return SkIPoint::Make(640, 480); 68 return SkIPoint::Make(640, 480);
67 } 69 }
OLDNEW
« bench/SkBenchmark.h ('K') | « bench/SkBenchmark.h ('k') | bench/SkipZeroesBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698