OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkGMBench.h" | 8 #include "SkGMBench.h" |
9 | 9 |
10 SkGMBench::SkGMBench(skiagm::GM* gm) : fGM(gm) { | 10 SkGMBench::SkGMBench(skiagm::GM* gm) : fGM(gm) { |
11 fName.printf("GM:%s", gm->shortName()); | 11 fName.printf("GM:%s", gm->getName()); |
12 } | 12 } |
13 | 13 |
14 SkGMBench::~SkGMBench() { delete fGM; } | 14 SkGMBench::~SkGMBench() { delete fGM; } |
15 | 15 |
16 const char* SkGMBench::onGetName() { | 16 const char* SkGMBench::onGetName() { |
17 return fName.c_str(); | 17 return fName.c_str(); |
18 } | 18 } |
19 | 19 |
20 bool SkGMBench::isSuitableFor(Backend backend) { | 20 bool SkGMBench::isSuitableFor(Backend backend) { |
21 uint32_t flags = fGM->getFlags(); | 21 uint32_t flags = fGM->getFlags(); |
(...skipping 20 matching lines...) Expand all Loading... |
42 fGM->drawBackground(canvas); | 42 fGM->drawBackground(canvas); |
43 for (int i = 0; i < loops; ++i) { | 43 for (int i = 0; i < loops; ++i) { |
44 fGM->drawContent(canvas); | 44 fGM->drawContent(canvas); |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 SkIPoint SkGMBench::onGetSize() { | 48 SkIPoint SkGMBench::onGetSize() { |
49 SkISize size = fGM->getISize(); | 49 SkISize size = fGM->getISize(); |
50 return SkIPoint::Make(size.fWidth, size.fHeight); | 50 return SkIPoint::Make(size.fWidth, size.fHeight); |
51 } | 51 } |
OLD | NEW |