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

Unified Diff: bench/RefCntBench.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/RefCntBench.cpp
diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp
index 0110dbcb1317ebd317f82f9b0cfb03ffbbd8e062..731a6f066a57681004ac0080465230b39b4522b9 100644
--- a/bench/RefCntBench.cpp
+++ b/bench/RefCntBench.cpp
@@ -17,8 +17,12 @@ enum {
class RefCntBench_Stack : public SkBenchmark {
public:
RefCntBench_Stack() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_stack";
@@ -54,8 +58,12 @@ SK_DEFINE_INST_COUNT(PlacedRefCnt)
class RefCntBench_Heap : public SkBenchmark {
public:
RefCntBench_Heap() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_heap";
@@ -80,8 +88,12 @@ private:
class RefCntBench_New : public SkBenchmark {
public:
RefCntBench_New() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_new";
@@ -107,8 +119,12 @@ private:
class WeakRefCntBench_Stack : public SkBenchmark {
public:
WeakRefCntBench_Stack() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_stack_weak";
@@ -137,8 +153,12 @@ public:
class WeakRefCntBench_Heap : public SkBenchmark {
public:
WeakRefCntBench_Heap() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_heap_weak";
@@ -163,8 +183,12 @@ private:
class WeakRefCntBench_New : public SkBenchmark {
public:
WeakRefCntBench_New() {
- fIsRendering = false;
}
+
+ virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
+ return backend == kNonRendering_Backend;
+ }
+
protected:
virtual const char* onGetName() {
return "ref_cnt_new_weak";

Powered by Google App Engine
This is Rietveld 408576698