blob: b14444bd081a32c159790dc454025b2f2fdecd81 [file] [log] [blame]
Jesse Hall47743382013-02-08 11:13:46 -08001/*
Mathias Agopian518ec112011-05-13 16:21:08 -07002 ** Copyright 2007, The Android Open Source Project
3 **
Jesse Hall47743382013-02-08 11:13:46 -08004 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
Mathias Agopian518ec112011-05-13 16:21:08 -07007 **
Jesse Hall47743382013-02-08 11:13:46 -08008 ** http://www.apache.org/licenses/LICENSE-2.0
Mathias Agopian518ec112011-05-13 16:21:08 -07009 **
Jesse Hall47743382013-02-08 11:13:46 -080010 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
Mathias Agopian518ec112011-05-13 16:21:08 -070014 ** limitations under the License.
15 */
16
Mathias Agopian311b4792017-02-28 15:00:49 -080017#include "egl_object.h"
18
Michael Lentinee2fc6f82015-07-28 16:30:10 -070019#include <sstream>
20
Mathias Agopian518ec112011-05-13 16:21:08 -070021
22// ----------------------------------------------------------------------------
23namespace android {
24// ----------------------------------------------------------------------------
25
26egl_object_t::egl_object_t(egl_display_t* disp) :
Mathias Agopian5b287a62011-05-16 18:58:55 -070027 display(disp), count(1) {
28 // NOTE: this does an implicit incRef
Mathias Agopian518ec112011-05-13 16:21:08 -070029 display->addObject(this);
30}
31
Mathias Agopian5b287a62011-05-16 18:58:55 -070032egl_object_t::~egl_object_t() {
Mathias Agopian518ec112011-05-13 16:21:08 -070033}
34
Mathias Agopian5b287a62011-05-16 18:58:55 -070035void egl_object_t::terminate() {
36 // this marks the object as "terminated"
37 display->removeObject(this);
38 if (decRef() == 1) {
39 // shouldn't happen because this is called from LocalRef
Steve Blocke6f43dd2012-01-06 19:20:56 +000040 ALOGE("egl_object_t::terminate() removed the last reference!");
Mathias Agopian5b287a62011-05-16 18:58:55 -070041 }
42}
43
44void egl_object_t::destroy() {
45 if (decRef() == 1) {
46 delete this;
47 }
48}
49
Mathias Agopianf0480de2011-11-13 20:50:07 -080050bool egl_object_t::get(egl_display_t const* display, egl_object_t* object) {
Mathias Agopian5b287a62011-05-16 18:58:55 -070051 // used by LocalRef, this does an incRef() atomically with
52 // checking that the object is valid.
Mathias Agopianf0480de2011-11-13 20:50:07 -080053 return display->getObject(object);
Mathias Agopian518ec112011-05-13 16:21:08 -070054}
55
56// ----------------------------------------------------------------------------
Mathias Agopian48d438d2012-01-28 21:44:00 -080057
Courtney Goeltzenleuchter37836572017-04-26 15:07:51 -060058egl_surface_t::egl_surface_t(egl_display_t* dpy, EGLConfig config, EGLNativeWindowType win,
59 EGLSurface surface, EGLint colorSpace, egl_connection_t const* cnx)
60 : egl_object_t(dpy),
61 surface(surface),
62 config(config),
63 win(win),
64 cnx(cnx),
65 connected(true),
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -070066 colorSpace(colorSpace),
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -070067 egl_smpte2086_dirty(false),
68 egl_cta861_3_dirty(false) {
69 egl_smpte2086_metadata.displayPrimaryRed = { EGL_DONT_CARE, EGL_DONT_CARE };
70 egl_smpte2086_metadata.displayPrimaryGreen = { EGL_DONT_CARE, EGL_DONT_CARE };
71 egl_smpte2086_metadata.displayPrimaryBlue = { EGL_DONT_CARE, EGL_DONT_CARE };
72 egl_smpte2086_metadata.whitePoint = { EGL_DONT_CARE, EGL_DONT_CARE };
73 egl_smpte2086_metadata.maxLuminance = EGL_DONT_CARE;
74 egl_smpte2086_metadata.minLuminance = EGL_DONT_CARE;
75 egl_cta861_3_metadata.maxFrameAverageLightLevel = EGL_DONT_CARE;
76 egl_cta861_3_metadata.maxContentLightLevel = EGL_DONT_CARE;
77
Mathias Agopian65421432017-03-08 11:49:05 -080078 if (win) {
79 win->incStrong(this);
80 }
81}
Jesse Hall25838592012-04-05 15:53:28 -070082
83egl_surface_t::~egl_surface_t() {
Yi Kong48a6cd22018-07-18 10:07:09 -070084 if (win != nullptr) {
Pablo Ceballosae8cf0b2016-05-02 11:24:13 -070085 disconnect();
Mathias Agopian65421432017-03-08 11:49:05 -080086 win->decStrong(this);
Pablo Ceballosae8cf0b2016-05-02 11:24:13 -070087 }
88}
89
90void egl_surface_t::disconnect() {
Yi Kong48a6cd22018-07-18 10:07:09 -070091 if (win != nullptr && connected) {
Mathias Agopian65421432017-03-08 11:49:05 -080092 native_window_set_buffers_format(win, 0);
93 if (native_window_api_disconnect(win, NATIVE_WINDOW_API_EGL)) {
94 ALOGW("EGLNativeWindowType %p disconnect failed", win);
Jesse Hall25838592012-04-05 15:53:28 -070095 }
Pablo Ceballosae8cf0b2016-05-02 11:24:13 -070096 connected = false;
Jesse Hall25838592012-04-05 15:53:28 -070097 }
98}
99
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700100EGLBoolean egl_surface_t::setSmpte2086Attribute(EGLint attribute, EGLint value) {
101 switch (attribute) {
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700102 case EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800103 egl_smpte2086_metadata.displayPrimaryRed.x = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700104 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700105 return EGL_TRUE;
106 case EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800107 egl_smpte2086_metadata.displayPrimaryRed.y = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700108 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700109 return EGL_TRUE;
110 case EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800111 egl_smpte2086_metadata.displayPrimaryGreen.x = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700112 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700113 return EGL_TRUE;
114 case EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800115 egl_smpte2086_metadata.displayPrimaryGreen.y = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700116 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700117 return EGL_TRUE;
118 case EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800119 egl_smpte2086_metadata.displayPrimaryBlue.x = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700120 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700121 return EGL_TRUE;
122 case EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800123 egl_smpte2086_metadata.displayPrimaryBlue.y = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700124 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700125 return EGL_TRUE;
126 case EGL_SMPTE2086_WHITE_POINT_X_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800127 egl_smpte2086_metadata.whitePoint.x = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700128 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700129 return EGL_TRUE;
130 case EGL_SMPTE2086_WHITE_POINT_Y_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800131 egl_smpte2086_metadata.whitePoint.y = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700132 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700133 return EGL_TRUE;
134 case EGL_SMPTE2086_MAX_LUMINANCE_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800135 egl_smpte2086_metadata.maxLuminance = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700136 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700137 return EGL_TRUE;
138 case EGL_SMPTE2086_MIN_LUMINANCE_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800139 egl_smpte2086_metadata.minLuminance = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700140 egl_smpte2086_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700141 return EGL_TRUE;
142 }
143 return EGL_FALSE;
144}
145
146EGLBoolean egl_surface_t::setCta8613Attribute(EGLint attribute, EGLint value) {
147 switch (attribute) {
148 case EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800149 egl_cta861_3_metadata.maxContentLightLevel = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700150 egl_cta861_3_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700151 return EGL_TRUE;
152 case EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800153 egl_cta861_3_metadata.maxFrameAverageLightLevel = value;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700154 egl_cta861_3_dirty = true;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700155 return EGL_TRUE;
156 }
157 return EGL_FALSE;
158}
159
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700160EGLBoolean egl_surface_t::getSmpte2086Metadata(android_smpte2086_metadata& metadata) const {
161 if (!egl_smpte2086_dirty) return EGL_FALSE;
162 if (egl_smpte2086_metadata.displayPrimaryRed.x == EGL_DONT_CARE ||
163 egl_smpte2086_metadata.displayPrimaryRed.y == EGL_DONT_CARE ||
164 egl_smpte2086_metadata.displayPrimaryGreen.x == EGL_DONT_CARE ||
165 egl_smpte2086_metadata.displayPrimaryGreen.y == EGL_DONT_CARE ||
166 egl_smpte2086_metadata.displayPrimaryBlue.x == EGL_DONT_CARE ||
167 egl_smpte2086_metadata.displayPrimaryBlue.y == EGL_DONT_CARE ||
168 egl_smpte2086_metadata.whitePoint.x == EGL_DONT_CARE ||
169 egl_smpte2086_metadata.whitePoint.y == EGL_DONT_CARE ||
170 egl_smpte2086_metadata.maxLuminance == EGL_DONT_CARE ||
171 egl_smpte2086_metadata.minLuminance == EGL_DONT_CARE) {
172 ALOGW("egl_surface_t: incomplete SMPTE 2086 metadata!");
173 return EGL_FALSE;
174 }
175
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800176 metadata.displayPrimaryRed.x = static_cast<float>(egl_smpte2086_metadata.displayPrimaryRed.x) / EGL_METADATA_SCALING_EXT;
177 metadata.displayPrimaryRed.y = static_cast<float>(egl_smpte2086_metadata.displayPrimaryRed.y) / EGL_METADATA_SCALING_EXT;
178 metadata.displayPrimaryGreen.x = static_cast<float>(egl_smpte2086_metadata.displayPrimaryGreen.x) / EGL_METADATA_SCALING_EXT;
179 metadata.displayPrimaryGreen.y = static_cast<float>(egl_smpte2086_metadata.displayPrimaryGreen.y) / EGL_METADATA_SCALING_EXT;
180 metadata.displayPrimaryBlue.x = static_cast<float>(egl_smpte2086_metadata.displayPrimaryBlue.x) / EGL_METADATA_SCALING_EXT;
181 metadata.displayPrimaryBlue.y = static_cast<float>(egl_smpte2086_metadata.displayPrimaryBlue.y) / EGL_METADATA_SCALING_EXT;
182 metadata.whitePoint.x = static_cast<float>(egl_smpte2086_metadata.whitePoint.x) / EGL_METADATA_SCALING_EXT;
183 metadata.whitePoint.y = static_cast<float>(egl_smpte2086_metadata.whitePoint.y) / EGL_METADATA_SCALING_EXT;
184 metadata.maxLuminance = static_cast<float>(egl_smpte2086_metadata.maxLuminance) / EGL_METADATA_SCALING_EXT;
185 metadata.minLuminance = static_cast<float>(egl_smpte2086_metadata.minLuminance) / EGL_METADATA_SCALING_EXT;
186
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700187 return EGL_TRUE;
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800188}
189
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700190EGLBoolean egl_surface_t::getCta8613Metadata(android_cta861_3_metadata& metadata) const {
191 if (!egl_cta861_3_dirty) return EGL_FALSE;
192
193 if (egl_cta861_3_metadata.maxContentLightLevel == EGL_DONT_CARE ||
194 egl_cta861_3_metadata.maxFrameAverageLightLevel == EGL_DONT_CARE) {
195 ALOGW("egl_surface_t: incomplete CTA861.3 metadata!");
196 return EGL_FALSE;
197 }
198
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800199 metadata.maxContentLightLevel = static_cast<float>(egl_cta861_3_metadata.maxContentLightLevel) / EGL_METADATA_SCALING_EXT;
200 metadata.maxFrameAverageLightLevel = static_cast<float>(egl_cta861_3_metadata.maxFrameAverageLightLevel) / EGL_METADATA_SCALING_EXT;
Courtney Goeltzenleuchter936799c2018-03-02 16:47:08 -0700201
202 return EGL_TRUE;
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800203}
204
205
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700206EGLBoolean egl_surface_t::getColorSpaceAttribute(EGLint attribute, EGLint* value) const {
207 if (attribute == EGL_GL_COLORSPACE_KHR) {
208 *value = colorSpace;
209 return EGL_TRUE;
210 }
211 return EGL_FALSE;
212}
213
214EGLBoolean egl_surface_t::getSmpte2086Attribute(EGLint attribute, EGLint *value) const {
215 switch (attribute) {
216 case EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800217 *value = egl_smpte2086_metadata.displayPrimaryRed.x;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700218 return EGL_TRUE;
219 break;
220 case EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800221 *value = egl_smpte2086_metadata.displayPrimaryRed.y;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700222 return EGL_TRUE;
223 break;
224 case EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800225 *value = egl_smpte2086_metadata.displayPrimaryGreen.x;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700226 return EGL_TRUE;
227 break;
228 case EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800229 *value = egl_smpte2086_metadata.displayPrimaryGreen.y;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700230 return EGL_TRUE;
231 break;
232 case EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800233 *value = egl_smpte2086_metadata.displayPrimaryBlue.x;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700234 return EGL_TRUE;
235 break;
236 case EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800237 *value = egl_smpte2086_metadata.displayPrimaryBlue.y;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700238 return EGL_TRUE;
239 break;
240 case EGL_SMPTE2086_WHITE_POINT_X_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800241 *value = egl_smpte2086_metadata.whitePoint.x;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700242 return EGL_TRUE;
243 break;
244 case EGL_SMPTE2086_WHITE_POINT_Y_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800245 *value = egl_smpte2086_metadata.whitePoint.y;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700246 return EGL_TRUE;
247 break;
248 case EGL_SMPTE2086_MAX_LUMINANCE_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800249 *value = egl_smpte2086_metadata.maxLuminance;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700250 return EGL_TRUE;
251 break;
252 case EGL_SMPTE2086_MIN_LUMINANCE_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800253 *value = egl_smpte2086_metadata.minLuminance;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700254 return EGL_TRUE;
255 break;
256 }
257 return EGL_FALSE;
258}
259
260EGLBoolean egl_surface_t::getCta8613Attribute(EGLint attribute, EGLint *value) const {
261 switch (attribute) {
262 case EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800263 *value = egl_cta861_3_metadata.maxContentLightLevel;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700264 return EGL_TRUE;
265 break;
266 case EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT:
Courtney Goeltzenleuchter786ab882018-01-26 13:37:33 -0800267 *value = egl_cta861_3_metadata.maxFrameAverageLightLevel;
Courtney Goeltzenleuchter12ffe092017-11-16 14:27:48 -0700268 return EGL_TRUE;
269 break;
270 }
271 return EGL_FALSE;
272}
273
Pablo Ceballosae8cf0b2016-05-02 11:24:13 -0700274void egl_surface_t::terminate() {
275 disconnect();
276 egl_object_t::terminate();
277}
278
Jesse Hall25838592012-04-05 15:53:28 -0700279// ----------------------------------------------------------------------------
280
Mathias Agopian48d438d2012-01-28 21:44:00 -0800281egl_context_t::egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config,
Yiwei Zhang0657fba2020-08-12 19:09:26 -0700282 egl_connection_t const* cnx, int version)
283 : egl_object_t(get_display(dpy)),
284 dpy(dpy),
285 context(context),
286 config(config),
287 read(nullptr),
288 draw(nullptr),
289 cnx(cnx),
290 version(version) {}
Mathias Agopian48d438d2012-01-28 21:44:00 -0800291
292void egl_context_t::onLooseCurrent() {
Yi Kong48a6cd22018-07-18 10:07:09 -0700293 read = nullptr;
294 draw = nullptr;
Mathias Agopian48d438d2012-01-28 21:44:00 -0800295}
296
297void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
298 this->read = read;
299 this->draw = draw;
300
301 /*
302 * Here we cache the GL_EXTENSIONS string for this context and we
303 * add the extensions always handled by the wrapper
304 */
305
Mathias Agopian65421432017-03-08 11:49:05 -0800306 if (gl_extensions.empty()) {
Mathias Agopian48d438d2012-01-28 21:44:00 -0800307 // call the implementation's glGetString(GL_EXTENSIONS)
Mathias Agopianada798b2012-02-13 17:09:30 -0800308 const char* exts = (const char *)gEGLImpl.hooks[version]->gl.glGetString(GL_EXTENSIONS);
Alistair Strachan89301ea2015-05-22 14:10:09 -0700309
Jesse Hall09fc8f92017-09-29 15:57:42 -0700310 // If this context is sharing with another context, and the other context was reset
311 // e.g. due to robustness failure, this context might also be reset and glGetString can
312 // return NULL.
313 if (exts) {
314 gl_extensions = exts;
315 if (gl_extensions.find("GL_EXT_debug_marker") == std::string::npos) {
316 gl_extensions.insert(0, "GL_EXT_debug_marker ");
Tao Wuf470a8e2020-06-22 21:11:07 -0700317 // eglGetProcAddress could return function pointers to these
318 // functions while they actually don't work. Fix them now.
319 __eglMustCastToProperFunctionPointerType* f;
320 f = (__eglMustCastToProperFunctionPointerType*)&gEGLImpl.hooks[version]
321 ->gl.glInsertEventMarkerEXT;
322 if (*f != gl_noop) *f = gl_noop;
323 f = (__eglMustCastToProperFunctionPointerType*)&gEGLImpl.hooks[version]
324 ->gl.glPushGroupMarkerEXT;
325 if (*f != gl_noop) *f = gl_noop;
326 f = (__eglMustCastToProperFunctionPointerType*)&gEGLImpl.hooks[version]
327 ->gl.glPopGroupMarkerEXT;
328 if (*f != gl_noop) *f = gl_noop;
Jesse Hall09fc8f92017-09-29 15:57:42 -0700329 }
330
331 // tokenize the supported extensions for the glGetStringi() wrapper
332 std::stringstream ss;
333 std::string str;
334 ss << gl_extensions;
335 while (ss >> str) {
336 tokenized_gl_extensions.push_back(str);
337 }
Alistair Strachan89301ea2015-05-22 14:10:09 -0700338 }
Mathias Agopian48d438d2012-01-28 21:44:00 -0800339 }
340}
341
342// ----------------------------------------------------------------------------
Mathias Agopian518ec112011-05-13 16:21:08 -0700343}; // namespace android
344// ----------------------------------------------------------------------------