Changed to Yoda style comparisons where appropriate.
git-svn-id: http://skia.googlecode.com/svn/trunk@5176 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
fe6391a624
commit
78a35c5f1d
@ -17,7 +17,7 @@ namespace sk_tools {
|
||||
|
||||
void PipePictureBenchmark::run(SkPicture* pict) {
|
||||
SkASSERT(pict);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ void PipePictureBenchmark::run(SkPicture* pict) {
|
||||
|
||||
void RecordPictureBenchmark::run(SkPicture* pict) {
|
||||
SkASSERT(pict);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ void RecordPictureBenchmark::run(SkPicture* pict) {
|
||||
|
||||
void SimplePictureBenchmark::run(SkPicture* pict) {
|
||||
SkASSERT(pict);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ void SimplePictureBenchmark::run(SkPicture* pict) {
|
||||
|
||||
void TiledPictureBenchmark::run(SkPicture* pict) {
|
||||
SkASSERT(pict);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ void TiledPictureBenchmark::run(SkPicture* pict) {
|
||||
|
||||
void UnflattenPictureBenchmark::run(SkPicture* pict) {
|
||||
SkASSERT(pict);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -20,14 +20,14 @@ enum {
|
||||
};
|
||||
|
||||
void PictureRenderer::init(SkPicture* pict) {
|
||||
SkASSERT(fPicture == NULL);
|
||||
SkASSERT(fCanvas.get() == NULL);
|
||||
if (fPicture != NULL || fCanvas.get() != NULL) {
|
||||
SkASSERT(NULL == fPicture);
|
||||
SkASSERT(NULL == fCanvas.get());
|
||||
if (fPicture != NULL || NULL != fCanvas.get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SkASSERT(pict != NULL);
|
||||
if (pict == NULL) {
|
||||
if (NULL == pict) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ void PictureRenderer::end() {
|
||||
void PipePictureRenderer::render() {
|
||||
SkASSERT(fCanvas.get() != NULL);
|
||||
SkASSERT(fPicture != NULL);
|
||||
if (fCanvas.get() == NULL || fPicture == NULL) {
|
||||
if (NULL == fCanvas.get() || NULL == fPicture) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ void PipePictureRenderer::render() {
|
||||
void SimplePictureRenderer::render() {
|
||||
SkASSERT(fCanvas.get() != NULL);
|
||||
SkASSERT(fPicture != NULL);
|
||||
if (fCanvas.get() == NULL || fPicture == NULL) {
|
||||
if (NULL == fCanvas.get() || NULL == fPicture) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -88,8 +88,8 @@ TiledPictureRenderer::TiledPictureRenderer()
|
||||
|
||||
void TiledPictureRenderer::init(SkPicture* pict) {
|
||||
SkASSERT(pict != NULL);
|
||||
SkASSERT(fTiles.count() == 0);
|
||||
if (pict == NULL || fTiles.count() != 0) {
|
||||
SkASSERT(0 == fTiles.count());
|
||||
if (NULL == pict || fTiles.count() != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ void TiledPictureRenderer::init(SkPicture* pict) {
|
||||
void TiledPictureRenderer::render() {
|
||||
SkASSERT(fCanvas.get() != NULL);
|
||||
SkASSERT(fPicture != NULL);
|
||||
if (fCanvas.get() == NULL || fPicture == NULL) {
|
||||
if (NULL == fCanvas.get() || NULL == fPicture) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
}
|
||||
|
||||
bool isUsingBitmapDevice() {
|
||||
return fDeviceType == kBitmap_DeviceType;
|
||||
return kBitmap_DeviceType == fDeviceType;
|
||||
}
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
@ -47,7 +47,7 @@ public:
|
||||
}
|
||||
|
||||
bool isUsingGpuDevice() {
|
||||
return fDeviceType == kGPU_DeviceType;
|
||||
return kGPU_DeviceType == fDeviceType;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -182,7 +182,7 @@ static void parse_commandline(int argc, char* const argv[], SkTArray<SkString>*
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (benchmark == NULL) {
|
||||
if (NULL == benchmark) {
|
||||
benchmark = SkNEW(sk_tools::SimplePictureBenchmark);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user