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

Unified Diff: bench/MemsetBench.cpp

Issue 801413002: fix last warnings on w64 and turn on w.a.e. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix/simplify memset bench name printing Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MemsetBench.cpp
diff --git a/bench/MemsetBench.cpp b/bench/MemsetBench.cpp
index 6a1bd24c84caea2657f01f4076ae3f99b7008962..3e0e8cd6db458eb80dd38392c4baad7ff5f39373 100644
--- a/bench/MemsetBench.cpp
+++ b/bench/MemsetBench.cpp
@@ -14,8 +14,8 @@ class MemsetBench : public Benchmark {
SkString fName;
protected:
- size_t fMinSize;
- size_t fMaxSize;
+ int fMinSize;
+ int fMaxSize;
enum {
kBufferSize = 10000,
VALUE32 = 0x12345678,
@@ -28,12 +28,11 @@ protected:
};
public:
- MemsetBench(MemsetType type, size_t minSize, size_t maxSize) {
+ MemsetBench(MemsetType type, int minSize, int maxSize) {
SkASSERT((minSize < maxSize) && (maxSize <= kBufferSize));
fMinSize = minSize;
fMaxSize = maxSize;
- fName.printf("memset%d_" SK_SIZE_T_SPECIFIER "_" SK_SIZE_T_SPECIFIER,
- type, minSize, maxSize);
+ fName.printf("memset%d_%d_%d", type, minSize, maxSize);
}
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
@@ -60,12 +59,12 @@ private:
class Memset32Bench : public MemsetBench {
uint32_t kBuffer[kBufferSize + 3];
public:
- Memset32Bench(size_t minSize, size_t maxSize)
+ Memset32Bench(int minSize, int maxSize)
: INHERITED(MEMSET32, minSize, maxSize) {}
protected:
virtual void performTest() SK_OVERRIDE {
- for(size_t j = fMinSize; j < fMaxSize; ++j){
+ for(int j = fMinSize; j < fMaxSize; ++j){
sk_memset32(kBuffer, VALUE32, j);
sk_memset32(kBuffer + 1, VALUE32, j);
sk_memset32(kBuffer + 2, VALUE32, j);
@@ -79,12 +78,12 @@ private:
class Memset16Bench : public MemsetBench {
uint16_t kBuffer[kBufferSize + 7];
public:
- Memset16Bench(size_t minSize, size_t maxSize)
+ Memset16Bench(int minSize, int maxSize)
: INHERITED(MEMSET16, minSize, maxSize) {}
protected:
virtual void performTest() SK_OVERRIDE {
- for(size_t j = fMinSize; j < fMaxSize; ++j){
+ for(int j = fMinSize; j < fMaxSize; ++j){
sk_memset16(kBuffer, VALUE16, j);
sk_memset16(kBuffer + 1, VALUE16, j);
sk_memset16(kBuffer + 2, VALUE16, j);
« no previous file with comments | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698