[geary/wip/webkit-maintenance: 1/2] Disable WebKitGTK hardware accelleration using API, not env var



commit 55f98f81473ac3ac9446e1416e350a0f42948141
Author: Michael Gratton <mike vee net>
Date:   Sat Sep 7 10:31:39 2019 +1000

    Disable WebKitGTK hardware accelleration using API, not env var
    
    Stop setting the olde WEBKIT_DISABLE_COMPOSITING_MODE envrionment
    variable, use the API instead.

 src/client/application/main.vala           | 9 ---------
 src/client/components/client-web-view.vala | 2 ++
 2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/client/application/main.vala b/src/client/application/main.vala
index f6bdbf9c..5f99d5bf 100644
--- a/src/client/application/main.vala
+++ b/src/client/application/main.vala
@@ -20,14 +20,6 @@ int main(string[] args) {
     Environment.set_variable("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0", false);
 #endif
 
-    // Disable WebKit2 accelerated compositing here while we can't
-    // depend on there being an API to do it. AC isn't appropriate
-    // since Geary is likely to be doing anything that requires
-    // acceleration, and it is costs a lot in terms of performance
-    // and memory:
-    // https://lists.webkit.org/pipermail/webkit-gtk/2016-November/002863.html
-    Environment.set_variable("WEBKIT_DISABLE_COMPOSITING_MODE", "1", true);
-
     GearyApplication app = new GearyApplication();
 
     int ec = app.run(args);
@@ -38,4 +30,3 @@ int main(string[] args) {
 
     return ec;
 }
-
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 7c71db58..ecb707ab 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -309,6 +309,8 @@ public abstract class ClientWebView : WebKit.WebView, Geary.BaseInterface {
         setts.enable_offline_web_application_cache = false;
         setts.enable_page_cache = false;
         setts.enable_plugins = false;
+        setts.hardware_acceleration_policy =
+            WebKit.HardwareAccelerationPolicy.NEVER;
         setts.javascript_can_access_clipboard = true;
 
         WebKit.UserContentManager content_manager =


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]