Bug 232934

Summary: Fix build without opengl-or-es
Product: WebKit Reporter: Alexander Kanavin <alex.kanavin>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: alexm, bugs-noreply, cmarcelo, don.olmstead, echassiers.09-regards, ews-watchlist, gyuyoung.kim, Hironori.Fujii, luiz, mcatanzaro, ryuan.choi, sergio, webkit-bug-importer, zeno
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch don.olmstead: review-

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]
Patch
Comment 2 Radar WebKit Bug Importer 2021-11-17 02:53:19 PST
<rdar://problem/85497037>
Comment 3 Don Olmstead 2022-02-16 12:44:08 PST
Comment on attachment 443790 [details]
Patch

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:
https://git.yoctoproject.org/poky/tree/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch

and here the commit that added it:
https://git.yoctoproject.org/poky/commit/?id=e736b200a0129747d35f1f8e4b406b9215937baf
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.