Skip to content

Commit

Permalink
[GTK] build breaks with -DUSE_GBM=OFF: WebCore/DMABufFormat.h: No suc…
Browse files Browse the repository at this point in the history
…h file or directory

https://bugs.webkit.org/show_bug.cgi?id=261637

Reviewed by Michael Catanzaro.

* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::BufferEGLImage::create):
* Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:

Canonical link: https://commits.webkit.org/268112@main
  • Loading branch information
carlosgcampos committed Sep 19, 2023
1 parent bde602f commit ba13698
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@
#include "ShareableBitmap.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
#include <WebCore/DMABufFormat.h>
#include <WebCore/GLContext.h>
#include <WebCore/IntRect.h>
#include <WebCore/PlatformDisplay.h>
#include <epoxy/egl.h>
#include <wtf/glib/GUniquePtr.h>

#if USE(GBM)
#include <WebCore/DMABufFormat.h>
#include <gbm.h>
static constexpr uint64_t s_dmabufInvalidModifier = uint64_t(WebCore::DMABufFormat::Modifier::Invalid);
#else
static constexpr uint64_t s_dmabufInvalidModifier = ((1ULL << 56) - 1);
#endif

#if PLATFORM(X11) && USE(GTK4)
Expand Down Expand Up @@ -118,7 +121,7 @@ RefPtr<AcceleratedBackingStoreDMABuf::Buffer> AcceleratedBackingStoreDMABuf::Buf
EGL_DMA_BUF_PLANE0_OFFSET_EXT, static_cast<EGLAttrib>(offset),
EGL_DMA_BUF_PLANE0_PITCH_EXT, static_cast<EGLAttrib>(stride)
};
if (modifier != uint64_t(WebCore::DMABufFormat::Modifier::Invalid) && display.eglExtensions().EXT_image_dma_buf_import_modifiers) {
if (modifier != s_dmabufInvalidModifier && display.eglExtensions().EXT_image_dma_buf_import_modifiers) {
std::array<EGLAttrib, 4> modifierAttributes {
EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, static_cast<EGLAttrib>(modifier >> 32),
EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, static_cast<EGLAttrib>(modifier & 0xffffffff)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
#include "ShareableBitmap.h"
#include "WebPage.h"
#include "WebProcess.h"
#include <WebCore/DMABufFormat.h>
#include <WebCore/PlatformDisplay.h>
#include <array>
#include <epoxy/egl.h>
#include <wtf/SafeStrerror.h>

#if USE(GBM)
#include <WebCore/DMABufFormat.h>
#include <WebCore/GBMDevice.h>
#include <gbm.h>
#endif
Expand Down

0 comments on commit ba13698

Please sign in to comment.