[hackers] [surf/surf-webkit2] Add support for WebGL || Eon S. Jeon
commit 7817d0ec83b16dad6ad4f68039a58c371dbca38e
Author: Eon S. Jeon <esjeon_AT_hyunmu.am>
AuthorDate: Sat Sep 30 00:34:35 2017 +0900
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Feb 23 13:39:35 2018 +0100
Add support for WebGL
Allows enabling and disabling WebGL support built into WebKit.
The feature is turned off by default.
diff --git a/config.def.h b/config.def.h
index 2e735bf..6748f8a 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -46,6 +46,7 @@ static Parameter defconfig[ParameterLast] = {
[SpellLanguages] = { { .v = ((char *[]){ "en_US", NULL }) }, },
[StrictTLS] = { { .i = 1 }, },
[Style] = { { .i = 1 }, },
+ [WebGL] = { { .i = 0 }, },
[ZoomLevel] = { { .f = 1.0 }, },
};
diff --git a/surf.c b/surf.c
index 0f8b9c9..95b09be 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -79,6 +79,7 @@ typedef enum {
SpellLanguages,
StrictTLS,
Style,
+ WebGL,
ZoomLevel,
ParameterLast
} ParamName;
_AT_@ -820,6 +821,9 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a)
setstyle(c, getstyle(geturi(c)));
refresh = 0;
break;
+ case WebGL:
+ webkit_settings_set_enable_webgl(s, a->i);
+ break;
case ZoomLevel:
webkit_web_view_set_zoom_level(c->view, a->f);
return; /* do not update */
_AT_@ -1079,6 +1083,7 @@ newview(Client *c, WebKitWebView *rv)
"enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.i,
"enable-site-specific-quirks", curconfig[SiteQuirks].val.i,
"enable-smooth-scrolling", curconfig[SmoothScrolling].val.i,
+ "enable-webgl", curconfig[WebGL].val.i,
"media-playback-requires-user-gesture", curconfig[MediaManualPlay].val.i,
NULL);
/* For more interesting settings, have a look at
Received on Fri Feb 23 2018 - 13:42:05 CET
This archive was generated by hypermail 2.3.0
: Fri Feb 23 2018 - 13:48:35 CET