Bug 167605 - [GTK] Environment variables for enabling/disabling AC mode should take precedence over the API.
Summary: [GTK] Environment variables for enabling/disabling AC mode should take preced...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 167509
  Show dependency treegraph
 
Reported: 2017-01-30 14:25 PST by Carlos Alberto Lopez Perez
Modified: 2017-01-31 00:58 PST (History)
2 users (show)

See Also:


Attachments
Patch (13.29 KB, patch)
2017-01-30 23:46 PST, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2017-01-30 14:25:09 PST
After r211363 <http://trac.webkit.org/r211363> the WEBKIT_DISABLE_COMPOSITING_MODE environment variable not longer works as one should expect.

Not sure if this was intentional or not.

But I think we should bring back this environment variable, and make it take precedence over any API setting that the application defines.


This is useful for the following use cases:

 * Testing if disabling AC makes a difference without having to rebuild the application to add a different API call. 
 * Letting the user override the application acceleration hardware policy, which is useful when the user has a broken graphics drivers, and despite of that wants to use a WebKitGTK+ based application that enables AC mode by default (or that enables it ondemand).

    - For example, users of nvidia binary graphics drivers right now can only use Epiphany flatpaks with this environment variable. Otherwise the browser will crash when trying to enter into AC mode. And I don't expect Epiphany to disable AC.

    - So with this at least the user can use this environment variable at runtime to override the HW policy settings of the application 



And the same for the other variable WEBKIT_FORCE_COMPISITING_MODE
Comment 1 Carlos Garcia Campos 2017-01-30 21:56:31 PST
No need to convince me, it was not intentional :-)
Comment 2 Carlos Garcia Campos 2017-01-30 23:46:19 PST
Created attachment 300190 [details]
Patch
Comment 3 Sergio Villar Senin 2017-01-31 00:45:41 PST
I know it's already like this, but I personally find confusing from the user of the API POV, to have a set method that might work or not. I think it would be better to explicitly return the changed boolean so that we could immediately know whether or not the API call has succeeded.

Apart from that, I like the idea of adding this hardware manager class.
Comment 4 Carlos Garcia Campos 2017-01-31 00:54:49 PST
(In reply to comment #3)
> I know it's already like this, but I personally find confusing from the user
> of the API POV, to have a set method that might work or not. I think it
> would be better to explicitly return the changed boolean so that we could
> immediately know whether or not the API call has succeeded.

Yes, but still, it's very unlikely to happen, either the user set the env variables, so he/she knows what he/she is doing, or xwindow doesn't support xcomposite/xdamage (unlikely).

> Apart from that, I like the idea of adding this hardware manager class.
Comment 5 Carlos Garcia Campos 2017-01-31 00:58:55 PST
Committed r211412: <http://trac.webkit.org/changeset/211412>