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 10 matching lines...) Expand all Loading... |
21 #include "GrContext.h" | 21 #include "GrContext.h" |
22 #include "SkTArray.h" | 22 #include "SkTArray.h" |
23 | 23 |
24 /** | 24 /** |
25 * This is a simple class that is useful in test apps that use different | 25 * This is a simple class that is useful in test apps that use different |
26 * GrContexts backed by different types of GL contexts. It manages creating the | 26 * GrContexts backed by different types of GL contexts. It manages creating the |
27 * GL context and a GrContext that uses it. The GL/Gr contexts persist until the | 27 * GL context and a GrContext that uses it. The GL/Gr contexts persist until the |
28 * factory is destroyed (though the caller can always grab a ref on the returned | 28 * factory is destroyed (though the caller can always grab a ref on the returned |
29 * GrContext to make it outlive the factory). | 29 * GrContext to make it outlive the factory). |
30 */ | 30 */ |
31 class GrContextFactory : GrNoncopyable { | 31 class GrContextFactory : public SkNoncopyable { |
32 public: | 32 public: |
33 /** | 33 /** |
34 * Types of GL contexts supported. | 34 * Types of GL contexts supported. |
35 */ | 35 */ |
36 enum GLContextType { | 36 enum GLContextType { |
37 kNative_GLContextType, | 37 kNative_GLContextType, |
38 #if SK_ANGLE | 38 #if SK_ANGLE |
39 kANGLE_GLContextType, | 39 kANGLE_GLContextType, |
40 #endif | 40 #endif |
41 #if SK_MESA | 41 #if SK_MESA |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 private: | 163 private: |
164 struct GPUContext { | 164 struct GPUContext { |
165 GLContextType fType; | 165 GLContextType fType; |
166 SkGLContextHelper* fGLContext; | 166 SkGLContextHelper* fGLContext; |
167 GrContext* fGrContext; | 167 GrContext* fGrContext; |
168 }; | 168 }; |
169 SkTArray<GPUContext, true> fContexts; | 169 SkTArray<GPUContext, true> fContexts; |
170 }; | 170 }; |
171 | 171 |
172 #endif | 172 #endif |
OLD | NEW |