Bug 254828 - [GTK] AcceleratedSurfaceDMABuf.cpp does not build on i386
Summary: [GTK] AcceleratedSurfaceDMABuf.cpp does not build on i386
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-31 10:21 PDT by Michael Catanzaro
Modified: 2023-04-14 09:56 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2023-03-31 10:21:26 PDT
In file included from /buildstream/gnome/sdk/webkitgtk-6.0.bst/_builddir/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-29.cpp:2:
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:133:20: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
                EGL_WIDTH, gbm_bo_get_width(backObject),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:133:20: note: insert an explicit cast to silence this issue
                EGL_WIDTH, gbm_bo_get_width(backObject),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           static_cast<int>(           )
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:134:21: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
                EGL_HEIGHT, gbm_bo_get_height(backObject),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:134:21: note: insert an explicit cast to silence this issue
                EGL_HEIGHT, gbm_bo_get_height(backObject),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            static_cast<int>(            )
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:135:35: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
                EGL_LINUX_DRM_FOURCC_EXT, gbm_bo_get_format(backObject),
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:135:35: note: insert an explicit cast to silence this issue
                EGL_LINUX_DRM_FOURCC_EXT, gbm_bo_get_format(backObject),
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                          static_cast<int>(            )
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:137:40: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
                EGL_DMA_BUF_PLANE0_OFFSET_EXT, gbm_bo_get_offset(backObject, 0),
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:137:40: note: insert an explicit cast to silence this issue
                EGL_DMA_BUF_PLANE0_OFFSET_EXT, gbm_bo_get_offset(backObject, 0),
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                               static_cast<int>(               )
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:138:39: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
                EGL_DMA_BUF_PLANE0_PITCH_EXT, gbm_bo_get_stride(backObject),
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:138:39: note: insert an explicit cast to silence this issue
                EGL_DMA_BUF_PLANE0_PITCH_EXT, gbm_bo_get_stride(backObject),
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                              static_cast<int>(            )
        5 errors generated.
Comment 1 Michael Catanzaro 2023-03-31 10:57:26 PDT
I guess it's safe to cast these to EGLAttrib because surfaces with size that would overflow an int would be outrageous.
Comment 2 Michael Catanzaro 2023-03-31 11:24:23 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12250
Comment 3 EWS 2023-04-01 07:26:33 PDT
Committed 262476@main (f8991bed5a03): <https://commits.webkit.org/262476@main>

Reviewed commits have been landed. Closing PR #12250 and removing active labels.