| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2012 Google Inc. | 2  * Copyright 2012 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 GrContextFactory_DEFINED | 8 #ifndef GrContextFactory_DEFINED | 
| 9 #define GrContextFactory_DEFINED | 9 #define GrContextFactory_DEFINED | 
| 10 | 10 | 
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 195     SkGLContextHelper* getGLContext(GLContextType type) { | 195     SkGLContextHelper* getGLContext(GLContextType type) { | 
| 196         for (int i = 0; i < fContexts.count(); ++i) { | 196         for (int i = 0; i < fContexts.count(); ++i) { | 
| 197             if (fContexts[i].fType == type) { | 197             if (fContexts[i].fType == type) { | 
| 198                 return fContexts[i].fGLContext; | 198                 return fContexts[i].fGLContext; | 
| 199             } | 199             } | 
| 200         } | 200         } | 
| 201 | 201 | 
| 202         return NULL; | 202         return NULL; | 
| 203     } | 203     } | 
| 204 | 204 | 
|  | 205     const GrContext::Options& getGlobalOptions() const { return fGlobalOptions; 
     } | 
|  | 206 | 
| 205 private: | 207 private: | 
| 206     struct GPUContext { | 208     struct GPUContext { | 
| 207         GLContextType             fType; | 209         GLContextType             fType; | 
| 208         SkGLContextHelper*        fGLContext; | 210         SkGLContextHelper*        fGLContext; | 
| 209         GrContext*                fGrContext; | 211         GrContext*                fGrContext; | 
| 210     }; | 212     }; | 
| 211     SkTArray<GPUContext, true>    fContexts; | 213     SkTArray<GPUContext, true>    fContexts; | 
| 212     const GrContext::Options      fGlobalOptions; | 214     const GrContext::Options      fGlobalOptions; | 
| 213 }; | 215 }; | 
| 214 | 216 | 
| 215 #endif | 217 #endif | 
| OLD | NEW | 
|---|