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

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

Issue 1733323002: Clean up EGL thread state at thread exit in nanobench and DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix main thread usage also Created 4 years, 10 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 | « src/core/SkTaskGroup.cpp ('k') | src/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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 GLContextOptions options = kNone_GLContextOptions ); 123 GLContextOptions options = kNone_GLContextOptions );
124 /** 124 /**
125 * Get a GrContext initialized with a type of GL context. It also makes the GL context current. 125 * Get a GrContext initialized with a type of GL context. It also makes the GL context current.
126 */ 126 */
127 GrContext* get(GLContextType type, 127 GrContext* get(GLContextType type,
128 GLContextOptions options = kNone_GLContextOptions) { 128 GLContextOptions options = kNone_GLContextOptions) {
129 return this->getContextInfo(type, options).fGrContext; 129 return this->getContextInfo(type, options).fGrContext;
130 } 130 }
131 const GrContextOptions& getGlobalOptions() const { return fGlobalOptions; } 131 const GrContextOptions& getGlobalOptions() const { return fGlobalOptions; }
132 132
133 static void ReleaseGpuAPIsInThread();
133 private: 134 private:
134 struct Context { 135 struct Context {
135 GLContextType fType; 136 GLContextType fType;
136 GLContextOptions fOptions; 137 GLContextOptions fOptions;
137 SkGLContext* fGLContext; 138 SkGLContext* fGLContext;
138 GrContext* fGrContext; 139 GrContext* fGrContext;
139 }; 140 };
140 SkTArray<Context, true> fContexts; 141 SkTArray<Context, true> fContexts;
141 const GrContextOptions fGlobalOptions; 142 const GrContextOptions fGlobalOptions;
142 }; 143 };
143 144
144 #endif 145 #endif
OLDNEW
« no previous file with comments | « src/core/SkTaskGroup.cpp ('k') | src/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698