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

Unified Diff: bench/RefCntBench.cpp

Issue 73643005: Implement a benchmark for GrResourceCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address comments 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
« no previous file with comments | « bench/RTreeBench.cpp ('k') | bench/RegionBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RefCntBench.cpp
diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp
index 0110dbcb1317ebd317f82f9b0cfb03ffbbd8e062..f6ec7339cb40af637e5a42f1bd8e88570bcc2205 100644
--- a/bench/RefCntBench.cpp
+++ b/bench/RefCntBench.cpp
@@ -16,9 +16,10 @@ 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";
@@ -53,9 +54,10 @@ 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";
@@ -79,9 +81,10 @@ 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";
@@ -106,9 +109,10 @@ 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";
@@ -136,9 +140,10 @@ 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";
@@ -162,9 +167,10 @@ 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";
« no previous file with comments | « bench/RTreeBench.cpp ('k') | bench/RegionBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698