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

Unified Diff: src/gpu/GrProgramResource.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 months 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 | « src/gpu/GrPictureUtils.cpp ('k') | src/gpu/GrRODrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProgramResource.cpp
diff --git a/src/gpu/GrProgramResource.cpp b/src/gpu/GrProgramResource.cpp
index 3bf25a1137a4bcbad53d935b3c651ebd9ca0b5f2..482caff7ee0b3257c04f827029abb2bcf40414a3 100644
--- a/src/gpu/GrProgramResource.cpp
+++ b/src/gpu/GrProgramResource.cpp
@@ -24,7 +24,7 @@ GrProgramResource::GrProgramResource(GrGpuResource* resource, IOType ioType) {
GrProgramResource::~GrProgramResource() {
if (fOwnRef) {
- SkASSERT(NULL != fResource);
+ SkASSERT(fResource);
fResource->unref();
}
if (fPendingIO) {
@@ -48,7 +48,7 @@ GrProgramResource::~GrProgramResource() {
void GrProgramResource::reset() {
SkASSERT(!fPendingIO);
- SkASSERT((NULL != fResource) == fOwnRef);
+ SkASSERT(SkToBool(fResource) == fOwnRef);
if (fOwnRef) {
fResource->unref();
fOwnRef = false;
@@ -59,7 +59,7 @@ void GrProgramResource::reset() {
void GrProgramResource::setResource(GrGpuResource* resource, IOType ioType) {
SkASSERT(!fPendingIO);
- SkASSERT((NULL != fResource) == fOwnRef);
+ SkASSERT(SkToBool(fResource) == fOwnRef);
SkSafeUnref(fResource);
if (NULL == resource) {
fResource = NULL;
@@ -77,7 +77,7 @@ void GrProgramResource::markPendingIO() const {
// This should only be called when the owning GrProgramElement gets its first
// pendingExecution ref.
SkASSERT(!fPendingIO);
- SkASSERT(NULL != fResource);
+ SkASSERT(fResource);
fPendingIO = true;
switch (fIOType) {
case kNone_IOType:
@@ -127,7 +127,7 @@ void GrProgramResource::removeRef() const {
SkASSERT(fOwnRef);
SkASSERT(fPendingIO);
SkASSERT(kNone_IOType != fIOType);
- SkASSERT(NULL != fResource);
+ SkASSERT(fResource);
fResource->unref();
fOwnRef = false;
}
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | src/gpu/GrRODrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698