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

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

Issue 2302393002: Support swap damage rect using eglSwapBuffersWithDamageKHR (Closed)
Patch Set: Update GLSurfaceAdapter Created 4 years, 3 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/gl_bindings_autogen_egl.h ('k') | ui/gl/gl_surface.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 fn.eglStreamAttribKHRFn = 0; 102 fn.eglStreamAttribKHRFn = 0;
103 fn.eglStreamConsumerAcquireKHRFn = 0; 103 fn.eglStreamConsumerAcquireKHRFn = 0;
104 fn.eglStreamConsumerGLTextureExternalAttribsNVFn = 0; 104 fn.eglStreamConsumerGLTextureExternalAttribsNVFn = 0;
105 fn.eglStreamConsumerGLTextureExternalKHRFn = 0; 105 fn.eglStreamConsumerGLTextureExternalKHRFn = 0;
106 fn.eglStreamConsumerReleaseKHRFn = 0; 106 fn.eglStreamConsumerReleaseKHRFn = 0;
107 fn.eglStreamPostD3DTextureNV12ANGLEFn = 0; 107 fn.eglStreamPostD3DTextureNV12ANGLEFn = 0;
108 fn.eglSurfaceAttribFn = reinterpret_cast<eglSurfaceAttribProc>( 108 fn.eglSurfaceAttribFn = reinterpret_cast<eglSurfaceAttribProc>(
109 GetGLProcAddress("eglSurfaceAttrib")); 109 GetGLProcAddress("eglSurfaceAttrib"));
110 fn.eglSwapBuffersFn = 110 fn.eglSwapBuffersFn =
111 reinterpret_cast<eglSwapBuffersProc>(GetGLProcAddress("eglSwapBuffers")); 111 reinterpret_cast<eglSwapBuffersProc>(GetGLProcAddress("eglSwapBuffers"));
112 fn.eglSwapBuffersWithDamageKHRFn = 0;
112 fn.eglSwapIntervalFn = reinterpret_cast<eglSwapIntervalProc>( 113 fn.eglSwapIntervalFn = reinterpret_cast<eglSwapIntervalProc>(
113 GetGLProcAddress("eglSwapInterval")); 114 GetGLProcAddress("eglSwapInterval"));
114 fn.eglTerminateFn = 115 fn.eglTerminateFn =
115 reinterpret_cast<eglTerminateProc>(GetGLProcAddress("eglTerminate")); 116 reinterpret_cast<eglTerminateProc>(GetGLProcAddress("eglTerminate"));
116 fn.eglWaitClientFn = 117 fn.eglWaitClientFn =
117 reinterpret_cast<eglWaitClientProc>(GetGLProcAddress("eglWaitClient")); 118 reinterpret_cast<eglWaitClientProc>(GetGLProcAddress("eglWaitClient"));
118 fn.eglWaitGLFn = 119 fn.eglWaitGLFn =
119 reinterpret_cast<eglWaitGLProc>(GetGLProcAddress("eglWaitGL")); 120 reinterpret_cast<eglWaitGLProc>(GetGLProcAddress("eglWaitGL"));
120 fn.eglWaitNativeFn = 121 fn.eglWaitNativeFn =
121 reinterpret_cast<eglWaitNativeProc>(GetGLProcAddress("eglWaitNative")); 122 reinterpret_cast<eglWaitNativeProc>(GetGLProcAddress("eglWaitNative"));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ext.b_EGL_KHR_image = extensions.find("EGL_KHR_image ") != std::string::npos; 166 ext.b_EGL_KHR_image = extensions.find("EGL_KHR_image ") != std::string::npos;
166 ext.b_EGL_KHR_image_base = 167 ext.b_EGL_KHR_image_base =
167 extensions.find("EGL_KHR_image_base ") != std::string::npos; 168 extensions.find("EGL_KHR_image_base ") != std::string::npos;
168 ext.b_EGL_KHR_reusable_sync = 169 ext.b_EGL_KHR_reusable_sync =
169 extensions.find("EGL_KHR_reusable_sync ") != std::string::npos; 170 extensions.find("EGL_KHR_reusable_sync ") != std::string::npos;
170 ext.b_EGL_KHR_stream = 171 ext.b_EGL_KHR_stream =
171 extensions.find("EGL_KHR_stream ") != std::string::npos; 172 extensions.find("EGL_KHR_stream ") != std::string::npos;
172 ext.b_EGL_KHR_stream_consumer_gltexture = 173 ext.b_EGL_KHR_stream_consumer_gltexture =
173 extensions.find("EGL_KHR_stream_consumer_gltexture ") != 174 extensions.find("EGL_KHR_stream_consumer_gltexture ") !=
174 std::string::npos; 175 std::string::npos;
176 ext.b_EGL_KHR_swap_buffers_with_damage =
177 extensions.find("EGL_KHR_swap_buffers_with_damage ") != std::string::npos;
175 ext.b_EGL_KHR_wait_sync = 178 ext.b_EGL_KHR_wait_sync =
176 extensions.find("EGL_KHR_wait_sync ") != std::string::npos; 179 extensions.find("EGL_KHR_wait_sync ") != std::string::npos;
177 ext.b_EGL_NV_post_sub_buffer = 180 ext.b_EGL_NV_post_sub_buffer =
178 extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos; 181 extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos;
179 ext.b_EGL_NV_stream_consumer_gltexture_yuv = 182 ext.b_EGL_NV_stream_consumer_gltexture_yuv =
180 extensions.find("EGL_NV_stream_consumer_gltexture_yuv ") != 183 extensions.find("EGL_NV_stream_consumer_gltexture_yuv ") !=
181 std::string::npos; 184 std::string::npos;
182 ext.b_GL_CHROMIUM_egl_khr_fence_sync_hack = 185 ext.b_GL_CHROMIUM_egl_khr_fence_sync_hack =
183 extensions.find("GL_CHROMIUM_egl_khr_fence_sync_hack ") != 186 extensions.find("GL_CHROMIUM_egl_khr_fence_sync_hack ") !=
184 std::string::npos; 187 std::string::npos;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 GetGLProcAddress("eglStreamConsumerReleaseKHR")); 291 GetGLProcAddress("eglStreamConsumerReleaseKHR"));
289 } 292 }
290 293
291 debug_fn.eglStreamPostD3DTextureNV12ANGLEFn = 0; 294 debug_fn.eglStreamPostD3DTextureNV12ANGLEFn = 0;
292 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) { 295 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) {
293 fn.eglStreamPostD3DTextureNV12ANGLEFn = 296 fn.eglStreamPostD3DTextureNV12ANGLEFn =
294 reinterpret_cast<eglStreamPostD3DTextureNV12ANGLEProc>( 297 reinterpret_cast<eglStreamPostD3DTextureNV12ANGLEProc>(
295 GetGLProcAddress("eglStreamPostD3DTextureNV12ANGLE")); 298 GetGLProcAddress("eglStreamPostD3DTextureNV12ANGLE"));
296 } 299 }
297 300
301 debug_fn.eglSwapBuffersWithDamageKHRFn = 0;
302 if (ext.b_EGL_KHR_swap_buffers_with_damage) {
303 fn.eglSwapBuffersWithDamageKHRFn =
304 reinterpret_cast<eglSwapBuffersWithDamageKHRProc>(
305 GetGLProcAddress("eglSwapBuffersWithDamageKHR"));
306 }
307
298 debug_fn.eglWaitSyncKHRFn = 0; 308 debug_fn.eglWaitSyncKHRFn = 0;
299 if (ext.b_EGL_KHR_wait_sync) { 309 if (ext.b_EGL_KHR_wait_sync) {
300 fn.eglWaitSyncKHRFn = reinterpret_cast<eglWaitSyncKHRProc>( 310 fn.eglWaitSyncKHRFn = reinterpret_cast<eglWaitSyncKHRProc>(
301 GetGLProcAddress("eglWaitSyncKHR")); 311 GetGLProcAddress("eglWaitSyncKHR"));
302 } 312 }
303 313
304 if (g_debugBindingsInitialized) 314 if (g_debugBindingsInitialized)
305 InitializeDebugBindings(); 315 InitializeDebugBindings();
306 } 316 }
307 317
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy, 973 static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy,
964 EGLSurface surface) { 974 EGLSurface surface) {
965 GL_SERVICE_LOG("eglSwapBuffers" 975 GL_SERVICE_LOG("eglSwapBuffers"
966 << "(" << dpy << ", " << surface << ")"); 976 << "(" << dpy << ", " << surface << ")");
967 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersFn != nullptr); 977 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersFn != nullptr);
968 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface); 978 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface);
969 GL_SERVICE_LOG("GL_RESULT: " << result); 979 GL_SERVICE_LOG("GL_RESULT: " << result);
970 return result; 980 return result;
971 } 981 }
972 982
983 static EGLBoolean GL_BINDING_CALL
984 Debug_eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
985 EGLSurface surface,
986 EGLint* rects,
987 EGLint n_rects) {
988 GL_SERVICE_LOG("eglSwapBuffersWithDamageKHR"
989 << "(" << dpy << ", " << surface << ", "
990 << static_cast<const void*>(rects) << ", " << n_rects << ")");
991 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersWithDamageKHRFn != nullptr);
992 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersWithDamageKHRFn(
993 dpy, surface, rects, n_rects);
994 GL_SERVICE_LOG("GL_RESULT: " << result);
995 return result;
996 }
997
973 static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy, 998 static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy,
974 EGLint interval) { 999 EGLint interval) {
975 GL_SERVICE_LOG("eglSwapInterval" 1000 GL_SERVICE_LOG("eglSwapInterval"
976 << "(" << dpy << ", " << interval << ")"); 1001 << "(" << dpy << ", " << interval << ")");
977 DCHECK(g_driver_egl.debug_fn.eglSwapIntervalFn != nullptr); 1002 DCHECK(g_driver_egl.debug_fn.eglSwapIntervalFn != nullptr);
978 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval); 1003 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval);
979 GL_SERVICE_LOG("GL_RESULT: " << result); 1004 GL_SERVICE_LOG("GL_RESULT: " << result);
980 return result; 1005 return result;
981 } 1006 }
982 1007
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 Debug_eglStreamPostD3DTextureNV12ANGLE; 1263 Debug_eglStreamPostD3DTextureNV12ANGLE;
1239 } 1264 }
1240 if (!debug_fn.eglSurfaceAttribFn) { 1265 if (!debug_fn.eglSurfaceAttribFn) {
1241 debug_fn.eglSurfaceAttribFn = fn.eglSurfaceAttribFn; 1266 debug_fn.eglSurfaceAttribFn = fn.eglSurfaceAttribFn;
1242 fn.eglSurfaceAttribFn = Debug_eglSurfaceAttrib; 1267 fn.eglSurfaceAttribFn = Debug_eglSurfaceAttrib;
1243 } 1268 }
1244 if (!debug_fn.eglSwapBuffersFn) { 1269 if (!debug_fn.eglSwapBuffersFn) {
1245 debug_fn.eglSwapBuffersFn = fn.eglSwapBuffersFn; 1270 debug_fn.eglSwapBuffersFn = fn.eglSwapBuffersFn;
1246 fn.eglSwapBuffersFn = Debug_eglSwapBuffers; 1271 fn.eglSwapBuffersFn = Debug_eglSwapBuffers;
1247 } 1272 }
1273 if (!debug_fn.eglSwapBuffersWithDamageKHRFn) {
1274 debug_fn.eglSwapBuffersWithDamageKHRFn = fn.eglSwapBuffersWithDamageKHRFn;
1275 fn.eglSwapBuffersWithDamageKHRFn = Debug_eglSwapBuffersWithDamageKHR;
1276 }
1248 if (!debug_fn.eglSwapIntervalFn) { 1277 if (!debug_fn.eglSwapIntervalFn) {
1249 debug_fn.eglSwapIntervalFn = fn.eglSwapIntervalFn; 1278 debug_fn.eglSwapIntervalFn = fn.eglSwapIntervalFn;
1250 fn.eglSwapIntervalFn = Debug_eglSwapInterval; 1279 fn.eglSwapIntervalFn = Debug_eglSwapInterval;
1251 } 1280 }
1252 if (!debug_fn.eglTerminateFn) { 1281 if (!debug_fn.eglTerminateFn) {
1253 debug_fn.eglTerminateFn = fn.eglTerminateFn; 1282 debug_fn.eglTerminateFn = fn.eglTerminateFn;
1254 fn.eglTerminateFn = Debug_eglTerminate; 1283 fn.eglTerminateFn = Debug_eglTerminate;
1255 } 1284 }
1256 if (!debug_fn.eglWaitClientFn) { 1285 if (!debug_fn.eglWaitClientFn) {
1257 debug_fn.eglWaitClientFn = fn.eglWaitClientFn; 1286 debug_fn.eglWaitClientFn = fn.eglWaitClientFn;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 EGLSurface surface, 1611 EGLSurface surface,
1583 EGLint attribute, 1612 EGLint attribute,
1584 EGLint value) { 1613 EGLint value) {
1585 return driver_->fn.eglSurfaceAttribFn(dpy, surface, attribute, value); 1614 return driver_->fn.eglSurfaceAttribFn(dpy, surface, attribute, value);
1586 } 1615 }
1587 1616
1588 EGLBoolean EGLApiBase::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) { 1617 EGLBoolean EGLApiBase::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) {
1589 return driver_->fn.eglSwapBuffersFn(dpy, surface); 1618 return driver_->fn.eglSwapBuffersFn(dpy, surface);
1590 } 1619 }
1591 1620
1621 EGLBoolean EGLApiBase::eglSwapBuffersWithDamageKHRFn(EGLDisplay dpy,
1622 EGLSurface surface,
1623 EGLint* rects,
1624 EGLint n_rects) {
1625 return driver_->fn.eglSwapBuffersWithDamageKHRFn(dpy, surface, rects,
1626 n_rects);
1627 }
1628
1592 EGLBoolean EGLApiBase::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) { 1629 EGLBoolean EGLApiBase::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) {
1593 return driver_->fn.eglSwapIntervalFn(dpy, interval); 1630 return driver_->fn.eglSwapIntervalFn(dpy, interval);
1594 } 1631 }
1595 1632
1596 EGLBoolean EGLApiBase::eglTerminateFn(EGLDisplay dpy) { 1633 EGLBoolean EGLApiBase::eglTerminateFn(EGLDisplay dpy) {
1597 return driver_->fn.eglTerminateFn(dpy); 1634 return driver_->fn.eglTerminateFn(dpy);
1598 } 1635 }
1599 1636
1600 EGLBoolean EGLApiBase::eglWaitClientFn(void) { 1637 EGLBoolean EGLApiBase::eglWaitClientFn(void) {
1601 return driver_->fn.eglWaitClientFn(); 1638 return driver_->fn.eglWaitClientFn();
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 EGLint value) { 2018 EGLint value) {
1982 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSurfaceAttrib") 2019 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSurfaceAttrib")
1983 return egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value); 2020 return egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value);
1984 } 2021 }
1985 2022
1986 EGLBoolean TraceEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) { 2023 EGLBoolean TraceEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) {
1987 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapBuffers") 2024 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapBuffers")
1988 return egl_api_->eglSwapBuffersFn(dpy, surface); 2025 return egl_api_->eglSwapBuffersFn(dpy, surface);
1989 } 2026 }
1990 2027
2028 EGLBoolean TraceEGLApi::eglSwapBuffersWithDamageKHRFn(EGLDisplay dpy,
2029 EGLSurface surface,
2030 EGLint* rects,
2031 EGLint n_rects) {
2032 TRACE_EVENT_BINARY_EFFICIENT0("gpu",
2033 "TraceGLAPI::eglSwapBuffersWithDamageKHR")
2034 return egl_api_->eglSwapBuffersWithDamageKHRFn(dpy, surface, rects, n_rects);
2035 }
2036
1991 EGLBoolean TraceEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) { 2037 EGLBoolean TraceEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) {
1992 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapInterval") 2038 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapInterval")
1993 return egl_api_->eglSwapIntervalFn(dpy, interval); 2039 return egl_api_->eglSwapIntervalFn(dpy, interval);
1994 } 2040 }
1995 2041
1996 EGLBoolean TraceEGLApi::eglTerminateFn(EGLDisplay dpy) { 2042 EGLBoolean TraceEGLApi::eglTerminateFn(EGLDisplay dpy) {
1997 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglTerminate") 2043 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglTerminate")
1998 return egl_api_->eglTerminateFn(dpy); 2044 return egl_api_->eglTerminateFn(dpy);
1999 } 2045 }
2000 2046
(...skipping 13 matching lines...) Expand all
2014 } 2060 }
2015 2061
2016 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, 2062 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy,
2017 EGLSyncKHR sync, 2063 EGLSyncKHR sync,
2018 EGLint flags) { 2064 EGLint flags) {
2019 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") 2065 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR")
2020 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); 2066 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags);
2021 } 2067 }
2022 2068
2023 } // namespace gl 2069 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings_autogen_egl.h ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698