aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-09-05 13:34:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-05 13:34:00 -0700
commit49f085dddff10473b6ebf832a974288300224e60 (patch)
tree308a3cac5e1fb053c9e27e7d07213d72eaa05409 /samplecode
parent7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff)
"NULL !=" = NULL
R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp4
-rw-r--r--samplecode/SampleChart.cpp2
-rw-r--r--samplecode/SampleFilterFuzz.cpp2
-rw-r--r--samplecode/SampleTiling.cpp8
4 files changed, 8 insertions, 8 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 9c9b34384c..9d7e727ce5 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -274,7 +274,7 @@ public:
virtual SkCanvas* createCanvas(SampleWindow::DeviceType dType,
SampleWindow* win) {
#if SK_SUPPORT_GPU
- if (IsGpuDeviceType(dType) && NULL != fCurContext) {
+ if (IsGpuDeviceType(dType) && fCurContext) {
SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(fCurRenderTarget));
return new SkCanvas(device);
} else
@@ -2053,7 +2053,7 @@ void SampleWindow::updateTitle() {
#if SK_SUPPORT_GPU
if (IsGpuDeviceType(fDeviceType) &&
- NULL != fDevManager &&
+ fDevManager &&
fDevManager->getGrRenderTarget() &&
fDevManager->getGrRenderTarget()->numSamples() > 0) {
title.appendf(" [MSAA: %d]",
diff --git a/samplecode/SampleChart.cpp b/samplecode/SampleChart.cpp
index 630ff6edc3..12a6afe0e3 100644
--- a/samplecode/SampleChart.cpp
+++ b/samplecode/SampleChart.cpp
@@ -60,7 +60,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/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index f4157cd6b5..a996a4bc27 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -435,7 +435,7 @@ static void do_fuzz(SkCanvas* canvas) {
printf("Fuzzing with %u\n", kSeed);
}
numFilters++;
- if (NULL != filter) {
+ if (filter) {
numValidFilters++;
}
printf("Filter no : %u. Valid filters so far : %u\r", numFilters, numValidFilters);
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index 6bb9c74346..4f073bdd5e 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -102,7 +102,7 @@ protected:
textCanvas = recorder.beginRecording(1000, 1000, NULL, 0);
}
- if (NULL != textCanvas) {
+ if (textCanvas) {
for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
SkPaint p;
@@ -139,7 +139,7 @@ protected:
x += r.width() * 4 / 3;
}
}
- if (NULL != textCanvas) {
+ if (textCanvas) {
SkPaint p;
SkString str;
p.setAntiAlias(true);
@@ -152,12 +152,12 @@ protected:
}
}
- if (NULL != textCanvas) {
+ if (textCanvas) {
SkASSERT(NULL == fTextPicture);
fTextPicture.reset(recorder.endRecording());
}
- SkASSERT(NULL != fTextPicture);
+ SkASSERT(fTextPicture);
canvas->drawPicture(fTextPicture);
}