94 Commits

Author SHA1 Message Date
David Herrmann
6fb1e5d7b4 build: fix distcheck errors
Correctly include everything in the distribution so distcheck and dist
really work.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:21:09 +02:00
David Herrmann
16e292830d docs: remove gtkdoc
This never really worked and was horrible to maintain. We need to find
something else for documentation, but we will probably have to do it with
a separate XML file without any generator.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:19:49 +02:00
David Herrmann
d84ed347bf build: fix dbus-loop build
We need to include everything in the distribution and fix the
include-path, otherwise, we might get "distcheck" errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:18:19 +02:00
David Herrmann
174722b400 build: make eloop independent of libkmscon-static
This removes the nasty dependency to libkmscon-static for libeloop.
Otherwise, we might end up with GLESv2 dependencies here which is really
not what we want.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-04 19:10:28 +02:00
David Herrmann
700b12b89d static: move hook into separate independent header
This makes the hook implementation independent of any other code or header
so you do not have to link to libkmscon-static when using it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-04 19:05:45 +02:00
David Herrmann
5c3bad843c static: move dlist into separate independent header
This creates a new header static_dlist.h which is independent of any other
code. It can be included by other libraries/applications without the need
of linkin to libkmscon-static which reduces a lot overhead.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-04 18:55:08 +02:00
David Herrmann
6ae5ddc0e7 text: add bbulk renderer
The bbulk renderer is very similar to the bblit renderer but it assembles
a request-buffer of all characters and then pushes these requests via a
vector-call to the video hardware.
This turns out to increase performance slightly as we do not call into the
video subsystem for every characters but only once.

This renderer can reduce performance when used with partial-redraws (which
are not implemented, yet), so we keep the bblit renderer around.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-04 17:58:37 +02:00
David Herrmann
1637e7fd30 build: add GLES2-libraries to kmscon-static
kmscon-static needs these to build properly. Currently, they are pulled in
via uterm but if it is used without uterm the build will fail.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-29 17:51:53 +02:00
Ted Kotz
4788267a9c text: font: add unifont backend
This adds a new Unifont font-backend based on the recently added Unifont
data. The backend is disabled by default for 2 reasons:
  - It takes about 5min to compile and needs >1GB of memory on an Intel
    Atom N450
  - License situation is unclear as it is GPL

Written-by: Ted Kotz <ted@kotz.us>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-25 17:04:51 +02:00
David Herrmann
e9b523c3f1 text: font: unifont: add genunifont generator
This new generator converts the unifont hex-encoded data into a C-source
file which then can be compiled statically into the kmscon binary. Please
note that the resulting source file is bigger than 100MB and can take
quite a while to compile.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-25 15:36:55 +02:00
Marcin Slusarz
6a61caab9a build: ...and now fix build without GLES2
Defining *_la_CPPFLAGS var in "if...endif" block breaks generation
of Makefile.in - automake assumes it's defined unconditionally and
uses it for building objects.

configure.ac clears all variables if each dependency is disabled so we can
include it unconditionally.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-23 21:07:26 +02:00
Marcin Slusarz
6094ff1603 build: fix build with GLESv2
CC     src/static_gl_math.lo
In file included from src/static_gl_math.c:35:0:
src/static_gl.h:36:23: fatal error: GLES2/gl2.h: No such file or directory

  CC     src/static_gl_shader.lo
src/static_gl_shader.c:36:23: fatal error: GLES2/gl2.h: No such file or directory

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-22 12:56:00 +02:00
David Herrmann
e1c591a3ef fakevt: add fakevt helper for VT-less systems
The fakevt helper binary can be used on VT-less systems or seats to make
kmscon activate the fake VT and deactivate it. This way, you can control
when kmscon acquires video devices and when it releases them.

This is a global setting that affects all seats where kmscon is running
except seat0 if it uses real VTs.

