SkMesaGLContext::AutoContextRestore::AutoContextRestore() {
fOldContext = (Context)OSMesaGetCurrentContext();
- if (NULL != (OSMesaContext)fOldContext) {
+ if (fOldContext) {
OSMesaGetColorBuffer((OSMesaContext)fOldContext,
&fOldWidth, &fOldHeight,
&fOldFormat, &fOldImage);
}
SkMesaGLContext::AutoContextRestore::~AutoContextRestore() {
- if (NULL != (OSMesaContext)fOldContext) {
+ if (fOldContext) {
OSMesaMakeCurrent((OSMesaContext)fOldContext, fOldImage,
fOldFormat, fOldWidth, fOldHeight);
}