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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 explicit GrContextFactory(const GrContextOptions& opts); | 103 explicit GrContextFactory(const GrContextOptions& opts); |
104 GrContextFactory(); | 104 GrContextFactory(); |
105 | 105 |
106 ~GrContextFactory(); | 106 ~GrContextFactory(); |
107 | 107 |
108 void destroyContexts(); | 108 void destroyContexts(); |
109 void abandonContexts(); | 109 void abandonContexts(); |
| 110 void releaseResourcesAndAbandonContexts(); |
110 | 111 |
111 struct ContextInfo { | 112 struct ContextInfo { |
112 ContextInfo() | 113 ContextInfo() |
113 : fGrContext(nullptr), fGLContext(nullptr) { } | 114 : fGrContext(nullptr), fGLContext(nullptr) { } |
114 ContextInfo(GrContext* grContext, GLTestContext* glContext) | 115 ContextInfo(GrContext* grContext, GLTestContext* glContext) |
115 : fGrContext(grContext), fGLContext(glContext) { } | 116 : fGrContext(grContext), fGLContext(glContext) { } |
116 GrContext* fGrContext; | 117 GrContext* fGrContext; |
117 GLTestContext* fGLContext; //! Valid until the factory destroys it via a
bandonContexts() or | 118 GLTestContext* fGLContext; //! Valid until the factory destroys it via a
bandonContexts() or |
118 //! destroyContexts(). | 119 //! destroyContexts(). |
119 }; | 120 }; |
(...skipping 17 matching lines...) Expand all Loading... |
137 GLContextType fType; | 138 GLContextType fType; |
138 GLContextOptions fOptions; | 139 GLContextOptions fOptions; |
139 GLTestContext* fGLContext; | 140 GLTestContext* fGLContext; |
140 GrContext* fGrContext; | 141 GrContext* fGrContext; |
141 }; | 142 }; |
142 SkTArray<Context, true> fContexts; | 143 SkTArray<Context, true> fContexts; |
143 const GrContextOptions fGlobalOptions; | 144 const GrContextOptions fGlobalOptions; |
144 }; | 145 }; |
145 } // namespace sk_gpu_test | 146 } // namespace sk_gpu_test |
146 #endif | 147 #endif |
OLD | NEW |