Index: bench/MutexBench.cpp |
diff --git a/bench/MutexBench.cpp b/bench/MutexBench.cpp |
index 6dd4e5346f7dbf11a826431dc41ec3187b2b5448..ba92a43033871c045dd39a3c9e33b7adc6d3cf1b 100644 |
--- a/bench/MutexBench.cpp |
+++ b/bench/MutexBench.cpp |
@@ -24,16 +24,16 @@ protected: |
} |
void onDraw(const int loops, SkCanvas*) override { |
- Mutex mu; |
for (int i = 0; i < loops; i++) { |
- mu.acquire(); |
- mu.release(); |
+ fMu.acquire(); |
+ fMu.release(); |
} |
} |
private: |
typedef Benchmark INHERITED; |
SkString fBenchName; |
+ Mutex fMu; |
}; |
class SharedBench : public Benchmark { |
@@ -48,15 +48,15 @@ protected: |
} |
void onDraw(const int loops, SkCanvas*) override { |
- SkSharedMutex mu; |
for (int i = 0; i < loops; i++) { |
- mu.acquireShared(); |
- mu.releaseShared(); |
+ fMu.acquireShared(); |
+ fMu.releaseShared(); |
} |
} |
private: |
typedef Benchmark INHERITED; |
+ SkSharedMutex fMu; |
}; |
/////////////////////////////////////////////////////////////////////////////// |