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

Side by Side Diff: src/gpu/gl/iOS/SkNativeGLContext_iOS.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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gl/SkNativeGLContext.h" 9 #include "gl/SkNativeGLContext.h"
10 #import <OpenGLES/EAGL.h> 10 #import <OpenGLES/EAGL.h>
(...skipping 18 matching lines...) Expand all
29 29
30 SkNativeGLContext::SkNativeGLContext() 30 SkNativeGLContext::SkNativeGLContext()
31 : fEAGLContext(NULL) { 31 : fEAGLContext(NULL) {
32 } 32 }
33 33
34 SkNativeGLContext::~SkNativeGLContext() { 34 SkNativeGLContext::~SkNativeGLContext() {
35 this->destroyGLContext(); 35 this->destroyGLContext();
36 } 36 }
37 37
38 void SkNativeGLContext::destroyGLContext() { 38 void SkNativeGLContext::destroyGLContext() {
39 if (NULL != fEAGLContext) { 39 if (fEAGLContext) {
40 if ([EAGLContext currentContext] == EAGLCTX) { 40 if ([EAGLContext currentContext] == EAGLCTX) {
41 [EAGLContext setCurrentContext:nil]; 41 [EAGLContext setCurrentContext:nil];
42 } 42 }
43 [EAGLCTX release]; 43 [EAGLCTX release];
44 fEAGLContext = NULL; 44 fEAGLContext = NULL;
45 } 45 }
46 } 46 }
47 47
48 const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAP I) { 48 const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAP I) {
49 if (kGL_GrGLStandard == forcedGpuAPI) { 49 if (kGL_GrGLStandard == forcedGpuAPI) {
(...skipping 12 matching lines...) Expand all
62 return interface; 62 return interface;
63 } 63 }
64 64
65 void SkNativeGLContext::makeCurrent() const { 65 void SkNativeGLContext::makeCurrent() const {
66 if (![EAGLContext setCurrentContext:EAGLCTX]) { 66 if (![EAGLContext setCurrentContext:EAGLCTX]) {
67 SkDebugf("Could not set the context.\n"); 67 SkDebugf("Could not set the context.\n");
68 } 68 }
69 } 69 }
70 70
71 void SkNativeGLContext::swapBuffers() const { } 71 void SkNativeGLContext::swapBuffers() const { }
OLDNEW
« no previous file with comments | « src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp ('k') | src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698