]> git.armaanb.net Git - chorizo.git/commitdiff
Add option to enable WebGL
authorPeter Hofmann <scm@uninformativ.de>
Fri, 21 Apr 2017 14:15:14 +0000 (16:15 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Fri, 21 Apr 2017 14:15:57 +0000 (16:15 +0200)
CC #36.

browser.c
man1/lariza.1

index 6902b41c1e98eada90f5402560e7148801b670b9..02b20d2ccd5259e6b46a34a8a51c5757a8327319 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -75,6 +75,7 @@ static gboolean cooperative_alone = TRUE;
 static gboolean cooperative_instances = TRUE;
 static int cooperative_pipe_fp = 0;
 static gchar *download_dir = "/var/tmp";
+static gboolean enable_webgl = FALSE;
 static Window embed = 0;
 static gchar *fifo_suffix = "main";
 static gdouble global_zoom = 1.0;
@@ -203,6 +204,9 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show)
         g_object_set(G_OBJECT(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view))),
                      "user-agent", user_agent, NULL);
 
+    if (enable_webgl)
+        webkit_settings_set_enable_webgl(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view)), TRUE);
+
     c->location = gtk_entry_new();
     g_signal_connect(G_OBJECT(c->location), "key-press-event",
                      G_CALLBACK(key_location), c);
@@ -587,6 +591,10 @@ grab_environment_configuration(void)
     if (e != NULL)
         download_dir = g_strdup(e);
 
+    e = g_getenv(__NAME_UPPERCASE__"_ENABLE_EXPERIMENTAL_WEBGL");
+    if (e != NULL)
+        enable_webgl = TRUE;
+
     e = g_getenv(__NAME_UPPERCASE__"_FIFO_SUFFIX");
     if (e != NULL)
         fifo_suffix = g_strdup(e);
index 5ea1f651885b2b43d192276f6cda198e0240913b..aa1b2095098414ec9ad838a92081683f4fa0e570 100644 (file)
@@ -52,6 +52,11 @@ stick to XDG directories, then you should configure your
 
 This variable defaults to \fB/var/tmp\fP.
 .TP
+\fBLARIZA_ENABLE_EXPERIMENTAL_WEBGL\fP
+Enable WebGL support in WebKit if this variable is set. Note that this
+is an \fBEXPERIMENTAL\fP feature. This setting could vanish from
+\fBlariza\fP in future releases without notice.
+.TP
 \fBLARIZA_FIFO_SUFFIX\fP
 Cooperative instances are implemented using a named pipe in the file
 system. The name of this pipe usually is (at least on modern systems