Changeset 223416 in webkit
- Timestamp:
- Oct 16, 2017 10:30:59 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r223413 r223416 1 2017-10-16 Adrian Perez de Castro <aperez@igalia.com> 2 3 [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM 4 https://bugs.webkit.org/show_bug.cgi?id=178090 5 6 Reviewed by Michael Catanzaro. 7 8 EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL 9 implementation, its build options, and the libepoxy build options. Using "static_cast" 10 works when it is a numeric value and the width of the value needs to be optionally 11 extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers, 12 and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other 13 cases. Therefore it seems reasonable to use a plain C cast expression to solve this 14 particular situation. 15 16 * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp: 17 (WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression. 18 1 19 2017-10-16 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp
r223150 r223416 76 76 { 77 77 ASSERT(m_backend); 78 return reinterpret_cast<uint64_t>(wpe_renderer_backend_egl_target_get_native_window(m_backend)); 78 // EGLNativeWindowType changes depending on the EGL implementation: reinterpret_cast works 79 // for pointers (only if they are 64-bit wide and not for other cases), and static_cast for 80 // numeric types (and when needed they get extended to 64-bit) but not for pointers. Using 81 // a plain C cast expression in this one instance works in all cases. 82 static_assert(sizeof(EGLNativeWindowType) <= sizeof(uint64_t), "EGLNativeWindowType must not be longer than 64 bits."); 83 return (uint64_t) wpe_renderer_backend_egl_target_get_native_window(m_backend); 79 84 } 80 85
Note: See TracChangeset
for help on using the changeset viewer.