Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: tools/gpu/GrContextFactory.h

Issue 1852733002: Add GrContext::releaseAndAbandonContext() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build, add null check, add unit test" Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/flags/SkCommonFlags.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/flags/SkCommonFlags.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698