Bug 194166

Summary: Force settings.acceleratedCompositingEnabled() to true for WebKit
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, commit-queue, magomez, mcatanzaro, simon.fraser, thorton, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=198478
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2019-02-01 10:59:10 PST
Force settings.acceleratedCompositingEnabled() to true for WebKit
Comment 1 Simon Fraser (smfr) 2019-02-01 11:03:43 PST
Created attachment 360873 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-02-01 11:03:45 PST
<rdar://problem/47694328>
Comment 3 WebKit Commit Bot 2019-02-01 12:20:32 PST
Comment on attachment 360873 [details]
Patch

Clearing flags on attachment: 360873

Committed r240862: <https://trac.webkit.org/changeset/240862>
Comment 4 WebKit Commit Bot 2019-02-01 12:20:33 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Michael Catanzaro 2019-02-02 09:00:20 PST
Can this be moved to platform-specific code, e.g. WebPageCocoa.mm? GTK requires the ability to turn it off. References:

https://gitlab.gnome.org/GNOME/epiphany/commit/1618a34e7b66947a4cbcda39870a6fa525dc3a92
https://gitlab.gnome.org/GNOME/epiphany/commit/f0ccff59b66f411a2183a5d716549d14f7f71c81
Comment 6 Simon Fraser (smfr) 2019-02-02 11:34:57 PST
Is that the same thing? The "Accelerated compositing" setting is about whether RenderLayerCompositor makes RenderLayerBackings for things. Those may still be backed by non-GPU-rendered buffers.

How does Epiphany do rendering with WebKit2?
Comment 7 Michael Catanzaro 2019-02-02 13:32:48 PST
(In reply to Simon Fraser (smfr) from comment #6)
> Is that the same thing?

Yes, you can verify that our public API webkit_settings_get_hardware_acceleration_policy/webkit_settings_set_hardware_acceleration_policy is implemented by toggling this acceleratedCompositingEnabled setting (as well as the forceCompositingMode setting).

> The "Accelerated compositing" setting is about
> whether RenderLayerCompositor makes RenderLayerBackings for things. Those
> may still be backed by non-GPU-rendered buffers.
> 
> How does Epiphany do rendering with WebKit2?

I don't know anything about this.
Comment 8 Simon Fraser (smfr) 2019-02-03 21:33:17 PST
(In reply to Michael Catanzaro from comment #7)
> I don't know anything about this.

Who does?
Comment 9 Michael Catanzaro 2019-02-04 06:54:05 PST
Zan or Miguel, both are CCed.

Anyway, I'll just add #if PLATFORM(COCOA) guards for now.
Comment 10 Michael Catanzaro 2019-02-04 07:36:18 PST
Committed r240920: <https://trac.webkit.org/changeset/240920>
Comment 11 Zan Dobersek 2019-02-04 09:12:33 PST
(In reply to Michael Catanzaro from comment #9)
> Zan or Miguel, both are CCed.
> 

DrawingAreaImpl::display(), it draws through FrameView::paint() into a shareable bitmap that's then used in the UIProcess to draw content.

> Anyway, I'll just add #if PLATFORM(COCOA) guards for now.

Since all this is only the case for the GTK+ port, #if !PLATFORM(GTK) guards would be more fitting.
Comment 12 Michael Catanzaro 2019-02-04 12:49:41 PST
Committed r240937: <https://trac.webkit.org/changeset/240937>
Comment 13 Simon Fraser (smfr) 2019-02-04 12:57:17 PST
Thanks for fixing.