Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Webrender graphic backend (GPU-accelerated Emacs) #1581

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
09f5bfc
upgrade `rand` crates version to 0.7.3.
harryfei Aug 15, 2020
5b32d4c
webrender: Add webrender backend file wrterm.h and wrgui.h.
harryfei Aug 15, 2020
344cf8e
webrender: clean wrterm
harryfei Aug 15, 2020
84ed512
webrender: minized extern functions
harryfei Aug 15, 2020
fc99755
webrender: correct comments
harryfei Aug 15, 2020
d925111
webrender: add more FRAME_X macros
harryfei Aug 15, 2020
b20279b
webrender: add most wenrender stub functions
harryfei Aug 15, 2020
85ed2fd
webrender: enable x term feature
harryfei Aug 15, 2020
dd2bba1
webrender: add cargo feature flag for webrender build
harryfei Aug 15, 2020
36aadb4
webrender: refactor DispalyInfoRef
harryfei Aug 15, 2020
3cbd0a7
webrender: fix build window system initialize error
harryfei Aug 15, 2020
dac0f6d
webrender: implement `x-open-connection` and `x-create-frame` basic l…
harryfei Aug 15, 2020
ff340fc
webrender: refactor create frame logic
harryfei Aug 15, 2020
c58dff6
webrender: add Output releate data struct.
harryfei Aug 15, 2020
6458289
webrender: implement `x-get-focus-frame`
harryfei Aug 15, 2020
67a716a
webrender: implement basic `x-create-frame`
harryfei Aug 15, 2020
2b7680e
webrender: implement basic font handlers.
harryfei Aug 15, 2020
a2d965e
webrender: add frame faces initialization
harryfei Aug 15, 2020
9c97adf
webrender: naive implementation for wr_defined_color
harryfei Aug 15, 2020
a548976
webrender: implement default handlers for redisplay_interface
harryfei Aug 15, 2020
ccc9709
webrender: naive implementation for some webrender handlers
harryfei Aug 15, 2020
ff624f9
webrender: add a empty `xw-color-values` lisp function
harryfei Aug 15, 2020
f081353
webrender: add `x-register-dnd-atom` ad `x-change-window-property`
harryfei Aug 15, 2020
7dd3870
webrender: add more stub functions for wrterm.
harryfei Aug 15, 2020
bc2cec7
webrender: add webrender
harryfei Aug 15, 2020
a351d6d
webrender: render basic text
harryfei Aug 15, 2020
1e73651
webrender: implement more webrender backend functions
harryfei Aug 15, 2020
3abd47d
webrender: show glyph string color
harryfei Aug 15, 2020
b1b4734
webrender: fix slant and weight rendering
harryfei Aug 15, 2020
d05c760
webrender: fix non-monospace font rendering
harryfei Aug 15, 2020
cab2d86
webrender: draw underline
harryfei Aug 15, 2020
966b02d
webrender: fix frame column width
harryfei Aug 15, 2020
cca8a7e
webrender: fix visible height rendering
harryfei Aug 15, 2020
57ebc70
webrender: fix fringe rendering
harryfei Aug 15, 2020
eae3504
webrender: show vertical window border
harryfei Aug 15, 2020
7ff4ef9
webrender: show right divider
harryfei Aug 15, 2020
6040499
webrender: render frame background
harryfei Aug 15, 2020
824db11
webrender: implement `x-display-visual-class`
harryfei Aug 15, 2020
2bee2e1
webrender: implement `x-display-attributes-list`
harryfei Aug 15, 2020
d3efafc
webrender: implement `clear_frame`
harryfei Aug 15, 2020
0d160a5
webrender: move webrender event loop into a seperated thread
harryfei Aug 15, 2020
6abf373
webrender: handle keyboard event
harryfei Aug 15, 2020
38f8b05
webrender: speedup keyboard intput
harryfei Aug 15, 2020
bf94149
webrender: add `scroll_run_hook`
harryfei Aug 15, 2020
5bb8750
webrender: show window cursor
harryfei Aug 15, 2020
7db04be
webrender: implement `after_update_window_line`
harryfei Aug 15, 2020
5837f5b
webrender: implement `stretch_string`
harryfei Aug 15, 2020
d53fcbb
webrender: add `x_own_selection_internal` and `x_get_selection_intern…
harryfei Aug 15, 2020
1231d09
webrender: make webrender resizable
harryfei Aug 15, 2020
c1d2ea9
webrender: preserve frame output pixel when rendering
harryfei Aug 15, 2020
c971af3
webrender: add window title
harryfei Aug 15, 2020
8a42d93
webrender: add selectable channel
harryfei Aug 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
OPTION_DEFAULT_OFF([xwidgets],
[enable use of some gtk widgets in Emacs buffers (requires gtk3)])

OPTION_DEFAULT_OFF([webrender],
[enable use of webrender(written in Rust) as GUI backend on
multiple platforms(Linux, Windows and MacOS) (experimental)])

## For the times when you want to build Emacs but don't have
## a suitable makeinfo, and can live without the manuals.
dnl https://lists.gnu.org/r/emacs-devel/2008-04/msg01844.html
Expand Down Expand Up @@ -2133,6 +2137,11 @@ if test "${HAVE_W32}" = "yes"; then
with_xft=no
fi


if test "${with_webrender}" = "yes"; then
window_system=webrender
fi

## $window_system is now set to the window system we will
## ultimately use.

Expand Down Expand Up @@ -2169,6 +2178,9 @@ dnl use the toolkit if we have gtk, or X11R5 or newer.
w32 )
term_header=w32term.h
;;
webrender )
term_header=wrterm.h
;;
esac

if test "$window_system" = none && test "X$with_x" != "Xno"; then
Expand Down Expand Up @@ -4946,10 +4958,21 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
fi
AC_SUBST(FONT_OBJ)
fi

if test "${window_system}" = "webrender" ; then
AC_DEFINE(USE_WEBRENDER, 1,
[Define to 1 if you want to use the webrender.])

EMACS_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
test "$HAVE_FONTCONFIG" = "no" && AC_MSG_ERROR(webrender requires libfontconfig)

fi

AC_SUBST(XMENU_OBJ)
AC_SUBST(XOBJ)
AC_SUBST(FONT_OBJ)


WIDGET_OBJ=
MOTIF_LIBW=
if test "${USE_X_TOOLKIT}" != "none" ; then
Expand Down Expand Up @@ -5360,6 +5383,7 @@ AS_ECHO([" Does Emacs use -lXpm? ${HAVE_XPM}
Does Emacs have dynamic modules support? ${HAVE_MODULES}
Does Emacs support Xwidgets (requires gtk3)? ${HAVE_XWIDGETS}
Does Emacs have threading support in lisp? ${threads_enabled}
Does Emacs use webrender? ${with_webrender}
"])

if test -n "${EMACSDATA}"; then
Expand Down Expand Up @@ -5489,6 +5513,9 @@ case "$window_system" in
w32)
CARGO_DEFAULT_FEATURES="${CARGO_DEFAULT_FEATURES}\"window-system-w32\", "
;;
webrender)
CARGO_DEFAULT_FEATURES="${CARGO_DEFAULT_FEATURES}\"window-system-webrender\", "
;;
esac
AC_SUBST(CARGO_DEFAULT_FEATURES)
AC_CONFIG_FILES([rust_src/Cargo.toml])
Expand Down