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

Unified Diff: src/views/unix/SkOSWindow_Unix.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/views/mac/SkNSView.mm ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/unix/SkOSWindow_Unix.cpp
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index fad59225177763caa44d0bfd398da9ab9a069bcb..e22377a2643a04d05b51f8e2b1c9ac6f33ad2c83 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -46,9 +46,9 @@ SkOSWindow::~SkOSWindow() {
}
void SkOSWindow::closeWindow() {
- if (NULL != fUnixWindow.fDisplay) {
+ if (fUnixWindow.fDisplay) {
this->detach();
- SkASSERT(NULL != fUnixWindow.fGc);
+ SkASSERT(fUnixWindow.fGc);
XFreeGC(fUnixWindow.fDisplay, fUnixWindow.fGc);
fUnixWindow.fGc = NULL;
XDestroyWindow(fUnixWindow.fDisplay, fUnixWindow.fWin);
@@ -64,9 +64,9 @@ void SkOSWindow::initWindow(int requestedMSAASampleCount, AttachmentInfo* info)
this->closeWindow();
}
// presence of fDisplay means we already have a window
- if (NULL != fUnixWindow.fDisplay) {
- if (NULL != info) {
- if (NULL != fVi) {
+ if (fUnixWindow.fDisplay) {
+ if (info) {
+ if (fVi) {
glXGetConfig(fUnixWindow.fDisplay, fVi, GLX_SAMPLES_ARB, &info->fSampleCount);
glXGetConfig(fUnixWindow.fDisplay, fVi, GLX_STENCIL_SIZE, &info->fStencilBits);
} else {
@@ -110,7 +110,7 @@ void SkOSWindow::initWindow(int requestedMSAASampleCount, AttachmentInfo* info)
}
if (fVi) {
- if (NULL != info) {
+ if (info) {
glXGetConfig(dsp, fVi, GLX_SAMPLES_ARB, &info->fSampleCount);
glXGetConfig(dsp, fVi, GLX_STENCIL_SIZE, &info->fStencilBits);
}
@@ -132,7 +132,7 @@ void SkOSWindow::initWindow(int requestedMSAASampleCount, AttachmentInfo* info)
CWEventMask | CWColormap,
&swa);
} else {
- if (NULL != info) {
+ if (info) {
info->fSampleCount = 0;
info->fStencilBits = 0;
}
@@ -310,7 +310,7 @@ void SkOSWindow::loop() {
}
void SkOSWindow::mapWindowAndWait() {
- SkASSERT(NULL != fUnixWindow.fDisplay);
+ SkASSERT(fUnixWindow.fDisplay);
Display* dsp = fUnixWindow.fDisplay;
Window win = fUnixWindow.fWin;
XMapWindow(dsp, win);
@@ -333,7 +333,7 @@ bool SkOSWindow::attach(SkBackEndTypes, int msaaSampleCount, AttachmentInfo* inf
return false;
}
if (NULL == fUnixWindow.fGLContext) {
- SkASSERT(NULL != fVi);
+ SkASSERT(fVi);
fUnixWindow.fGLContext = glXCreateContext(fUnixWindow.fDisplay,
fVi,
@@ -365,7 +365,7 @@ void SkOSWindow::detach() {
}
void SkOSWindow::present() {
- if (NULL != fUnixWindow.fDisplay && NULL != fUnixWindow.fGLContext) {
+ if (fUnixWindow.fDisplay && fUnixWindow.fGLContext) {
glXSwapBuffers(fUnixWindow.fDisplay, fUnixWindow.fWin);
}
}
@@ -405,7 +405,7 @@ void SkOSWindow::doPaint() {
return;
}
// If we are drawing with GL, we don't need XPutImage.
- if (NULL != fUnixWindow.fGLContext) {
+ if (fUnixWindow.fGLContext) {
return;
}
// Draw the bitmap to the screen.
« no previous file with comments | « src/views/mac/SkNSView.mm ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698