Bug 167509 - [GTK] Add API to handle the accelerated compositing policy
Summary: [GTK] Add API to handle the accelerated compositing policy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 167605
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-27 09:57 PST by Carlos Garcia Campos
Modified: 2017-01-30 14:25 PST (History)
1 user (show)

See Also:


Attachments
Patch (18.81 KB, patch)
2017-01-27 10:05 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-01-27 09:57:35 PST
Now that we have brought back the on demand mode, we should allow applications to choose the policy, wihtout having to deal with environment variables. Settings also allows to set different policy depending on the web view, so for example evolution could disable AC for the composer, but leave the on demand mode for the email viewer.
Comment 1 Carlos Garcia Campos 2017-01-27 10:05:08 PST
Created attachment 299940 [details]
Patch
Comment 2 Michael Catanzaro 2017-01-27 10:40:50 PST
Comment on attachment 299940 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=299940&action=review

> Source/WebKit2/ChangeLog:8
> +        Now that we have brought back the on demand mode, we should allow applications to choose the policy, wihtout

wihtout -> without

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1298
> +     * by using %WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS. And it's also posible to diaable it

diaable -> disable

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:3253
> +    if (changed)
> +        g_object_notify(G_OBJECT(settings), "hardware-acceleration-policy");

It's a bit iffy how to handle this, but I would prefer to check the existing value of our API setting and notify if it changes, to close any possibility of notifying if the API setting doesn't change.
Comment 3 Carlos Garcia Campos 2017-01-30 05:52:08 PST
Committed r211363: <http://trac.webkit.org/changeset/211363>