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

Unified Diff: src/views/mac/SkNSView.mm

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/views/SkView.cpp ('k') | src/views/unix/SkOSWindow_Unix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/mac/SkNSView.mm
diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm
index 80bfd670ef4f4af38d9265de7a02f56dd55696d4..6347d464085dcddf57afc92dd88ca8488cbbfd50 100644
--- a/src/views/mac/SkNSView.mm
+++ b/src/views/mac/SkNSView.mm
@@ -50,7 +50,7 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
selector:@selector(backingPropertiesChanged:)
name:@"NSWindowDidChangeBackingPropertiesNotification"
object:[self window]];
- if (NULL != fWind) {
+ if (fWind) {
fWind->setVisibleP(true);
NSSize size = self.frame.size;
#if RETINA_API_AVAILABLE
@@ -103,12 +103,9 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
#if RETINA_API_AVAILABLE
newSize = [self convertSizeToBacking:newSize];
#endif
- if (NULL != fWind &&
- (fWind->width() != newSize.width ||
- fWind->height() != newSize.height))
- {
+ if (fWind && (fWind->width() != newSize.width || fWind->height() != newSize.height)) {
fWind->resize((int) newSize.width, (int) newSize.height);
- if (NULL != fGLContext) {
+ if (fGLContext) {
glClear(GL_STENCIL_BUFFER_BIT);
[fGLContext update];
}
@@ -131,7 +128,7 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
- (void)drawSkia {
fRedrawRequestPending = false;
- if (NULL != fWind) {
+ if (fWind) {
SkAutoTUnref<SkCanvas> canvas(fWind->createCanvas());
fWind->draw(canvas);
#ifdef FORCE_REDRAW
@@ -268,7 +265,7 @@ static unsigned convertNSModifiersToSk(NSUInteger nsModi) {
NSPoint p = [event locationInWindow];
unsigned modi = convertNSModifiersToSk([event modifierFlags]);
- if ([self mouse:p inRect:[self bounds]] && NULL != fWind) {
+ if ([self mouse:p inRect:[self bounds]] && fWind) {
NSPoint loc = [self convertPoint:p fromView:nil];
#if RETINA_API_AVAILABLE
loc = [self convertPointToBacking:loc]; //y-up
@@ -283,7 +280,7 @@ static unsigned convertNSModifiersToSk(NSUInteger nsModi) {
NSPoint p = [event locationInWindow];
unsigned modi = convertNSModifiersToSk([event modifierFlags]);
- if ([self mouse:p inRect:[self bounds]] && NULL != fWind) {
+ if ([self mouse:p inRect:[self bounds]] && fWind) {
NSPoint loc = [self convertPoint:p fromView:nil];
#if RETINA_API_AVAILABLE
loc = [self convertPointToBacking:loc]; //y-up
@@ -298,7 +295,7 @@ static unsigned convertNSModifiersToSk(NSUInteger nsModi) {
NSPoint p = [event locationInWindow];
unsigned modi = convertNSModifiersToSk([event modifierFlags]);
- if ([self mouse:p inRect:[self bounds]] && NULL != fWind) {
+ if ([self mouse:p inRect:[self bounds]] && fWind) {
NSPoint loc = [self convertPoint:p fromView:nil];
#if RETINA_API_AVAILABLE
loc = [self convertPointToBacking:loc]; //y-up
@@ -313,7 +310,7 @@ static unsigned convertNSModifiersToSk(NSUInteger nsModi) {
NSPoint p = [event locationInWindow];
unsigned modi = convertNSModifiersToSk([event modifierFlags]);
- if ([self mouse:p inRect:[self bounds]] && NULL != fWind) {
+ if ([self mouse:p inRect:[self bounds]] && fWind) {
NSPoint loc = [self convertPoint:p fromView:nil];
#if RETINA_API_AVAILABLE
loc = [self convertPointToBacking:loc]; //y-up
« no previous file with comments | « src/views/SkView.cpp ('k') | src/views/unix/SkOSWindow_Unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698