| 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 #ifndef GrGLExtensions_DEFINED | 8 #ifndef GrGLExtensions_DEFINED | 
| 9 #define GrGLExtensions_DEFINED | 9 #define GrGLExtensions_DEFINED | 
| 10 | 10 | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 32         fStrings.swap(that->fStrings); | 32         fStrings.swap(that->fStrings); | 
| 33         SkTSwap(fInitialized, that->fInitialized); | 33         SkTSwap(fInitialized, that->fInitialized); | 
| 34     } | 34     } | 
| 35 | 35 | 
| 36     /** | 36     /** | 
| 37      * We sometimes need to use this class without having yet created a GrGLInte
    rface. This version | 37      * We sometimes need to use this class without having yet created a GrGLInte
    rface. This version | 
| 38      * of init expects that getString is always non-NULL while getIntegerv and g
    etStringi are non- | 38      * of init expects that getString is always non-NULL while getIntegerv and g
    etStringi are non- | 
| 39      * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail. | 39      * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail. | 
| 40      */ | 40      */ | 
| 41     bool init(GrGLStandard standard, | 41     bool init(GrGLStandard standard, | 
| 42               GrGLGetStringProc getString, | 42               GrGLFunction<GrGLGetStringProc> getString, | 
| 43               GrGLGetStringiProc getStringi, | 43               GrGLFunction<GrGLGetStringiProc> getStringi, | 
| 44               GrGLGetIntegervProc getIntegerv, | 44               GrGLFunction<GrGLGetIntegervProc> getIntegerv, | 
| 45               GrEGLQueryStringProc queryString = nullptr, | 45               GrGLFunction<GrEGLQueryStringProc> queryString = nullptr, | 
| 46               GrEGLDisplay eglDisplay = nullptr); | 46               GrEGLDisplay eglDisplay = nullptr); | 
| 47 | 47 | 
| 48     bool isInitialized() const { return fInitialized; } | 48     bool isInitialized() const { return fInitialized; } | 
| 49 | 49 | 
| 50     /** | 50     /** | 
| 51      * Queries whether an extension is present. This will fail if init() has not
     been called. | 51      * Queries whether an extension is present. This will fail if init() has not
     been called. | 
| 52      */ | 52      */ | 
| 53     bool has(const char[]) const; | 53     bool has(const char[]) const; | 
| 54 | 54 | 
| 55     /** | 55     /** | 
| 56      * Removes an extension if present. Returns true if the extension was presen
    t before the call. | 56      * Removes an extension if present. Returns true if the extension was presen
    t before the call. | 
| 57      */ | 57      */ | 
| 58     bool remove(const char[]); | 58     bool remove(const char[]); | 
| 59 | 59 | 
| 60     /** | 60     /** | 
| 61      * Adds an extension to list | 61      * Adds an extension to list | 
| 62      */ | 62      */ | 
| 63     void add(const char[]); | 63     void add(const char[]); | 
| 64 | 64 | 
| 65     void reset() { fStrings->reset(); } | 65     void reset() { fStrings->reset(); } | 
| 66 | 66 | 
| 67     void print(const char* sep = "\n") const; | 67     void print(const char* sep = "\n") const; | 
| 68 | 68 | 
| 69 private: | 69 private: | 
| 70     bool                                fInitialized; | 70     bool                                fInitialized; | 
| 71     SkAutoTDelete<SkTArray<SkString> >  fStrings; | 71     SkAutoTDelete<SkTArray<SkString> >  fStrings; | 
| 72 }; | 72 }; | 
| 73 | 73 | 
| 74 #endif | 74 #endif | 
| OLD | NEW | 
|---|