From ef690d09c878d9db80c3c7321410e79126b3ce16 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Lopez Perez Date: Tue, 19 Dec 2017 08:15:33 +0000 Subject: [PATCH] =?UTF-8?q?Merge=20r225051=20-=20[WPE]=20GLContextEGLWPE.c?= =?UTF-8?q?pp:44:96:=20error:=20invalid=20cast=20from=20type=20=E2=80=98GL?= =?UTF-8?q?NativeWindowType=20{aka=20long=20long=20unsigned=20int}?= =?UTF-8?q?=E2=80=99=20to=20type=20=E2=80=98EGLNativeWindowType=20{aka=20u?= =?UTF-8?q?nsigned=20int}=20https://bugs.webkit.org/show=5Fbug.cgi=3Fid=3D?= =?UTF-8?q?179511?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed by Žan Doberšek. r217208 changed the definition of GLNativeWindowType from EGLNativeWindowType to uint64_t for platform WPE. This built fine on a 64-bit platform since uint64_t matches the size of a pointer, but fails on 32-bits. This switches back the definition to EGLNativeWindowType. And we need to include first in order to get a definition for EGLNativeWindowType itself. This commit pretty much reverts the changes r217208 did on platform/graphics/GLContext.h No new tests, it is a build fix. * platform/graphics/GLContext.h: --- Source/WebCore/ChangeLog | 19 +++++++++++++++++++ Source/WebCore/platform/graphics/GLContext.h | 11 +++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 811796ae261f..9bd04af10c11 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2017-11-20 Carlos Alberto Lopez Perez + + [WPE] GLContextEGLWPE.cpp:44:96: error: invalid cast from type ‘GLNativeWindowType {aka long long unsigned int}’ to type ‘EGLNativeWindowType {aka unsigned int} + https://bugs.webkit.org/show_bug.cgi?id=179511 + + Reviewed by Žan Doberšek. + + r217208 changed the definition of GLNativeWindowType from EGLNativeWindowType to uint64_t for platform WPE. + This built fine on a 64-bit platform since uint64_t matches the size of a pointer, but fails on 32-bits. + + This switches back the definition to EGLNativeWindowType. + And we need to include first in order to get a definition for EGLNativeWindowType itself. + + This commit pretty much reverts the changes r217208 did on platform/graphics/GLContext.h + + No new tests, it is a build fix. + + * platform/graphics/GLContext.h: + 2017-11-11 Helmut Grohne [GTK] PlatformGTK.cmake: use the PKG_CONFIG_EXECUTABLE variable diff --git a/Source/WebCore/platform/graphics/GLContext.h b/Source/WebCore/platform/graphics/GLContext.h index 0e4e40ff62bd..354e31f1f276 100644 --- a/Source/WebCore/platform/graphics/GLContext.h +++ b/Source/WebCore/platform/graphics/GLContext.h @@ -24,10 +24,17 @@ #include "PlatformDisplay.h" #include -#if USE(EGL) && !PLATFORM(GTK) && !PLATFORM(WPE) +#if USE(EGL) && !PLATFORM(GTK) +#if PLATFORM(WPE) +// FIXME: For now default to the GBM EGL platform, but this should really be +// somehow deducible from the build configuration. +#define __GBM__ 1 +#include +#else #include "eglplatform.h" +#endif // PLATFORM(WPE) typedef EGLNativeWindowType GLNativeWindowType; -#else +#else // !USE(EGL) || PLATFORM(GTK) typedef uint64_t GLNativeWindowType; #endif