From 7813ccb57d6f1e3546f402dfeb25c2229e42b50f Mon Sep 17 00:00:00 2001 From: Zhao Halley Date: Wed, 11 Dec 2013 10:02:01 +0800 Subject: [PATCH] Follows mesa change on wayland/wl_buffer support #TIVI-2275 use wl_resource for eglQueryWaylandBufferWL instead of wl_buffer on par with commit: e69370c5f3427deb1ba54223b3ce971328fc391b 0fd6ee7be2976c8f0bf36d2274a92ce76ad9d773 Change-Id: If997ab28ab74a438c9f5ab5fec58b093630a8834 Signed-off-by: Zhao, Halley --- Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp | 4 ++-- Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h | 2 +- Source/WebCore/platform/graphics/surfaces/wayland/WaylandSurface.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp b/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp index 63dea11..e1da1f3 100644 --- a/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp +++ b/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp @@ -150,7 +150,7 @@ PlatformDisplay EGLHelper::compositorEGLDisplay(NativeSharedDisplay* display) return displayConnection.display(); } -GLint EGLHelper::queryWaylandBufferWLFormat(void *buffer, EGLDisplay eglDisplay) +GLint EGLHelper::queryWaylandBufferWLFormat(struct wl_resource *buffer, EGLDisplay eglDisplay) { EGLDisplay display = eglDisplay; if (display == EGL_NO_DISPLAY) @@ -161,7 +161,7 @@ GLint EGLHelper::queryWaylandBufferWLFormat(void *buffer, EGLDisplay eglDisplay) EGLint format = -1; if (eglQueryWaylandBufferWL) { - eglQueryWaylandBufferWL(display, (struct wl_resource*)buffer, EGL_TEXTURE_FORMAT, &format); + eglQueryWaylandBufferWL(display, buffer, EGL_TEXTURE_FORMAT, &format); } return format; diff --git a/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h b/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h index 96e9527..fb8f951 100644 --- a/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h +++ b/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h @@ -62,7 +62,7 @@ public: static bool unlockSurface(EGLSurface, EGLDisplay = EGL_NO_DISPLAY); static bool querySurface(EGLSurface, EGLint, EGLint*, EGLDisplay = EGL_NO_DISPLAY); #if PLATFORM(WAYLAND) - static GLint queryWaylandBufferWLFormat(void *buffer, EGLDisplay eglDisplay); + static GLint queryWaylandBufferWLFormat(struct wl_resource *buffer, EGLDisplay eglDisplay); #endif }; diff --git a/Source/WebCore/platform/graphics/surfaces/wayland/WaylandSurface.cpp b/Source/WebCore/platform/graphics/surfaces/wayland/WaylandSurface.cpp index 8b7b89a..e34af41 100644 --- a/Source/WebCore/platform/graphics/surfaces/wayland/WaylandSurface.cpp +++ b/Source/WebCore/platform/graphics/surfaces/wayland/WaylandSurface.cpp @@ -360,7 +360,7 @@ void WaylandBuffer::queryBufferInformation() return; } - m_format = EGLHelper::queryWaylandBufferWLFormat(wl_resource_get_user_data(m_commitedResource), display); + m_format = EGLHelper::queryWaylandBufferWLFormat(m_commitedResource, display); switch (m_format) { case EGL_TEXTURE_Y_UV_WL: numPlanes = 2; -- 2.7.4