This should only be used for debugging. This is really no intended for use
in production.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-12 13:35:18 +02:00
David Herrmann
1101a6b5c3 uterm: vt: move all vt.h/c code into uterm_vt.c
This merges both files so we can reduce the code overhead here. This is
still some very old code that was never correctly merged into new
uterm_vt.c subsystem. This should help doing it now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-12 09:11:35 +02:00
David Herrmann
c9ccc70fcb main: move conf_global to kmscon_conf in new header main.h
The main configuration is now limited to kmscon and thus should not use
the conf_* prefix. Move all code to use the new name and introduce the new
main.h header mainly for kmscon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 22:02:46 +02:00
David Herrmann
df84e9f217 text: gltex: add OpenGL text renderer
This adds an OpenGL text renderer. It uses textures to store glyph
information and renders the characters by assembling a vertex-list first.
To improve performance, we use texture-atlases.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:43:07 +02:00
David Herrmann
ee71531870 build: make bblit backend optional
This allows configuring the bblit backend during kmscon-build. If other
rendering backends are preferred, you can now compile kmscon without the
bblit backend.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 19:33:34 +02:00
David Herrmann
e1bf9c5c19 uterm: video: drm: implement .blit, .blend and .fill callbacks
This implements the static 2D blitting callbacks for the DRM backend. It
uses OpenGL to push the images with textures through the rendering
pipeline. Please note that this is horribly slow when used like 2D
blitting. However, it is a safe backend and better than nothing.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 19:11:42 +02:00
David Herrmann
c677377e04 gl: add shader helpers
New helper functions for working with OpenGL shaders.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 15:32:01 +02:00
David Herrmann
70a503d00c static: add gl math helpers
These are the same helpers that were previously removed, however, they are
now part of the static-kmscon library and can be stripped away by the
linker.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 12:26:35 +02:00
David Herrmann
9fe063e274 genshader: make shader generation more flexible
The genshader program now takes all input shaders as arguments so we can
easily add new shaders. We also name the constants after the shader file
to be as flexible as possible.

This also moves the generated shaders into the static-kmscon library. The
linker will strip unused symbols, anyway, so we aren't loosing anything
here.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 12:13:29 +02:00
David Herrmann
2da673ec8f gl: remove GL subsystem
The GL subsystem is no longer used so we can remove it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:36:51 +02:00
David Herrmann
a7f703f8c1 build: add --disable-optimizations option
We are in a state where redrawing the console can take a significant
amount of time on slower machines. Therefore, we definitely need gcc code
optimizations which help here a _lot_. However, they are currently bundled
to the debug flags.

This splits this into two options. We still need this flag to get getter
backtraces. Otherwise, those inlined functions are horrible to track done.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 15:27:53 +02:00
David Herrmann
0fee19a8c0 text: font: Simplify font-system and add freetype2 renderer
The freetype2 renderer uses ft2 and fontconfig to provide a very
simplistic renderer. We also simplify the logic of the whole subsystem a
lot and guarantee that each glyph will have the same size now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 14:48:22 +02:00
David Herrmann
5517fa16bd Use new text renderer
This fixes the console and terminal layer to use the new text renderer
instead of the old one.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-01 15:41:22 +02:00
David Herrmann
99b2038f7f text: font: add pango font backend
The pango font backend is similar to the currently used older backend but
provides the new API. It is modular so we can disable it if not needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-30 17:44:02 +02:00
David Herrmann
48beed72f4 build: add text-subsystem to build-sources
This finally adds the new font renderers to the build-sources so they are
actually built.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-30 11:09:57 +02:00
David Herrmann
741b8d33df Refactor input backend-system
This is a rewrite of the input system. The backends itself are not
modified. However, it is now possible to have multiple backends and change
them on runtime.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-21 19:06:50 +02:00
David Herrmann
8a9eccdaf9 build: remove glib dependency
We no longer require glib, yeah! Drop the mandatory glib dependency from
all build-files. Notice that there is not a single dependency, anymore,
except for libc.

We still have a not-mentioned pango dependency but this can be replaced
with freetype or a static font renderer so we currently do not care.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-15 16:41:26 +02:00
David Herrmann
2ca0c915a7 Add optional dbus support
As we might need dbus for inter-process-communication later, this adds a
very rudimentary dbus client integration for epoll-based loops.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-14 14:00:23 +02:00
David Herrmann
3a1926b081 misc: remove glib dependency
This adds a new drop-in replacement for the glib hashtable implementation.
The hash table can be found at github: github.com/rustyrussel/ccan

It's licensed under the terms of the LGPL and perfect for our
implementation. Please see COPYING for license information.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 19:13:16 +02:00
David Herrmann
bca8d9d6d7 Add NEWS file
Whenever we do a release, this file will contain all the major changes as
a short list.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 16:31:54 +02:00
David Herrmann
9c74f6d423 build: remove TODO from DIST_EXTRA
The TODO list was moved to github long ago so remove this dead reference.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 16:18:23 +02:00
David Herrmann
6786555d17 build: make opengl optional
This removes the mode where we compiled uterm with OpenGL instead of
OpenGLES2 (it was broken anyway) and makes it fully optional now.

