[Webkit-unassigned] [Bug 144517] [GTK][EFL] Unify platform display handling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 2 09:34:29 PDT 2015


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

Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #252223|review?                     |review+
              Flags|                            |

--- Comment #3 from Martin Robinson <mrobinson at webkit.org> ---
Comment on attachment 252223
  --> https://bugs.webkit.org/attachment.cgi?id=252223
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=252223&action=review

Excellent clean up.

> Source/WebCore/platform/graphics/PlatformDisplay.h:65
> +#define SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY(ToClassName, DisplayType) \
> +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToClassName) \
> +    static bool isType(const WebCore::PlatformDisplay& display) { return display.type() == WebCore::PlatformDisplay::Type::DisplayType; } \
> +SPECIALIZE_TYPE_TRAITS_END()

This is cool.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:242
>  #if PLATFORM(X11)
> -        Display* display = GLContext::sharedX11Display();
> -        m_glDisplay = GST_GL_DISPLAY(gst_gl_display_x11_new_with_display(display));
> +        m_glDisplay = GST_GL_DISPLAY(gst_gl_display_x11_new_with_display(downcast<PlatformDisplayX11>(sharedDisplay).native()));
>  #elif PLATFORM(WAYLAND)
> -        EGLDisplay display = WaylandDisplay::instance()->eglDisplay();
> -        m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(display));
> +        m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayWayland>(sharedDisplay).native()));
>  #endif

These are #ifs but they really should both co-exist. It's unrelated to this patch though.

> Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp:317
>  {
> -    // Display connection will only be broken at program shutdown.
> -    static DisplayConnection displayConnection;
> -    return displayConnection.display();
> +    return downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native();

Maybe these helpers can gradually move into PlatformDisplayX11.

> Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h:36
> +#include <wayland-client.h>
> +
> +#include <wayland-egl.h>

Nit: Extra empty line here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150502/b76c3b22/attachment.html>


More information about the webkit-unassigned mailing list