Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / gl / android / SkNativeGLContext_android.cpp
index 705bd8f..d4d7219 100644 (file)
@@ -15,7 +15,7 @@ SkNativeGLContext::AutoContextRestore::AutoContextRestore() {
 }
 
 SkNativeGLContext::AutoContextRestore::~AutoContextRestore() {
-    if (NULL != fOldDisplay) {
+    if (fOldDisplay) {
         eglMakeCurrent(fOldDisplay, fOldSurface, fOldSurface, fOldEGLContext);
     }
 }
@@ -92,7 +92,7 @@ const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAP
 
     const GrGLInterface* interface = NULL;
 
-    for (size_t i = 0; NULL == interface && i < apiLimit; ++api) {
+    for (; NULL == interface && api < apiLimit; ++api) {
         fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
 
         EGLint majorVersion;