gl_shader.h is no longer compiled if OpenGL is not available and provides
dummy helpers instead.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 14:59:43 +02:00
David Herrmann
de02874bf6 uterm: add dumb-drm backend
Nearly all drm drivers provide a GEM/TTM buffer backend called "dumb
buffers". These buffers can simply be mmap'ped like fbdev device so 2D
acceleration is available. This patch adds a backend to uterm-video that
uses these buffers. It is quite similar to the drm backend but removes all
the egl/gl/gles2 dependencies.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 14:28:26 +02:00
David Herrmann
27dbb3fd0e build: rewrite configure.ac
Remove all obsolete code and make it more readable. Nearly all features
can now be configured. However, the code doesn't work correctly if udev or
systemd is removed. That will be fixed soon, though.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-30 19:52:20 +02:00
David Herrmann
f8f2c49de5 build: move systemd dependencies to libuterm
We use the sd-login library in uterm exclusively so move the dependecy to
libuterm.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-29 13:00:00 +02:00
David Herrmann
c078bbbe95 build: move vt.[hc] to libuterm
The kmscon VT layer is used in libuterm exclusively so build it as part of
it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-29 12:59:25 +02:00
David Herrmann
5f3fab4974 build: move uterm into shared library
The uterm code was created to allow other applications to easily build new
user-space terminals for linux machines. Therefore, put it into a separate
library and install the header files correctly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-29 12:47:54 +02:00
David Herrmann
0535af0498 build: move eloop into shared library
We use the eloop code in several other projects so move it into a shared
library to allow code-sharing.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-29 12:37:02 +02:00
David Herrmann
34357d21c4 build: move external sources into libkmscon-static
Move all external sources into this library so we can use them everyone
but also be sure that we can link them statically. We will need this
guarantee later when adding LGPL stuff to libkmscon-static.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 21:15:08 +02:00
David Herrmann
24f3ea8496 build: add comments to Makefile.am
Add more comments to Makefile.am to make it more readable.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 21:11:19 +02:00
David Herrmann
89a9ea36ff build: put static_* files into separate library
We now build all small helpers into a separate small library that can be
linked statically into all our others. That is, we don't need to keep
backwards compatibility or anything inside this library.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 20:43:34 +02:00
David Herrmann
f1326b2728 static: move statically linked subsystems to static_*
Small stuff that is not worth putting into a separate library is no moved
into the "static" library which is statically linked into all our
subsystems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 20:35:22 +02:00
David Herrmann
ac2ad45270 build: add gtk-doc
This adds gtk-doc documentation builds to kmscon. All documentation is
build in a central place due to gtk-doc restrictions.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-23 20:09:19 +02:00
David Herrmann
a36b66cc77 uterm: add fbdev video backend
This adds a fully working fbdev backend to the uterm library. This allows
us to create our rendering pipeline on any linux machine.

The fbdev backend is not yet hooked up into kmscon. There are still some
remaining issues as we do not have OpenGL on fbdev if EGL is not compiled
with fbdev backend (which is usually not).

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-23 18:24:44 +02:00
David Herrmann
771e08de07 vte: add special character sets
Since vt100 (and extended with vt220) you can load different character
sets into GL and GR. As we use UTF-8 as base encoding, we actually do not
need them but have to support it for backwards compatibility. For further
information, see the comments in vte_charsets.c.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-29 10:27:46 +02:00
David Herrmann
4f0defca3f input: remove old input subsystem
We are no longer using the old subsystem, so remove it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-26 14:58:53 +02:00
David Herrmann
233eb5c510 uterm: add VT API
The uterm VT API is designed to support new user-space implementations of
vt-master APIs. If we are on seat0 and CONFIG_VT is enabled, we use the
kernel VT API. In all other cases we currently simply fall back to a
non-op but will implement in the future dbus based APIs or similar to
support VT switching, that is multi-session, on all seats.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-25 09:45:20 +02:00
David Herrmann
c5f137c833 uterm_input: add xkb backend
This mainly copies the kbd_xkb.c backend into the uterm library.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 21:30:06 +02:00