Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 1 | /* WARNING: This is auto-generated file. Do not modify, since changes will |
| 2 | * be lost! Modify the generating script instead. |
| 3 | * |
Peiyong Lin | bf22150 | 2018-12-27 15:53:39 -0800 | [diff] [blame] | 4 | * Generated from Khronos EGL API description (egl.xml) revision 3338ed0db494d6a4db7f76627b38f0b1892db096. |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | EGLint eglwClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) |
| 8 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 9 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 10 | if (!egl) |
| 11 | return (EGLint)0; |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 12 | return egl->clientWaitSyncKHR(dpy, sync, flags, timeout); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | EGLImageKHR eglwCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list) |
| 16 | { |
| 17 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
| 18 | if (!egl) |
| 19 | return (EGLImageKHR)0; |
| 20 | return egl->createImageKHR(dpy, ctx, target, buffer, attrib_list); |
| 21 | } |
| 22 | |
| 23 | EGLSurface eglwCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list) |
| 24 | { |
| 25 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
| 26 | if (!egl) |
| 27 | return (EGLSurface)0; |
| 28 | return egl->createPlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list); |
| 29 | } |
| 30 | |
| 31 | EGLSurface eglwCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list) |
| 32 | { |
| 33 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
| 34 | if (!egl) |
| 35 | return (EGLSurface)0; |
| 36 | return egl->createPlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list); |
| 37 | } |
| 38 | |
| 39 | EGLSyncKHR eglwCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) |
| 40 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 41 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 42 | if (!egl) |
| 43 | return (EGLSyncKHR)0; |
| 44 | return egl->createSyncKHR(dpy, type, attrib_list); |
| 45 | } |
| 46 | |
| 47 | EGLBoolean eglwDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image) |
| 48 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 49 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 50 | if (!egl) |
| 51 | return (EGLBoolean)0; |
| 52 | return egl->destroyImageKHR(dpy, image); |
| 53 | } |
| 54 | |
| 55 | EGLBoolean eglwDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync) |
| 56 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 57 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 58 | if (!egl) |
| 59 | return (EGLBoolean)0; |
| 60 | return egl->destroySyncKHR(dpy, sync); |
| 61 | } |
| 62 | |
| 63 | EGLDisplay eglwGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list) |
| 64 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 65 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 66 | if (!egl) |
| 67 | return (EGLDisplay)0; |
| 68 | return egl->getPlatformDisplayEXT(platform, native_display, attrib_list); |
| 69 | } |
| 70 | |
| 71 | EGLBoolean eglwGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value) |
| 72 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 73 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 74 | if (!egl) |
| 75 | return (EGLBoolean)0; |
| 76 | return egl->getSyncAttribKHR(dpy, sync, attribute, value); |
| 77 | } |
| 78 | |
| 79 | EGLBoolean eglwLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list) |
| 80 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 81 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 82 | if (!egl) |
| 83 | return (EGLBoolean)0; |
| 84 | return egl->lockSurfaceKHR(dpy, surface, attrib_list); |
| 85 | } |
| 86 | |
| 87 | EGLBoolean eglwSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) |
| 88 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 89 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 90 | if (!egl) |
| 91 | return (EGLBoolean)0; |
| 92 | return egl->setDamageRegionKHR(dpy, surface, rects, n_rects); |
| 93 | } |
| 94 | |
| 95 | EGLBoolean eglwSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) |
| 96 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 97 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 98 | if (!egl) |
| 99 | return (EGLBoolean)0; |
| 100 | return egl->signalSyncKHR(dpy, sync, mode); |
| 101 | } |
| 102 | |
| 103 | EGLBoolean eglwSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) |
| 104 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 105 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 106 | if (!egl) |
| 107 | return (EGLBoolean)0; |
| 108 | return egl->swapBuffersWithDamageKHR(dpy, surface, rects, n_rects); |
| 109 | } |
| 110 | |
| 111 | EGLBoolean eglwUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface) |
| 112 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 113 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 114 | if (!egl) |
| 115 | return (EGLBoolean)0; |
| 116 | return egl->unlockSurfaceKHR(dpy, surface); |
| 117 | } |
| 118 | |
| 119 | EGLint eglwWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) |
| 120 | { |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 121 | const eglw::Library* egl = eglw::getCurrentThreadLibrary(); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 122 | if (!egl) |
| 123 | return (EGLint)0; |
Pyry Haulos | cc5411b | 2017-03-30 16:42:23 -0700 | [diff] [blame] | 124 | return egl->waitSyncKHR(dpy, sync, flags); |
Pyry Haulos | ca801e7 | 2016-11-17 15:26:29 -0800 | [diff] [blame] | 125 | } |