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

Unified Diff: bench/GrMemoryPoolBench.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 side-by-side diff with in-line comments
Download patch
Index: bench/GrMemoryPoolBench.cpp
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index 0adf92abaa6f2f49ade2f7a6f5b056401a56c763..9eec19293e8cda7a8180e3bbdf2c556cc51edb19 100644
--- a/bench/GrMemoryPoolBench.cpp
+++ b/bench/GrMemoryPoolBench.cpp
@@ -33,8 +33,12 @@ GrMemoryPool A::gPool(10 * (1 << 10), 10 * (1 << 10));
class GrMemoryPoolBenchStack : public SkBenchmark {
public:
GrMemoryPoolBenchStack() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "grmemorypool_stack";
@@ -84,8 +88,12 @@ private:
class GrMemoryPoolBenchRandom : public SkBenchmark {
public:
GrMemoryPoolBenchRandom() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "grmemorypool_random";
@@ -121,8 +129,12 @@ class GrMemoryPoolBenchQueue : public SkBenchmark {
};
public:
GrMemoryPoolBenchQueue() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "grmemorypool_queue";

Powered by Google App Engine
This is Rietveld 408576698