Bug 172104 - [WPE] Use libepoxy
Summary: [WPE] Use libepoxy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks: 174249 174492
  Show dependency treegraph
 
Reported: 2017-05-15 00:23 PDT by Zan Dobersek
Modified: 2017-07-13 21:59 PDT (History)
6 users (show)

See Also:


Attachments
WIP (26.30 KB, patch)
2017-05-15 00:24 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP (29.73 KB, patch)
2017-05-31 04:06 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (30.16 KB, patch)
2017-06-12 07:09 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP (30.41 KB, patch)
2017-06-20 05:35 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (28.74 KB, patch)
2017-07-05 12:20 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (25.75 KB, patch)
2017-07-07 03:59 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (27.45 KB, patch)
2017-07-10 00:38 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (27.43 KB, patch)
2017-07-12 06:17 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2017-05-15 00:23:58 PDT
[GTK][WPE] Use libepoxy
Comment 1 Zan Dobersek 2017-05-15 00:24:25 PDT
Created attachment 310114 [details]
WIP
Comment 2 Zan Dobersek 2017-05-31 04:06:34 PDT
Created attachment 311580 [details]
WIP

Works for WPE, GTK+ next.
Comment 3 Zan Dobersek 2017-06-12 07:09:38 PDT
Created attachment 312662 [details]
WIP patch

Also tested on the GTK+ port.
Comment 4 Zan Dobersek 2017-06-20 05:35:59 PDT
Created attachment 313394 [details]
WIP

Cleaned up WPE CMake files.
Comment 5 Build Bot 2017-06-20 05:38:38 PDT
Attachment 313394 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:45:  "EpoxyShims.h" already included at Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:30  [build/include] [4]
ERROR: Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:38:  "epoxy/egl.h" already included at Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:28  [build/include] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:29:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:29:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/platform/graphics/EpoxyShims.h:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:106:  "epoxy/gl.h" already included at Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:66  [build/include] [4]
Total errors found: 7 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Zan Dobersek 2017-07-05 12:13:12 PDT
Change of plans, I'd only enable libepoxy for the WPE port, for starters.  It's simpler there since only the EGL + OpenGL ES 2.0 combo is supported.  We'd approach the GTK+ port afterwards, once libepoxy is shown to work well.
Comment 7 Zan Dobersek 2017-07-05 12:20:33 PDT
Created attachment 314638 [details]
WIP patch
Comment 8 Build Bot 2017-07-05 12:25:06 PDT
Attachment 314638 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:44:  "EpoxyShims.h" already included at Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:30  [build/include] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:29:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:29:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:103:  "epoxy/gl.h" already included at Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:64  [build/include] [4]
Total errors found: 5 in 32 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Michael Catanzaro 2017-07-05 17:35:08 PDT
Looks like the style checker errors are valid.
Comment 10 Zan Dobersek 2017-07-07 03:59:17 PDT
Created attachment 314826 [details]
WIP patch
Comment 11 Zan Dobersek 2017-07-10 00:38:28 PDT
Created attachment 314967 [details]
Patch
Comment 12 Build Bot 2017-07-10 00:41:41 PDT
Attachment 314967 [details] did not pass style-queue:


ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:30:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:31:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Michael Catanzaro 2017-07-10 05:25:44 PDT
Nice!
Comment 14 Michael Catanzaro 2017-07-11 12:01:51 PDT
Comment on attachment 314967 [details]
Patch

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

Nice! r=me, conditional on getting approval from Miguel as well.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:69
> +#if USE(LIBEPOXY)
> +// Include the <epoxy/gl.h> header before <gst/gl/gl.h>.
> +// Define GL_EXT_blend_func_extended since libepoxy headers don't, despite
> +// providing all the GL entrypoints and constants relevant to that extension.
> +#include <epoxy/gl.h>
> +#define GL_EXT_blend_func_extended 1
> +#endif

Did you report a bug at https://github.com/anholt/libepoxy? Our friends at Endless are maintaining libepoxy nowadays, so it should be easy to get changes upstreamed. Let me know if you need me to ping Emmanuele.

> Source/cmake/OptionsWPE.cmake:78
> +find_package(LibEpoxy REQUIRED)

Do you know if a particular minimum version is required? That would be good to research.

If 1.3.1 is new enough, then I think we could even make it a mandatory dependency for WebKitGTK+. If you need 1.4, then it will have to remain optional for a long time, because we need to support Ubuntu 16.04.
Comment 15 Zan Dobersek 2017-07-12 06:15:29 PDT
Comment on attachment 314967 [details]
Patch

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

>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:69
>> +#endif
> 
> Did you report a bug at https://github.com/anholt/libepoxy? Our friends at Endless are maintaining libepoxy nowadays, so it should be easy to get changes upstreamed. Let me know if you need me to ping Emmanuele.

This was actually a problem only with the 1.8 version of gst-plugins-bad, where these headers originate from. This isn't an issue anymore with the 1.10 version of GStreamer packages to which we upgraded recently.

The main problem here was that GSTREAMER_GL was getting enabled for WPE even with the 1.8 version, which should not happen. The GTK+ port only enables the feature if version 1.10 or newer is present.

>> Source/cmake/OptionsWPE.cmake:78
>> +find_package(LibEpoxy REQUIRED)
> 
> Do you know if a particular minimum version is required? That would be good to research.
> 
> If 1.3.1 is new enough, then I think we could even make it a mandatory dependency for WebKitGTK+. If you need 1.4, then it will have to remain optional for a long time, because we need to support Ubuntu 16.04.

1.3.1 works fine, and it might be enough for all the functionality we want from the library.
Comment 16 Zan Dobersek 2017-07-12 06:17:23 PDT
Created attachment 315233 [details]
Patch for landing
Comment 17 Build Bot 2017-07-12 06:21:30 PDT
Attachment 315233 [details] did not pass style-queue:


ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:30:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h:31:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 Zan Dobersek 2017-07-12 06:58:48 PDT
Comment on attachment 315233 [details]
Patch for landing

Clearing flags on attachment: 315233

Committed r219391: <http://trac.webkit.org/changeset/219391>
Comment 19 Zan Dobersek 2017-07-12 06:58:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Timothy Hatcher 2017-07-12 16:45:25 PDT
Comment on attachment 315233 [details]
Patch for landing

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

> Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:39
> +#elif USE(OPENGL_ES2)

This is a typo that broke the non USE_LIBEPOXY build. See bug 174442.