| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrGLContext.h" | 8 #include "GrGLContext.h" |
| 9 | 9 |
| 10 //////////////////////////////////////////////////////////////////////////////// | 10 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // This must occur before caps init. | 56 // This must occur before caps init. |
| 57 fInterface.reset(SkRef(interface)); | 57 fInterface.reset(SkRef(interface)); |
| 58 | 58 |
| 59 return fGLCaps->init(*this, interface); | 59 return fGLCaps->init(*this, interface); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 return false; | 62 return false; |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool GrGLContextInfo::isInitialized() const { | 65 bool GrGLContextInfo::isInitialized() const { return SkToBool(fInterface.get());
} |
| 66 return NULL != fInterface.get(); | |
| 67 } | |
| 68 | 66 |
| 69 void GrGLContextInfo::reset() { | 67 void GrGLContextInfo::reset() { |
| 70 fInterface.reset(NULL); | 68 fInterface.reset(NULL); |
| 71 fGLVersion = GR_GL_VER(0, 0); | 69 fGLVersion = GR_GL_VER(0, 0); |
| 72 fGLSLGeneration = static_cast<GrGLSLGeneration>(0); | 70 fGLSLGeneration = static_cast<GrGLSLGeneration>(0); |
| 73 fVendor = kOther_GrGLVendor; | 71 fVendor = kOther_GrGLVendor; |
| 74 fRenderer = kOther_GrGLRenderer; | 72 fRenderer = kOther_GrGLRenderer; |
| 75 fIsMesa = false; | 73 fIsMesa = false; |
| 76 fIsChromium = false; | 74 fIsChromium = false; |
| 77 fGLCaps->reset(); | 75 fGLCaps->reset(); |
| 78 } | 76 } |
| OLD | NEW |