aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
Diffstat (limited to 'bench')
-rw-r--r--bench/ChartBench.cpp2
-rw-r--r--bench/ETCBitmapBench.cpp2
-rw-r--r--bench/GrResourceCacheBench.cpp4
-rw-r--r--bench/HairlinePathBench.cpp2
-rw-r--r--bench/ResultsWriter.h4
-rw-r--r--bench/XfermodeBench.cpp4
-rw-r--r--bench/nanobench.cpp2
7 files changed, 10 insertions, 10 deletions
diff --git a/bench/ChartBench.cpp b/bench/ChartBench.cpp
index f33d2da398..8d05ef179a 100644
--- a/bench/ChartBench.cpp
+++ b/bench/ChartBench.cpp
@@ -64,7 +64,7 @@ static void gen_paths(const SkTDArray<SkScalar>& topData,
x += xDelta;
}
- if (NULL != bottomData) {
+ if (bottomData) {
SkASSERT(bottomData->count() == topData.count());
// iterate backwards over the previous graph's data to generate the bottom of the filled
// area (and account for leftShift).
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp
index 529f5f69da..36573c8245 100644
--- a/bench/ETCBitmapBench.cpp
+++ b/bench/ETCBitmapBench.cpp
@@ -21,7 +21,7 @@
// This takes the etc1 data pointed to by orig, and copies it `factor` times in each
// dimension. The return value is the new data or NULL on error.
static etc1_byte* create_expanded_etc1_bitmap(const uint8_t* orig, int factor) {
- SkASSERT(NULL != orig);
+ SkASSERT(orig);
SkASSERT(factor > 1);
const etc1_byte* origData = reinterpret_cast<const etc1_byte*>(orig);
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 068aff22d4..d86ccf4b0b 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -146,7 +146,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
desc.fHeight |= 1;
GrResourceKey key = TextureResource::ComputeKey(desc);
GrGpuResource* item = cache->find(key);
- if (NULL != item) {
+ if (item) {
SkFAIL("cache add does not work as expected");
return;
}
@@ -157,7 +157,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
h |= 1;
GrResourceKey key = StencilResource::ComputeKey(w, h, s);
GrGpuResource* item = cache->find(key);
- if (NULL != item) {
+ if (item) {
SkFAIL("cache add does not work as expected");
return;
}
diff --git a/bench/HairlinePathBench.cpp b/bench/HairlinePathBench.cpp
index e7e2b428e8..7b413c4677 100644
--- a/bench/HairlinePathBench.cpp
+++ b/bench/HairlinePathBench.cpp
@@ -181,7 +181,7 @@ public:
#if SK_SUPPORT_GPU
GrContext* context = canvas->getGrContext();
// This is a workaround for skbug.com/2078. See also skbug.com/2033.
- if (NULL != context) {
+ if (context) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (tt.target()->caps()->pathRenderingSupport()) {
diff --git a/bench/ResultsWriter.h b/bench/ResultsWriter.h
index 56283732ec..f17bce3d93 100644
--- a/bench/ResultsWriter.h
+++ b/bench/ResultsWriter.h
@@ -98,7 +98,7 @@ public:
fBench = &fResults[id.c_str()];
}
virtual void config(const char name[]) {
- SkASSERT(NULL != fBench);
+ SkASSERT(fBench);
fConfig = &(*fBench)[name];
}
virtual void configOption(const char name[], const char* value) {
@@ -109,7 +109,7 @@ public:
if (sk_double_isnan(ms)) {
return;
}
- SkASSERT(NULL != fConfig);
+ SkASSERT(fConfig);
(*fConfig)[name] = ms;
}
diff --git a/bench/XfermodeBench.cpp b/bench/XfermodeBench.cpp
index f73943bcf7..54272daf9b 100644
--- a/bench/XfermodeBench.cpp
+++ b/bench/XfermodeBench.cpp
@@ -18,12 +18,12 @@ class XfermodeBench : public Benchmark {
public:
XfermodeBench(SkXfermode::Mode mode) {
fXfermode.reset(SkXfermode::Create(mode));
- SkASSERT(NULL != fXfermode.get() || SkXfermode::kSrcOver_Mode == mode);
+ SkASSERT(fXfermode.get() || SkXfermode::kSrcOver_Mode == mode);
fName.printf("Xfermode_%s", SkXfermode::ModeName(mode));
}
XfermodeBench(SkXfermode* xferMode, const char* name) {
- SkASSERT(NULL != xferMode);
+ SkASSERT(xferMode);
fXfermode.reset(xferMode);
fName.printf("Xfermode_%s", name);
}
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index ea62570ea0..452da1f083 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -619,7 +619,7 @@ int nanobench_main() {
#endif
cpu_bench( overhead, bench.get(), canvas, samples.get());
- if (canvas && !FLAGS_writePath.isEmpty() && NULL != FLAGS_writePath[0]) {
+ if (canvas && !FLAGS_writePath.isEmpty() && FLAGS_writePath[0]) {
SkString pngFilename = SkOSPath::Join(FLAGS_writePath[0], config);
pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getName());
pngFilename.append(".png");