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

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

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/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContextFactory.h" 9 #include "GrContextFactory.h"
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 } 143 }
144 144
145 Context& context = fContexts.push_back(); 145 Context& context = fContexts.push_back();
146 context.fGLContext = glCtx.detach(); 146 context.fGLContext = glCtx.detach();
147 context.fGrContext = SkRef(grCtx.get()); 147 context.fGrContext = SkRef(grCtx.get());
148 context.fType = type; 148 context.fType = type;
149 context.fOptions = options; 149 context.fOptions = options;
150 return ContextInfo(context.fGrContext, context.fGLContext); 150 return ContextInfo(context.fGrContext, context.fGLContext);
151 } 151 }
152
153 void GrContextFactory::ReleaseGpuAPIsInThread() {
154 #if SK_ANGLE
155 SkANGLEGLContext::ReleaseGpuAPIsInThread();
156 #endif
157 #if SK_COMMAND_BUFFER
158 SkCommandBufferGLContext::ReleaseGpuAPIsInThread();
159 #endif
160 #if SK_MESA
161 SkMesaGLContext::ReleaseGpuAPIsInThread();
162 #endif
163 // Call platform release the last, since the emulated APIs like command buff er might use the
164 // real APIs in this thread, too.
165 SkReleasePlatformGLAPIsInThread();
166 }
OLDNEW
« no previous file with comments | « src/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698