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

Side by Side Diff: ui/gl/gl_bindings_autogen_egl.cc

Issue 1775353002: Add DCHECK for nullptr in gl bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_bindings_autogen_gl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py 6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 if (g_debugBindingsInitialized) 197 if (g_debugBindingsInitialized)
198 InitializeDebugBindings(); 198 InitializeDebugBindings();
199 } 199 }
200 200
201 extern "C" { 201 extern "C" {
202 202
203 static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) { 203 static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) {
204 GL_SERVICE_LOG("eglBindAPI" 204 GL_SERVICE_LOG("eglBindAPI"
205 << "(" << api << ")"); 205 << "(" << api << ")");
206 DCHECK(g_driver_egl.debug_fn.eglBindAPIFn != nullptr);
206 EGLBoolean result = g_driver_egl.debug_fn.eglBindAPIFn(api); 207 EGLBoolean result = g_driver_egl.debug_fn.eglBindAPIFn(api);
207 GL_SERVICE_LOG("GL_RESULT: " << result); 208 GL_SERVICE_LOG("GL_RESULT: " << result);
208 return result; 209 return result;
209 } 210 }
210 211
211 static EGLBoolean GL_BINDING_CALL Debug_eglBindTexImage(EGLDisplay dpy, 212 static EGLBoolean GL_BINDING_CALL Debug_eglBindTexImage(EGLDisplay dpy,
212 EGLSurface surface, 213 EGLSurface surface,
213 EGLint buffer) { 214 EGLint buffer) {
214 GL_SERVICE_LOG("eglBindTexImage" 215 GL_SERVICE_LOG("eglBindTexImage"
215 << "(" << dpy << ", " << surface << ", " << buffer << ")"); 216 << "(" << dpy << ", " << surface << ", " << buffer << ")");
217 DCHECK(g_driver_egl.debug_fn.eglBindTexImageFn != nullptr);
216 EGLBoolean result = 218 EGLBoolean result =
217 g_driver_egl.debug_fn.eglBindTexImageFn(dpy, surface, buffer); 219 g_driver_egl.debug_fn.eglBindTexImageFn(dpy, surface, buffer);
218 GL_SERVICE_LOG("GL_RESULT: " << result); 220 GL_SERVICE_LOG("GL_RESULT: " << result);
219 return result; 221 return result;
220 } 222 }
221 223
222 static EGLBoolean GL_BINDING_CALL 224 static EGLBoolean GL_BINDING_CALL
223 Debug_eglChooseConfig(EGLDisplay dpy, 225 Debug_eglChooseConfig(EGLDisplay dpy,
224 const EGLint* attrib_list, 226 const EGLint* attrib_list,
225 EGLConfig* configs, 227 EGLConfig* configs,
226 EGLint config_size, 228 EGLint config_size,
227 EGLint* num_config) { 229 EGLint* num_config) {
228 GL_SERVICE_LOG("eglChooseConfig" 230 GL_SERVICE_LOG("eglChooseConfig"
229 << "(" << dpy << ", " << static_cast<const void*>(attrib_list) 231 << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
230 << ", " << static_cast<const void*>(configs) << ", " 232 << ", " << static_cast<const void*>(configs) << ", "
231 << config_size << ", " << static_cast<const void*>(num_config) 233 << config_size << ", " << static_cast<const void*>(num_config)
232 << ")"); 234 << ")");
235 DCHECK(g_driver_egl.debug_fn.eglChooseConfigFn != nullptr);
233 EGLBoolean result = g_driver_egl.debug_fn.eglChooseConfigFn( 236 EGLBoolean result = g_driver_egl.debug_fn.eglChooseConfigFn(
234 dpy, attrib_list, configs, config_size, num_config); 237 dpy, attrib_list, configs, config_size, num_config);
235 GL_SERVICE_LOG("GL_RESULT: " << result); 238 GL_SERVICE_LOG("GL_RESULT: " << result);
236 return result; 239 return result;
237 } 240 }
238 241
239 static EGLint GL_BINDING_CALL Debug_eglClientWaitSyncKHR(EGLDisplay dpy, 242 static EGLint GL_BINDING_CALL Debug_eglClientWaitSyncKHR(EGLDisplay dpy,
240 EGLSyncKHR sync, 243 EGLSyncKHR sync,
241 EGLint flags, 244 EGLint flags,
242 EGLTimeKHR timeout) { 245 EGLTimeKHR timeout) {
243 GL_SERVICE_LOG("eglClientWaitSyncKHR" 246 GL_SERVICE_LOG("eglClientWaitSyncKHR"
244 << "(" << dpy << ", " << sync << ", " << flags << ", " 247 << "(" << dpy << ", " << sync << ", " << flags << ", "
245 << timeout << ")"); 248 << timeout << ")");
249 DCHECK(g_driver_egl.debug_fn.eglClientWaitSyncKHRFn != nullptr);
246 EGLint result = 250 EGLint result =
247 g_driver_egl.debug_fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout); 251 g_driver_egl.debug_fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
248 GL_SERVICE_LOG("GL_RESULT: " << result); 252 GL_SERVICE_LOG("GL_RESULT: " << result);
249 return result; 253 return result;
250 } 254 }
251 255
252 static EGLBoolean GL_BINDING_CALL 256 static EGLBoolean GL_BINDING_CALL
253 Debug_eglCopyBuffers(EGLDisplay dpy, 257 Debug_eglCopyBuffers(EGLDisplay dpy,
254 EGLSurface surface, 258 EGLSurface surface,
255 EGLNativePixmapType target) { 259 EGLNativePixmapType target) {
256 GL_SERVICE_LOG("eglCopyBuffers" 260 GL_SERVICE_LOG("eglCopyBuffers"
257 << "(" << dpy << ", " << surface << ", " << target << ")"); 261 << "(" << dpy << ", " << surface << ", " << target << ")");
262 DCHECK(g_driver_egl.debug_fn.eglCopyBuffersFn != nullptr);
258 EGLBoolean result = 263 EGLBoolean result =
259 g_driver_egl.debug_fn.eglCopyBuffersFn(dpy, surface, target); 264 g_driver_egl.debug_fn.eglCopyBuffersFn(dpy, surface, target);
260 GL_SERVICE_LOG("GL_RESULT: " << result); 265 GL_SERVICE_LOG("GL_RESULT: " << result);
261 return result; 266 return result;
262 } 267 }
263 268
264 static EGLContext GL_BINDING_CALL 269 static EGLContext GL_BINDING_CALL
265 Debug_eglCreateContext(EGLDisplay dpy, 270 Debug_eglCreateContext(EGLDisplay dpy,
266 EGLConfig config, 271 EGLConfig config,
267 EGLContext share_context, 272 EGLContext share_context,
268 const EGLint* attrib_list) { 273 const EGLint* attrib_list) {
269 GL_SERVICE_LOG("eglCreateContext" 274 GL_SERVICE_LOG("eglCreateContext"
270 << "(" << dpy << ", " << config << ", " << share_context 275 << "(" << dpy << ", " << config << ", " << share_context
271 << ", " << static_cast<const void*>(attrib_list) << ")"); 276 << ", " << static_cast<const void*>(attrib_list) << ")");
277 DCHECK(g_driver_egl.debug_fn.eglCreateContextFn != nullptr);
272 EGLContext result = g_driver_egl.debug_fn.eglCreateContextFn( 278 EGLContext result = g_driver_egl.debug_fn.eglCreateContextFn(
273 dpy, config, share_context, attrib_list); 279 dpy, config, share_context, attrib_list);
274 GL_SERVICE_LOG("GL_RESULT: " << result); 280 GL_SERVICE_LOG("GL_RESULT: " << result);
275 return result; 281 return result;
276 } 282 }
277 283
278 static EGLImageKHR GL_BINDING_CALL 284 static EGLImageKHR GL_BINDING_CALL
279 Debug_eglCreateImageKHR(EGLDisplay dpy, 285 Debug_eglCreateImageKHR(EGLDisplay dpy,
280 EGLContext ctx, 286 EGLContext ctx,
281 EGLenum target, 287 EGLenum target,
282 EGLClientBuffer buffer, 288 EGLClientBuffer buffer,
283 const EGLint* attrib_list) { 289 const EGLint* attrib_list) {
284 GL_SERVICE_LOG("eglCreateImageKHR" 290 GL_SERVICE_LOG("eglCreateImageKHR"
285 << "(" << dpy << ", " << ctx << ", " << target << ", " 291 << "(" << dpy << ", " << ctx << ", " << target << ", "
286 << buffer << ", " << static_cast<const void*>(attrib_list) 292 << buffer << ", " << static_cast<const void*>(attrib_list)
287 << ")"); 293 << ")");
294 DCHECK(g_driver_egl.debug_fn.eglCreateImageKHRFn != nullptr);
288 EGLImageKHR result = g_driver_egl.debug_fn.eglCreateImageKHRFn( 295 EGLImageKHR result = g_driver_egl.debug_fn.eglCreateImageKHRFn(
289 dpy, ctx, target, buffer, attrib_list); 296 dpy, ctx, target, buffer, attrib_list);
290 GL_SERVICE_LOG("GL_RESULT: " << result); 297 GL_SERVICE_LOG("GL_RESULT: " << result);
291 return result; 298 return result;
292 } 299 }
293 300
294 static EGLSurface GL_BINDING_CALL 301 static EGLSurface GL_BINDING_CALL
295 Debug_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, 302 Debug_eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
296 EGLenum buftype, 303 EGLenum buftype,
297 void* buffer, 304 void* buffer,
298 EGLConfig config, 305 EGLConfig config,
299 const EGLint* attrib_list) { 306 const EGLint* attrib_list) {
300 GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer" 307 GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer"
301 << "(" << dpy << ", " << buftype << ", " 308 << "(" << dpy << ", " << buftype << ", "
302 << static_cast<const void*>(buffer) << ", " << config << ", " 309 << static_cast<const void*>(buffer) << ", " << config << ", "
303 << static_cast<const void*>(attrib_list) << ")"); 310 << static_cast<const void*>(attrib_list) << ")");
311 DCHECK(g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn != nullptr);
304 EGLSurface result = g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn( 312 EGLSurface result = g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn(
305 dpy, buftype, buffer, config, attrib_list); 313 dpy, buftype, buffer, config, attrib_list);
306 GL_SERVICE_LOG("GL_RESULT: " << result); 314 GL_SERVICE_LOG("GL_RESULT: " << result);
307 return result; 315 return result;
308 } 316 }
309 317
310 static EGLSurface GL_BINDING_CALL 318 static EGLSurface GL_BINDING_CALL
311 Debug_eglCreatePbufferSurface(EGLDisplay dpy, 319 Debug_eglCreatePbufferSurface(EGLDisplay dpy,
312 EGLConfig config, 320 EGLConfig config,
313 const EGLint* attrib_list) { 321 const EGLint* attrib_list) {
314 GL_SERVICE_LOG("eglCreatePbufferSurface" 322 GL_SERVICE_LOG("eglCreatePbufferSurface"
315 << "(" << dpy << ", " << config << ", " 323 << "(" << dpy << ", " << config << ", "
316 << static_cast<const void*>(attrib_list) << ")"); 324 << static_cast<const void*>(attrib_list) << ")");
325 DCHECK(g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn != nullptr);
317 EGLSurface result = 326 EGLSurface result =
318 g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list); 327 g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
319 GL_SERVICE_LOG("GL_RESULT: " << result); 328 GL_SERVICE_LOG("GL_RESULT: " << result);
320 return result; 329 return result;
321 } 330 }
322 331
323 static EGLSurface GL_BINDING_CALL 332 static EGLSurface GL_BINDING_CALL
324 Debug_eglCreatePixmapSurface(EGLDisplay dpy, 333 Debug_eglCreatePixmapSurface(EGLDisplay dpy,
325 EGLConfig config, 334 EGLConfig config,
326 EGLNativePixmapType pixmap, 335 EGLNativePixmapType pixmap,
327 const EGLint* attrib_list) { 336 const EGLint* attrib_list) {
328 GL_SERVICE_LOG("eglCreatePixmapSurface" 337 GL_SERVICE_LOG("eglCreatePixmapSurface"
329 << "(" << dpy << ", " << config << ", " << pixmap << ", " 338 << "(" << dpy << ", " << config << ", " << pixmap << ", "
330 << static_cast<const void*>(attrib_list) << ")"); 339 << static_cast<const void*>(attrib_list) << ")");
340 DCHECK(g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn != nullptr);
331 EGLSurface result = g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn( 341 EGLSurface result = g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn(
332 dpy, config, pixmap, attrib_list); 342 dpy, config, pixmap, attrib_list);
333 GL_SERVICE_LOG("GL_RESULT: " << result); 343 GL_SERVICE_LOG("GL_RESULT: " << result);
334 return result; 344 return result;
335 } 345 }
336 346
337 static EGLSyncKHR GL_BINDING_CALL 347 static EGLSyncKHR GL_BINDING_CALL
338 Debug_eglCreateSyncKHR(EGLDisplay dpy, 348 Debug_eglCreateSyncKHR(EGLDisplay dpy,
339 EGLenum type, 349 EGLenum type,
340 const EGLint* attrib_list) { 350 const EGLint* attrib_list) {
341 GL_SERVICE_LOG("eglCreateSyncKHR" 351 GL_SERVICE_LOG("eglCreateSyncKHR"
342 << "(" << dpy << ", " << type << ", " 352 << "(" << dpy << ", " << type << ", "
343 << static_cast<const void*>(attrib_list) << ")"); 353 << static_cast<const void*>(attrib_list) << ")");
354 DCHECK(g_driver_egl.debug_fn.eglCreateSyncKHRFn != nullptr);
344 EGLSyncKHR result = 355 EGLSyncKHR result =
345 g_driver_egl.debug_fn.eglCreateSyncKHRFn(dpy, type, attrib_list); 356 g_driver_egl.debug_fn.eglCreateSyncKHRFn(dpy, type, attrib_list);
346 GL_SERVICE_LOG("GL_RESULT: " << result); 357 GL_SERVICE_LOG("GL_RESULT: " << result);
347 return result; 358 return result;
348 } 359 }
349 360
350 static EGLSurface GL_BINDING_CALL 361 static EGLSurface GL_BINDING_CALL
351 Debug_eglCreateWindowSurface(EGLDisplay dpy, 362 Debug_eglCreateWindowSurface(EGLDisplay dpy,
352 EGLConfig config, 363 EGLConfig config,
353 EGLNativeWindowType win, 364 EGLNativeWindowType win,
354 const EGLint* attrib_list) { 365 const EGLint* attrib_list) {
355 GL_SERVICE_LOG("eglCreateWindowSurface" 366 GL_SERVICE_LOG("eglCreateWindowSurface"
356 << "(" << dpy << ", " << config << ", " << win << ", " 367 << "(" << dpy << ", " << config << ", " << win << ", "
357 << static_cast<const void*>(attrib_list) << ")"); 368 << static_cast<const void*>(attrib_list) << ")");
369 DCHECK(g_driver_egl.debug_fn.eglCreateWindowSurfaceFn != nullptr);
358 EGLSurface result = g_driver_egl.debug_fn.eglCreateWindowSurfaceFn( 370 EGLSurface result = g_driver_egl.debug_fn.eglCreateWindowSurfaceFn(
359 dpy, config, win, attrib_list); 371 dpy, config, win, attrib_list);
360 GL_SERVICE_LOG("GL_RESULT: " << result); 372 GL_SERVICE_LOG("GL_RESULT: " << result);
361 return result; 373 return result;
362 } 374 }
363 375
364 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyContext(EGLDisplay dpy, 376 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyContext(EGLDisplay dpy,
365 EGLContext ctx) { 377 EGLContext ctx) {
366 GL_SERVICE_LOG("eglDestroyContext" 378 GL_SERVICE_LOG("eglDestroyContext"
367 << "(" << dpy << ", " << ctx << ")"); 379 << "(" << dpy << ", " << ctx << ")");
380 DCHECK(g_driver_egl.debug_fn.eglDestroyContextFn != nullptr);
368 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx); 381 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx);
369 GL_SERVICE_LOG("GL_RESULT: " << result); 382 GL_SERVICE_LOG("GL_RESULT: " << result);
370 return result; 383 return result;
371 } 384 }
372 385
373 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyImageKHR(EGLDisplay dpy, 386 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyImageKHR(EGLDisplay dpy,
374 EGLImageKHR image) { 387 EGLImageKHR image) {
375 GL_SERVICE_LOG("eglDestroyImageKHR" 388 GL_SERVICE_LOG("eglDestroyImageKHR"
376 << "(" << dpy << ", " << image << ")"); 389 << "(" << dpy << ", " << image << ")");
390 DCHECK(g_driver_egl.debug_fn.eglDestroyImageKHRFn != nullptr);
377 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image); 391 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image);
378 GL_SERVICE_LOG("GL_RESULT: " << result); 392 GL_SERVICE_LOG("GL_RESULT: " << result);
379 return result; 393 return result;
380 } 394 }
381 395
382 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySurface(EGLDisplay dpy, 396 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySurface(EGLDisplay dpy,
383 EGLSurface surface) { 397 EGLSurface surface) {
384 GL_SERVICE_LOG("eglDestroySurface" 398 GL_SERVICE_LOG("eglDestroySurface"
385 << "(" << dpy << ", " << surface << ")"); 399 << "(" << dpy << ", " << surface << ")");
400 DCHECK(g_driver_egl.debug_fn.eglDestroySurfaceFn != nullptr);
386 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface); 401 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface);
387 GL_SERVICE_LOG("GL_RESULT: " << result); 402 GL_SERVICE_LOG("GL_RESULT: " << result);
388 return result; 403 return result;
389 } 404 }
390 405
391 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy, 406 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy,
392 EGLSyncKHR sync) { 407 EGLSyncKHR sync) {
393 GL_SERVICE_LOG("eglDestroySyncKHR" 408 GL_SERVICE_LOG("eglDestroySyncKHR"
394 << "(" << dpy << ", " << sync << ")"); 409 << "(" << dpy << ", " << sync << ")");
410 DCHECK(g_driver_egl.debug_fn.eglDestroySyncKHRFn != nullptr);
395 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync); 411 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync);
396 GL_SERVICE_LOG("GL_RESULT: " << result); 412 GL_SERVICE_LOG("GL_RESULT: " << result);
397 return result; 413 return result;
398 } 414 }
399 415
400 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy, 416 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy,
401 EGLConfig config, 417 EGLConfig config,
402 EGLint attribute, 418 EGLint attribute,
403 EGLint* value) { 419 EGLint* value) {
404 GL_SERVICE_LOG("eglGetConfigAttrib" 420 GL_SERVICE_LOG("eglGetConfigAttrib"
405 << "(" << dpy << ", " << config << ", " << attribute << ", " 421 << "(" << dpy << ", " << config << ", " << attribute << ", "
406 << static_cast<const void*>(value) << ")"); 422 << static_cast<const void*>(value) << ")");
423 DCHECK(g_driver_egl.debug_fn.eglGetConfigAttribFn != nullptr);
407 EGLBoolean result = 424 EGLBoolean result =
408 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value); 425 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value);
409 GL_SERVICE_LOG("GL_RESULT: " << result); 426 GL_SERVICE_LOG("GL_RESULT: " << result);
410 return result; 427 return result;
411 } 428 }
412 429
413 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigs(EGLDisplay dpy, 430 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigs(EGLDisplay dpy,
414 EGLConfig* configs, 431 EGLConfig* configs,
415 EGLint config_size, 432 EGLint config_size,
416 EGLint* num_config) { 433 EGLint* num_config) {
417 GL_SERVICE_LOG("eglGetConfigs" 434 GL_SERVICE_LOG("eglGetConfigs"
418 << "(" << dpy << ", " << static_cast<const void*>(configs) 435 << "(" << dpy << ", " << static_cast<const void*>(configs)
419 << ", " << config_size << ", " 436 << ", " << config_size << ", "
420 << static_cast<const void*>(num_config) << ")"); 437 << static_cast<const void*>(num_config) << ")");
438 DCHECK(g_driver_egl.debug_fn.eglGetConfigsFn != nullptr);
421 EGLBoolean result = g_driver_egl.debug_fn.eglGetConfigsFn( 439 EGLBoolean result = g_driver_egl.debug_fn.eglGetConfigsFn(
422 dpy, configs, config_size, num_config); 440 dpy, configs, config_size, num_config);
423 GL_SERVICE_LOG("GL_RESULT: " << result); 441 GL_SERVICE_LOG("GL_RESULT: " << result);
424 return result; 442 return result;
425 } 443 }
426 444
427 static EGLContext GL_BINDING_CALL Debug_eglGetCurrentContext(void) { 445 static EGLContext GL_BINDING_CALL Debug_eglGetCurrentContext(void) {
428 GL_SERVICE_LOG("eglGetCurrentContext" 446 GL_SERVICE_LOG("eglGetCurrentContext"
429 << "(" 447 << "("
430 << ")"); 448 << ")");
449 DCHECK(g_driver_egl.debug_fn.eglGetCurrentContextFn != nullptr);
431 EGLContext result = g_driver_egl.debug_fn.eglGetCurrentContextFn(); 450 EGLContext result = g_driver_egl.debug_fn.eglGetCurrentContextFn();
432 GL_SERVICE_LOG("GL_RESULT: " << result); 451 GL_SERVICE_LOG("GL_RESULT: " << result);
433 return result; 452 return result;
434 } 453 }
435 454
436 static EGLDisplay GL_BINDING_CALL Debug_eglGetCurrentDisplay(void) { 455 static EGLDisplay GL_BINDING_CALL Debug_eglGetCurrentDisplay(void) {
437 GL_SERVICE_LOG("eglGetCurrentDisplay" 456 GL_SERVICE_LOG("eglGetCurrentDisplay"
438 << "(" 457 << "("
439 << ")"); 458 << ")");
459 DCHECK(g_driver_egl.debug_fn.eglGetCurrentDisplayFn != nullptr);
440 EGLDisplay result = g_driver_egl.debug_fn.eglGetCurrentDisplayFn(); 460 EGLDisplay result = g_driver_egl.debug_fn.eglGetCurrentDisplayFn();
441 GL_SERVICE_LOG("GL_RESULT: " << result); 461 GL_SERVICE_LOG("GL_RESULT: " << result);
442 return result; 462 return result;
443 } 463 }
444 464
445 static EGLSurface GL_BINDING_CALL Debug_eglGetCurrentSurface(EGLint readdraw) { 465 static EGLSurface GL_BINDING_CALL Debug_eglGetCurrentSurface(EGLint readdraw) {
446 GL_SERVICE_LOG("eglGetCurrentSurface" 466 GL_SERVICE_LOG("eglGetCurrentSurface"
447 << "(" << readdraw << ")"); 467 << "(" << readdraw << ")");
468 DCHECK(g_driver_egl.debug_fn.eglGetCurrentSurfaceFn != nullptr);
448 EGLSurface result = g_driver_egl.debug_fn.eglGetCurrentSurfaceFn(readdraw); 469 EGLSurface result = g_driver_egl.debug_fn.eglGetCurrentSurfaceFn(readdraw);
449 GL_SERVICE_LOG("GL_RESULT: " << result); 470 GL_SERVICE_LOG("GL_RESULT: " << result);
450 return result; 471 return result;
451 } 472 }
452 473
453 static EGLDisplay GL_BINDING_CALL 474 static EGLDisplay GL_BINDING_CALL
454 Debug_eglGetDisplay(EGLNativeDisplayType display_id) { 475 Debug_eglGetDisplay(EGLNativeDisplayType display_id) {
455 GL_SERVICE_LOG("eglGetDisplay" 476 GL_SERVICE_LOG("eglGetDisplay"
456 << "(" << display_id << ")"); 477 << "(" << display_id << ")");
478 DCHECK(g_driver_egl.debug_fn.eglGetDisplayFn != nullptr);
457 EGLDisplay result = g_driver_egl.debug_fn.eglGetDisplayFn(display_id); 479 EGLDisplay result = g_driver_egl.debug_fn.eglGetDisplayFn(display_id);
458 GL_SERVICE_LOG("GL_RESULT: " << result); 480 GL_SERVICE_LOG("GL_RESULT: " << result);
459 return result; 481 return result;
460 } 482 }
461 483
462 static EGLint GL_BINDING_CALL Debug_eglGetError(void) { 484 static EGLint GL_BINDING_CALL Debug_eglGetError(void) {
463 GL_SERVICE_LOG("eglGetError" 485 GL_SERVICE_LOG("eglGetError"
464 << "(" 486 << "("
465 << ")"); 487 << ")");
488 DCHECK(g_driver_egl.debug_fn.eglGetErrorFn != nullptr);
466 EGLint result = g_driver_egl.debug_fn.eglGetErrorFn(); 489 EGLint result = g_driver_egl.debug_fn.eglGetErrorFn();
467 GL_SERVICE_LOG("GL_RESULT: " << result); 490 GL_SERVICE_LOG("GL_RESULT: " << result);
468 return result; 491 return result;
469 } 492 }
470 493
471 static EGLDisplay GL_BINDING_CALL 494 static EGLDisplay GL_BINDING_CALL
472 Debug_eglGetPlatformDisplayEXT(EGLenum platform, 495 Debug_eglGetPlatformDisplayEXT(EGLenum platform,
473 void* native_display, 496 void* native_display,
474 const EGLint* attrib_list) { 497 const EGLint* attrib_list) {
475 GL_SERVICE_LOG("eglGetPlatformDisplayEXT" 498 GL_SERVICE_LOG("eglGetPlatformDisplayEXT"
476 << "(" << platform << ", " 499 << "(" << platform << ", "
477 << static_cast<const void*>(native_display) << ", " 500 << static_cast<const void*>(native_display) << ", "
478 << static_cast<const void*>(attrib_list) << ")"); 501 << static_cast<const void*>(attrib_list) << ")");
502 DCHECK(g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn != nullptr);
479 EGLDisplay result = g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn( 503 EGLDisplay result = g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn(
480 platform, native_display, attrib_list); 504 platform, native_display, attrib_list);
481 GL_SERVICE_LOG("GL_RESULT: " << result); 505 GL_SERVICE_LOG("GL_RESULT: " << result);
482 return result; 506 return result;
483 } 507 }
484 508
485 static __eglMustCastToProperFunctionPointerType GL_BINDING_CALL 509 static __eglMustCastToProperFunctionPointerType GL_BINDING_CALL
486 Debug_eglGetProcAddress(const char* procname) { 510 Debug_eglGetProcAddress(const char* procname) {
487 GL_SERVICE_LOG("eglGetProcAddress" 511 GL_SERVICE_LOG("eglGetProcAddress"
488 << "(" << procname << ")"); 512 << "(" << procname << ")");
513 DCHECK(g_driver_egl.debug_fn.eglGetProcAddressFn != nullptr);
489 __eglMustCastToProperFunctionPointerType result = 514 __eglMustCastToProperFunctionPointerType result =
490 g_driver_egl.debug_fn.eglGetProcAddressFn(procname); 515 g_driver_egl.debug_fn.eglGetProcAddressFn(procname);
491 GL_SERVICE_LOG("GL_RESULT: " << result); 516 GL_SERVICE_LOG("GL_RESULT: " << result);
492 return result; 517 return result;
493 } 518 }
494 519
495 static EGLBoolean GL_BINDING_CALL Debug_eglGetSyncAttribKHR(EGLDisplay dpy, 520 static EGLBoolean GL_BINDING_CALL Debug_eglGetSyncAttribKHR(EGLDisplay dpy,
496 EGLSyncKHR sync, 521 EGLSyncKHR sync,
497 EGLint attribute, 522 EGLint attribute,
498 EGLint* value) { 523 EGLint* value) {
499 GL_SERVICE_LOG("eglGetSyncAttribKHR" 524 GL_SERVICE_LOG("eglGetSyncAttribKHR"
500 << "(" << dpy << ", " << sync << ", " << attribute << ", " 525 << "(" << dpy << ", " << sync << ", " << attribute << ", "
501 << static_cast<const void*>(value) << ")"); 526 << static_cast<const void*>(value) << ")");
527 DCHECK(g_driver_egl.debug_fn.eglGetSyncAttribKHRFn != nullptr);
502 EGLBoolean result = 528 EGLBoolean result =
503 g_driver_egl.debug_fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value); 529 g_driver_egl.debug_fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
504 GL_SERVICE_LOG("GL_RESULT: " << result); 530 GL_SERVICE_LOG("GL_RESULT: " << result);
505 return result; 531 return result;
506 } 532 }
507 533
508 static EGLBoolean GL_BINDING_CALL 534 static EGLBoolean GL_BINDING_CALL
509 Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy, 535 Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
510 EGLSurface surface, 536 EGLSurface surface,
511 EGLuint64CHROMIUM* ust, 537 EGLuint64CHROMIUM* ust,
512 EGLuint64CHROMIUM* msc, 538 EGLuint64CHROMIUM* msc,
513 EGLuint64CHROMIUM* sbc) { 539 EGLuint64CHROMIUM* sbc) {
514 GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM" 540 GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM"
515 << "(" << dpy << ", " << surface << ", " 541 << "(" << dpy << ", " << surface << ", "
516 << static_cast<const void*>(ust) << ", " 542 << static_cast<const void*>(ust) << ", "
517 << static_cast<const void*>(msc) << ", " 543 << static_cast<const void*>(msc) << ", "
518 << static_cast<const void*>(sbc) << ")"); 544 << static_cast<const void*>(sbc) << ")");
545 DCHECK(g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn != nullptr);
519 EGLBoolean result = g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn( 546 EGLBoolean result = g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn(
520 dpy, surface, ust, msc, sbc); 547 dpy, surface, ust, msc, sbc);
521 GL_SERVICE_LOG("GL_RESULT: " << result); 548 GL_SERVICE_LOG("GL_RESULT: " << result);
522 return result; 549 return result;
523 } 550 }
524 551
525 static EGLBoolean GL_BINDING_CALL Debug_eglInitialize(EGLDisplay dpy, 552 static EGLBoolean GL_BINDING_CALL Debug_eglInitialize(EGLDisplay dpy,
526 EGLint* major, 553 EGLint* major,
527 EGLint* minor) { 554 EGLint* minor) {
528 GL_SERVICE_LOG("eglInitialize" 555 GL_SERVICE_LOG("eglInitialize"
529 << "(" << dpy << ", " << static_cast<const void*>(major) 556 << "(" << dpy << ", " << static_cast<const void*>(major)
530 << ", " << static_cast<const void*>(minor) << ")"); 557 << ", " << static_cast<const void*>(minor) << ")");
558 DCHECK(g_driver_egl.debug_fn.eglInitializeFn != nullptr);
531 EGLBoolean result = g_driver_egl.debug_fn.eglInitializeFn(dpy, major, minor); 559 EGLBoolean result = g_driver_egl.debug_fn.eglInitializeFn(dpy, major, minor);
532 GL_SERVICE_LOG("GL_RESULT: " << result); 560 GL_SERVICE_LOG("GL_RESULT: " << result);
533 return result; 561 return result;
534 } 562 }
535 563
536 static EGLBoolean GL_BINDING_CALL Debug_eglMakeCurrent(EGLDisplay dpy, 564 static EGLBoolean GL_BINDING_CALL Debug_eglMakeCurrent(EGLDisplay dpy,
537 EGLSurface draw, 565 EGLSurface draw,
538 EGLSurface read, 566 EGLSurface read,
539 EGLContext ctx) { 567 EGLContext ctx) {
540 GL_SERVICE_LOG("eglMakeCurrent" 568 GL_SERVICE_LOG("eglMakeCurrent"
541 << "(" << dpy << ", " << draw << ", " << read << ", " << ctx 569 << "(" << dpy << ", " << draw << ", " << read << ", " << ctx
542 << ")"); 570 << ")");
571 DCHECK(g_driver_egl.debug_fn.eglMakeCurrentFn != nullptr);
543 EGLBoolean result = 572 EGLBoolean result =
544 g_driver_egl.debug_fn.eglMakeCurrentFn(dpy, draw, read, ctx); 573 g_driver_egl.debug_fn.eglMakeCurrentFn(dpy, draw, read, ctx);
545 GL_SERVICE_LOG("GL_RESULT: " << result); 574 GL_SERVICE_LOG("GL_RESULT: " << result);
546 return result; 575 return result;
547 } 576 }
548 577
549 static EGLBoolean GL_BINDING_CALL Debug_eglPostSubBufferNV(EGLDisplay dpy, 578 static EGLBoolean GL_BINDING_CALL Debug_eglPostSubBufferNV(EGLDisplay dpy,
550 EGLSurface surface, 579 EGLSurface surface,
551 EGLint x, 580 EGLint x,
552 EGLint y, 581 EGLint y,
553 EGLint width, 582 EGLint width,
554 EGLint height) { 583 EGLint height) {
555 GL_SERVICE_LOG("eglPostSubBufferNV" 584 GL_SERVICE_LOG("eglPostSubBufferNV"
556 << "(" << dpy << ", " << surface << ", " << x << ", " << y 585 << "(" << dpy << ", " << surface << ", " << x << ", " << y
557 << ", " << width << ", " << height << ")"); 586 << ", " << width << ", " << height << ")");
587 DCHECK(g_driver_egl.debug_fn.eglPostSubBufferNVFn != nullptr);
558 EGLBoolean result = g_driver_egl.debug_fn.eglPostSubBufferNVFn( 588 EGLBoolean result = g_driver_egl.debug_fn.eglPostSubBufferNVFn(
559 dpy, surface, x, y, width, height); 589 dpy, surface, x, y, width, height);
560 GL_SERVICE_LOG("GL_RESULT: " << result); 590 GL_SERVICE_LOG("GL_RESULT: " << result);
561 return result; 591 return result;
562 } 592 }
563 593
564 static EGLenum GL_BINDING_CALL Debug_eglQueryAPI(void) { 594 static EGLenum GL_BINDING_CALL Debug_eglQueryAPI(void) {
565 GL_SERVICE_LOG("eglQueryAPI" 595 GL_SERVICE_LOG("eglQueryAPI"
566 << "(" 596 << "("
567 << ")"); 597 << ")");
598 DCHECK(g_driver_egl.debug_fn.eglQueryAPIFn != nullptr);
568 EGLenum result = g_driver_egl.debug_fn.eglQueryAPIFn(); 599 EGLenum result = g_driver_egl.debug_fn.eglQueryAPIFn();
569 GL_SERVICE_LOG("GL_RESULT: " << result); 600 GL_SERVICE_LOG("GL_RESULT: " << result);
570 return result; 601 return result;
571 } 602 }
572 603
573 static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy, 604 static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy,
574 EGLContext ctx, 605 EGLContext ctx,
575 EGLint attribute, 606 EGLint attribute,
576 EGLint* value) { 607 EGLint* value) {
577 GL_SERVICE_LOG("eglQueryContext" 608 GL_SERVICE_LOG("eglQueryContext"
578 << "(" << dpy << ", " << ctx << ", " << attribute << ", " 609 << "(" << dpy << ", " << ctx << ", " << attribute << ", "
579 << static_cast<const void*>(value) << ")"); 610 << static_cast<const void*>(value) << ")");
611 DCHECK(g_driver_egl.debug_fn.eglQueryContextFn != nullptr);
580 EGLBoolean result = 612 EGLBoolean result =
581 g_driver_egl.debug_fn.eglQueryContextFn(dpy, ctx, attribute, value); 613 g_driver_egl.debug_fn.eglQueryContextFn(dpy, ctx, attribute, value);
582 GL_SERVICE_LOG("GL_RESULT: " << result); 614 GL_SERVICE_LOG("GL_RESULT: " << result);
583 return result; 615 return result;
584 } 616 }
585 617
586 static const char* GL_BINDING_CALL Debug_eglQueryString(EGLDisplay dpy, 618 static const char* GL_BINDING_CALL Debug_eglQueryString(EGLDisplay dpy,
587 EGLint name) { 619 EGLint name) {
588 GL_SERVICE_LOG("eglQueryString" 620 GL_SERVICE_LOG("eglQueryString"
589 << "(" << dpy << ", " << name << ")"); 621 << "(" << dpy << ", " << name << ")");
622 DCHECK(g_driver_egl.debug_fn.eglQueryStringFn != nullptr);
590 const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name); 623 const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name);
591 GL_SERVICE_LOG("GL_RESULT: " << result); 624 GL_SERVICE_LOG("GL_RESULT: " << result);
592 return result; 625 return result;
593 } 626 }
594 627
595 static EGLBoolean GL_BINDING_CALL Debug_eglQuerySurface(EGLDisplay dpy, 628 static EGLBoolean GL_BINDING_CALL Debug_eglQuerySurface(EGLDisplay dpy,
596 EGLSurface surface, 629 EGLSurface surface,
597 EGLint attribute, 630 EGLint attribute,
598 EGLint* value) { 631 EGLint* value) {
599 GL_SERVICE_LOG("eglQuerySurface" 632 GL_SERVICE_LOG("eglQuerySurface"
600 << "(" << dpy << ", " << surface << ", " << attribute << ", " 633 << "(" << dpy << ", " << surface << ", " << attribute << ", "
601 << static_cast<const void*>(value) << ")"); 634 << static_cast<const void*>(value) << ")");
635 DCHECK(g_driver_egl.debug_fn.eglQuerySurfaceFn != nullptr);
602 EGLBoolean result = 636 EGLBoolean result =
603 g_driver_egl.debug_fn.eglQuerySurfaceFn(dpy, surface, attribute, value); 637 g_driver_egl.debug_fn.eglQuerySurfaceFn(dpy, surface, attribute, value);
604 GL_SERVICE_LOG("GL_RESULT: " << result); 638 GL_SERVICE_LOG("GL_RESULT: " << result);
605 return result; 639 return result;
606 } 640 }
607 641
608 static EGLBoolean GL_BINDING_CALL 642 static EGLBoolean GL_BINDING_CALL
609 Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy, 643 Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy,
610 EGLSurface surface, 644 EGLSurface surface,
611 EGLint attribute, 645 EGLint attribute,
612 void** value) { 646 void** value) {
613 GL_SERVICE_LOG("eglQuerySurfacePointerANGLE" 647 GL_SERVICE_LOG("eglQuerySurfacePointerANGLE"
614 << "(" << dpy << ", " << surface << ", " << attribute << ", " 648 << "(" << dpy << ", " << surface << ", " << attribute << ", "
615 << value << ")"); 649 << value << ")");
650 DCHECK(g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn != nullptr);
616 EGLBoolean result = g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn( 651 EGLBoolean result = g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn(
617 dpy, surface, attribute, value); 652 dpy, surface, attribute, value);
618 GL_SERVICE_LOG("GL_RESULT: " << result); 653 GL_SERVICE_LOG("GL_RESULT: " << result);
619 return result; 654 return result;
620 } 655 }
621 656
622 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseTexImage(EGLDisplay dpy, 657 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseTexImage(EGLDisplay dpy,
623 EGLSurface surface, 658 EGLSurface surface,
624 EGLint buffer) { 659 EGLint buffer) {
625 GL_SERVICE_LOG("eglReleaseTexImage" 660 GL_SERVICE_LOG("eglReleaseTexImage"
626 << "(" << dpy << ", " << surface << ", " << buffer << ")"); 661 << "(" << dpy << ", " << surface << ", " << buffer << ")");
662 DCHECK(g_driver_egl.debug_fn.eglReleaseTexImageFn != nullptr);
627 EGLBoolean result = 663 EGLBoolean result =
628 g_driver_egl.debug_fn.eglReleaseTexImageFn(dpy, surface, buffer); 664 g_driver_egl.debug_fn.eglReleaseTexImageFn(dpy, surface, buffer);
629 GL_SERVICE_LOG("GL_RESULT: " << result); 665 GL_SERVICE_LOG("GL_RESULT: " << result);
630 return result; 666 return result;
631 } 667 }
632 668
633 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseThread(void) { 669 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseThread(void) {
634 GL_SERVICE_LOG("eglReleaseThread" 670 GL_SERVICE_LOG("eglReleaseThread"
635 << "(" 671 << "("
636 << ")"); 672 << ")");
673 DCHECK(g_driver_egl.debug_fn.eglReleaseThreadFn != nullptr);
637 EGLBoolean result = g_driver_egl.debug_fn.eglReleaseThreadFn(); 674 EGLBoolean result = g_driver_egl.debug_fn.eglReleaseThreadFn();
638 GL_SERVICE_LOG("GL_RESULT: " << result); 675 GL_SERVICE_LOG("GL_RESULT: " << result);
639 return result; 676 return result;
640 } 677 }
641 678
642 static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy, 679 static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy,
643 EGLSurface surface, 680 EGLSurface surface,
644 EGLint attribute, 681 EGLint attribute,
645 EGLint value) { 682 EGLint value) {
646 GL_SERVICE_LOG("eglSurfaceAttrib" 683 GL_SERVICE_LOG("eglSurfaceAttrib"
647 << "(" << dpy << ", " << surface << ", " << attribute << ", " 684 << "(" << dpy << ", " << surface << ", " << attribute << ", "
648 << value << ")"); 685 << value << ")");
686 DCHECK(g_driver_egl.debug_fn.eglSurfaceAttribFn != nullptr);
649 EGLBoolean result = 687 EGLBoolean result =
650 g_driver_egl.debug_fn.eglSurfaceAttribFn(dpy, surface, attribute, value); 688 g_driver_egl.debug_fn.eglSurfaceAttribFn(dpy, surface, attribute, value);
651 GL_SERVICE_LOG("GL_RESULT: " << result); 689 GL_SERVICE_LOG("GL_RESULT: " << result);
652 return result; 690 return result;
653 } 691 }
654 692
655 static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy, 693 static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy,
656 EGLSurface surface) { 694 EGLSurface surface) {
657 GL_SERVICE_LOG("eglSwapBuffers" 695 GL_SERVICE_LOG("eglSwapBuffers"
658 << "(" << dpy << ", " << surface << ")"); 696 << "(" << dpy << ", " << surface << ")");
697 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersFn != nullptr);
659 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface); 698 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface);
660 GL_SERVICE_LOG("GL_RESULT: " << result); 699 GL_SERVICE_LOG("GL_RESULT: " << result);
661 return result; 700 return result;
662 } 701 }
663 702
664 static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy, 703 static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy,
665 EGLint interval) { 704 EGLint interval) {
666 GL_SERVICE_LOG("eglSwapInterval" 705 GL_SERVICE_LOG("eglSwapInterval"
667 << "(" << dpy << ", " << interval << ")"); 706 << "(" << dpy << ", " << interval << ")");
707 DCHECK(g_driver_egl.debug_fn.eglSwapIntervalFn != nullptr);
668 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval); 708 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval);
669 GL_SERVICE_LOG("GL_RESULT: " << result); 709 GL_SERVICE_LOG("GL_RESULT: " << result);
670 return result; 710 return result;
671 } 711 }
672 712
673 static EGLBoolean GL_BINDING_CALL Debug_eglTerminate(EGLDisplay dpy) { 713 static EGLBoolean GL_BINDING_CALL Debug_eglTerminate(EGLDisplay dpy) {
674 GL_SERVICE_LOG("eglTerminate" 714 GL_SERVICE_LOG("eglTerminate"
675 << "(" << dpy << ")"); 715 << "(" << dpy << ")");
716 DCHECK(g_driver_egl.debug_fn.eglTerminateFn != nullptr);
676 EGLBoolean result = g_driver_egl.debug_fn.eglTerminateFn(dpy); 717 EGLBoolean result = g_driver_egl.debug_fn.eglTerminateFn(dpy);
677 GL_SERVICE_LOG("GL_RESULT: " << result); 718 GL_SERVICE_LOG("GL_RESULT: " << result);
678 return result; 719 return result;
679 } 720 }
680 721
681 static EGLBoolean GL_BINDING_CALL Debug_eglWaitClient(void) { 722 static EGLBoolean GL_BINDING_CALL Debug_eglWaitClient(void) {
682 GL_SERVICE_LOG("eglWaitClient" 723 GL_SERVICE_LOG("eglWaitClient"
683 << "(" 724 << "("
684 << ")"); 725 << ")");
726 DCHECK(g_driver_egl.debug_fn.eglWaitClientFn != nullptr);
685 EGLBoolean result = g_driver_egl.debug_fn.eglWaitClientFn(); 727 EGLBoolean result = g_driver_egl.debug_fn.eglWaitClientFn();
686 GL_SERVICE_LOG("GL_RESULT: " << result); 728 GL_SERVICE_LOG("GL_RESULT: " << result);
687 return result; 729 return result;
688 } 730 }
689 731
690 static EGLBoolean GL_BINDING_CALL Debug_eglWaitGL(void) { 732 static EGLBoolean GL_BINDING_CALL Debug_eglWaitGL(void) {
691 GL_SERVICE_LOG("eglWaitGL" 733 GL_SERVICE_LOG("eglWaitGL"
692 << "(" 734 << "("
693 << ")"); 735 << ")");
736 DCHECK(g_driver_egl.debug_fn.eglWaitGLFn != nullptr);
694 EGLBoolean result = g_driver_egl.debug_fn.eglWaitGLFn(); 737 EGLBoolean result = g_driver_egl.debug_fn.eglWaitGLFn();
695 GL_SERVICE_LOG("GL_RESULT: " << result); 738 GL_SERVICE_LOG("GL_RESULT: " << result);
696 return result; 739 return result;
697 } 740 }
698 741
699 static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) { 742 static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) {
700 GL_SERVICE_LOG("eglWaitNative" 743 GL_SERVICE_LOG("eglWaitNative"
701 << "(" << engine << ")"); 744 << "(" << engine << ")");
745 DCHECK(g_driver_egl.debug_fn.eglWaitNativeFn != nullptr);
702 EGLBoolean result = g_driver_egl.debug_fn.eglWaitNativeFn(engine); 746 EGLBoolean result = g_driver_egl.debug_fn.eglWaitNativeFn(engine);
703 GL_SERVICE_LOG("GL_RESULT: " << result); 747 GL_SERVICE_LOG("GL_RESULT: " << result);
704 return result; 748 return result;
705 } 749 }
706 750
707 static EGLint GL_BINDING_CALL Debug_eglWaitSyncKHR(EGLDisplay dpy, 751 static EGLint GL_BINDING_CALL Debug_eglWaitSyncKHR(EGLDisplay dpy,
708 EGLSyncKHR sync, 752 EGLSyncKHR sync,
709 EGLint flags) { 753 EGLint flags) {
710 GL_SERVICE_LOG("eglWaitSyncKHR" 754 GL_SERVICE_LOG("eglWaitSyncKHR"
711 << "(" << dpy << ", " << sync << ", " << flags << ")"); 755 << "(" << dpy << ", " << sync << ", " << flags << ")");
756 DCHECK(g_driver_egl.debug_fn.eglWaitSyncKHRFn != nullptr);
712 EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags); 757 EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags);
713 GL_SERVICE_LOG("GL_RESULT: " << result); 758 GL_SERVICE_LOG("GL_RESULT: " << result);
714 return result; 759 return result;
715 } 760 }
716 } // extern "C" 761 } // extern "C"
717 762
718 void DriverEGL::InitializeDebugBindings() { 763 void DriverEGL::InitializeDebugBindings() {
719 if (!debug_fn.eglBindAPIFn) { 764 if (!debug_fn.eglBindAPIFn) {
720 debug_fn.eglBindAPIFn = fn.eglBindAPIFn; 765 debug_fn.eglBindAPIFn = fn.eglBindAPIFn;
721 fn.eglBindAPIFn = Debug_eglBindAPI; 766 fn.eglBindAPIFn = Debug_eglBindAPI;
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 } 1512 }
1468 1513
1469 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, 1514 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy,
1470 EGLSyncKHR sync, 1515 EGLSyncKHR sync,
1471 EGLint flags) { 1516 EGLint flags) {
1472 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") 1517 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR")
1473 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); 1518 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags);
1474 } 1519 }
1475 1520
1476 } // namespace gfx 1521 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_bindings_autogen_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698