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

Side by Side Diff: gpu/gles2_conform_support/egl/egl.cc

Issue 1617653003: command_buffer_gles2: Avoid creating multiple AtExitManagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « gpu/gles2_conform_support/egl/display.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <EGL/egl.h> 5 #include <EGL/egl.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) { 143 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) {
144 EGLint error_code = ValidateDisplay(dpy); 144 EGLint error_code = ValidateDisplay(dpy);
145 if (error_code != EGL_SUCCESS) 145 if (error_code != EGL_SUCCESS)
146 return EglError(error_code, EGL_FALSE); 146 return EglError(error_code, EGL_FALSE);
147 147
148 egl::Display* display = static_cast<egl::Display*>(dpy); 148 egl::Display* display = static_cast<egl::Display*>(dpy);
149 delete display; 149 delete display;
150 150
151 // TODO: EGL specifies that the objects are marked for deletion and they will
152 // remain alive as long as "contexts or surfaces associated with display is
153 // current to any thread".
154 // Currently we delete the display here, and may also call exit handlers.
155
151 return EglSuccess(EGL_TRUE); 156 return EglSuccess(EGL_TRUE);
152 } 157 }
153 158
154 EGLAPI const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) { 159 EGLAPI const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) {
155 EGLint error_code = ValidateDisplay(dpy); 160 EGLint error_code = ValidateDisplay(dpy);
156 if (error_code != EGL_SUCCESS) 161 if (error_code != EGL_SUCCESS)
157 return EglError(error_code, static_cast<const char*>(NULL)); 162 return EglError(error_code, static_cast<const char*>(NULL));
158 163
159 switch (name) { 164 switch (name) {
160 case EGL_CLIENT_APIS: 165 case EGL_CLIENT_APIS:
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return EGL_FALSE; 458 return EGL_FALSE;
454 } 459 }
455 460
456 /* Now, define eglGetProcAddress using the generic function ptr. type */ 461 /* Now, define eglGetProcAddress using the generic function ptr. type */
457 EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY 462 EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
458 eglGetProcAddress(const char* procname) { 463 eglGetProcAddress(const char* procname) {
459 return reinterpret_cast<__eglMustCastToProperFunctionPointerType>( 464 return reinterpret_cast<__eglMustCastToProperFunctionPointerType>(
460 gles2::GetGLFunctionPointer(procname)); 465 gles2::GetGLFunctionPointer(procname));
461 } 466 }
462 } // extern "C" 467 } // extern "C"
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698