Bug 150558

Summary: [GTK] Allow applications to force Accelerated Compositing mode
Product: WebKit Reporter: Mario Sanchez Prada <mario>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, commit-queue, mcatanzaro, mrobinson, tpopela
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=154147
Attachments:
Description Flags
Patch proposal none

Description Mario Sanchez Prada 2015-10-26 09:25:06 PDT
As discussed in the mailing list [1], it would be nice in some cases to have a way to tell WebKit to have AC mode enabled all the time, avoiding it to having it repeateadly leaving/re-entering AC mode whenever the conditions that need to be fulfilled change.

Originally proposed as a public API, that's perhaps too much, so perhaps something simpler like recognizing a environment variable WEBKIT_FORCE_ACCELERATED_COMPOSITING would be a better option.

[1] https://lists.webkit.org/pipermail/webkit-gtk/2015-October/002448.html
Comment 1 Tomas Popela 2015-10-27 01:59:29 PDT
(In reply to comment #0)
> Originally proposed as a public API, that's perhaps too much, so perhaps
> something simpler like recognizing a environment variable
> WEBKIT_FORCE_ACCELERATED_COMPOSITING would be a better option.

Wouldn't be better to use WEBKITGTK_ instead of WEBKIT_ as we are not the only WebKit port there..
Comment 2 Mario Sanchez Prada 2015-10-29 03:47:25 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > Originally proposed as a public API, that's perhaps too much, so perhaps
> > something simpler like recognizing a environment variable
> > WEBKIT_FORCE_ACCELERATED_COMPOSITING would be a better option.
> 
> Wouldn't be better to use WEBKITGTK_ instead of WEBKIT_ as we are not the
> only WebKit port there..

I don't have a strong opinion on this, but I think WEBKIT_ is the correct prefix here, as this causes a change in behaviour at the level of WebCore, I think, and not just in the port-specific bits.
Comment 3 Carlos Garcia Campos 2015-10-29 04:23:02 PDT
We already use WEBKIT for other thinks like WEBKIT_INSPECTOR_SERVER for example. I don't think that would conflict with any other port installed anyway, since you set the variable per program, but even if it's in your env, other ports will just ignore it.
Comment 4 Mario Sanchez Prada 2015-12-07 03:23:52 PST
Created attachment 266764 [details]
Patch proposal

Attached patch proposal. I've tested this locally and seems to work as expected.

Please review, thanks!
Comment 5 WebKit Commit Bot 2015-12-07 08:24:20 PST
Comment on attachment 266764 [details]
Patch proposal

Clearing flags on attachment: 266764

Committed r193626: <http://trac.webkit.org/changeset/193626>
Comment 6 WebKit Commit Bot 2015-12-07 08:24:24 PST
All reviewed patches have been landed.  Closing bug.