Bug 232934 - [GTK] Fix build without USE_OPENGL_OR_ES
Summary: [GTK] Fix build without USE_OPENGL_OR_ES
Status: RESOLVED DUPLICATE of bug 244811
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-11-10 02:52 PST by Alexander Kanavin
Modified: 2022-09-07 03:29 PDT (History)
14 users (show)

See Also:

Patch (7.75 KB, patch)
2021-11-10 02:53 PST, Alexander Kanavin
don.olmstead: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2021-11-10 02:52:54 PST
Fix build without opengl-or-es
Comment 1 Alexander Kanavin 2021-11-10 02:53:41 PST
Created attachment 443790 [details]
Comment 2 Radar WebKit Bug Importer 2021-11-17 02:53:19 PST
Comment 3 Don Olmstead 2022-02-16 12:44:08 PST
Comment on attachment 443790 [details]

I don't think this is the right fix. These files shouldn't be included at all if coordinated graphics isnt enabled.
Comment 4 echassiers.09-regards 2022-08-08 17:31:03 PDT
Don, I think this is the right fix. We already have USE(COORDINATED_GRAPHICS) at the beginning of LayerTreeHost.cpp to decide which headers to include, this should therefore also apply for the functions.

I tested the patch, and it works well, it just needs to be rebased.
Comment 5 Fujii Hironori 2022-08-08 18:24:47 PDT
This change looks confusing.
Since bug#195094, GTK port is assuming COORDINATED_GRAPHICS is defined.
However, there has been some requests of building GTK port without OpenGL.
How about an idea reviving TextureMapperImageBuffer that was removed by bug#143561?
Then, it can compile with COORDINATED_GRAPHICS defined. But, the accelerated compositing mode should be disabled because TextureMapperImageBuffer might be poor performance and poor rendering results.
Anyway, we should revert bug#195094 or bug#143561 if GTK port has to support no OpenGL builds.
Comment 6 Michael Catanzaro 2022-08-08 19:45:08 PDT
GTK supports USE_OPENGL_OR_ES=OFF. It's a public build option.

But if it's been broken for three years, maybe we should remove it.
Comment 7 Alexander Kanavin 2022-08-09 01:28:20 PDT
I do not have any particularly strong feelings about this patch. I didn't write it, just trying to reduce the amount of custom patches the Yocto project carries. If it's rejected, I'm ok with that.

Here's the original:

and here the commit that added it:
Comment 8 echassiers.09-regards 2022-08-09 01:41:14 PDT
Anyway, thanks for your patch, which is really helpful for porting recent versions of WebKitGTK to macOS.
Comment 9 Michael Catanzaro 2022-08-09 06:05:24 PDT
(In reply to Don Olmstead from comment #3)
> I don't think this is the right fix. These files shouldn't be included at
> all if coordinated graphics isnt enabled.

This is slightly annoying to do, because you can't add conditionals to Sources.txt to control what gets compiled. It's easier to guard the entire files with #if USE(COORDINATED_GRAPHICS). But of course we don't want USE(COORDINATED_GRAPHICS) guards in the middle of a file with CoordinatedGraphics in its name.

Does USE(COORDINATED_GRAPHICS) depends on OpenGL? If so, we need to talk to Carlos Garcia about either reverting the change from bug #195094 or, more likely, removing the public build option.
Comment 10 Fujii Hironori 2022-09-07 03:29:11 PDT

*** This bug has been marked as a duplicate of bug 244811 ***