[ozone/wayland] Fix NativeGpuMemoryBuffers usage.
After https://crrev.com/c/1570014, Chromium started to crash immediately because of null accelerated widget provided to the WaylandBufferManager and hitting data validation error when --enable-native-gpu-memory-buffer with the --enable-gpu-rasterization passed. The problem was that the raster buffer provided can create a staging buffer for rasterization, which is not tight to any of the existing widgets. Thus, it seems like it just passes a null widget [1][2]. But, when the GbmPixmapWayland was created and the dmabuf handle was passed to the WaylandBufferManager to import a wl_buffer, it crashed on the data validation, because the widget was null. Thus, when a null widget is passed, just create a native pixmap and do not call the WaylandBufferManager with a request to import a wl_buffer as long as they can also be used as staging buffers and not meant for attaching to Wayland surfaces. [1] https://cs.chromium.org/chromium/src/cc/raster/one_copy_raster_buffer_provider.cc?type=cs&g=0&l=296 [2] https://cs.chromium.org/chromium/src/cc/raster/zero_copy_raster_buffer_provider.cc?type=cs&g=0&l=125 Bug: 962466 Change-Id: Ied6fd6d3e29fdd21939c8b159682537f9239ab84 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609781Reviewed-by:Robert Kroeger <rjkroege@chromium.org> Commit-Queue: Maksim Sisov <msisov@igalia.com> Cr-Commit-Position: refs/heads/master@{#659575}
Showing
Please register or sign in to comment