756 Commits

Author SHA1 Message Date
David Herrmann
28be382019 conf: make missing arguments or wrong arguments fatal
It is not acceptable to start the applications with wrong parameters. A
typo must be corrected before starting the application so simply fail
loudly on errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 21:00:03 +02:00
David Herrmann
5c13be3f1d conf: move CONF_HAS_ARG flag to config-types
Whether an option takes an argument or not is definitely a property of the
type and not of the option. Therefore, move the flag to the type structure
and remove it from the option structure.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 20:52:17 +02:00
David Herrmann
c65ac64aa5 conf: make config types constant
Config types are shared so they should never be modified. Hence, make them
constant.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 20:51:30 +02:00
David Herrmann
e80a39b5be conf: make types generic
This abstracts the type system of the config parser so other types can be
added without changing the parser itself. This will also be required to
make the conf-subsystem exportable to other users.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 20:16:38 +02:00
David Herrmann
d00f61305f conf: prefix helpers with CONF_*
This is part of an effort to make the conf-subsystem more friendly for
external users like the tests/* binaries.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 19:52:11 +02:00
David Herrmann
022209905d Release kmscon-3
This is again a development release. However, the kmscon application is
now at a point where it is quite stable and provides many of the planned
features. API/ABI compatibility is not guaranteed, yet.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
kmscon-3
2012-08-11 15:28:34 +02:00
David Herrmann
ac26c0ee2f Update NEWS file
Add information about all changes since kmscon-2.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 15:27:56 +02:00
David Herrmann
ed8c730f99 Update README
Update dependency and configuration information.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 15:17:47 +02:00
David Herrmann
d51a40d090 main: add support for multiple video objects per seat
All other subsystems were updated to support multiple video objects. As
last step, the main-handler just has to forward all video objects and
correctly wake them up and put to sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:59:16 +02:00
David Herrmann
8dae4e744c ui: correctly remove all displays when video is removed
When removing a video object we also need to remove all displays from the
terminal object. Otherwise, the terminal will still try to draw on the
displays which obviously fails.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:58:08 +02:00
David Herrmann
42c177e3cd ui: fix log-subsystem
Copy and paste error. We obviously should specify the LOG_SUBSYSTEM to be
"ui" and not "config".

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:55:49 +02:00
David Herrmann
d9e7137861 text: font: pango/freetype2: fix correctly freeing font faces
Whoops, obvious typo. We need to free the face if the refcount drops to
zero and not if it is non-zero.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:54:43 +02:00
David Herrmann
21092ba70f text: font: freetype2/pango: fix always setting real attributes
We copy the real attributes into the parent font structure only during
font-creation. However, if multiple renderers run simultaneously, they
might share fonts so we need to copy the attributes when reusing a font,
too.

This fixes a nasty division by zero bug during font rendering.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:35:01 +02:00
David Herrmann
66936a194c ui: convert API to support multiple video objects
Internally, the UI subsystem already supports multiple video objects.
However, the public API didn't expose that, yet. This changes the API to
allow adding and removing video objects from the UI.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:09:44 +02:00
David Herrmann
11a4b6c887 terminal: remove global video object
We used to have a global video object for each terminal. However, this has
all been moved to the UI subsystem which can deal with multiple video
objects simultaneously. Hence, we can remove this as it is no longer used.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 14:01:04 +02:00
David Herrmann
bed915dfb6 uterm: video: fbdev: add support for non xrgb32 devices
This adds blitting/blending/filling support for devices which are not the
classic xrgb32 device. bpp=24 is not supported as it is still unclear how
3-byte integers look like in mixed/big endian.

This uses a very basic dithering technique to check for errors between the
real and computed values which is then distributed horizontally only.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 13:51:10 +02:00
David Herrmann
ea62198b6e test_output: always use blitting backend
This removes the currently non-working OpenGL test and always uses the
blitting functions.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 13:21:15 +02:00
David Herrmann
faa12b6a61 uterm: fbdev: add udlfb workaround
udlfb incorrectly reports framebuffer sizes. That is, if we request a
framebuffer twice the size as the real framebuffer for double-bufferring,
it will accept these values and report success. We can even map this
virtual framebuffer successfully! However, the memory that is internally
allocated is only the real smaller framebuffer and we will get segfaults.
This might even leak internal kernel memory so we should fix this on
kernel-side as soon as possible.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11 11:32:55 +02:00
David Herrmann
e5dfe1164d Remove fonts/ directory
This directory and the DejaVu Font is no longer used and replaced with a
proper fontconfig subsystem. There is also another in-memory font in the
8x16 font subsystem so no need to have this one.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 18:03:32 +02:00
David Herrmann
7a64adeca9 Move doc/vte.txt to docs/vte.txt
There is really no reason to have _two_ documentation directories.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 18:02:32 +02:00
David Herrmann
7ae88d4ed7 eloop: finish documentation
Finish source code documentation. gtk-doc isn't working very well so this
probably needs to be re-done, but not now...

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 18:01:14 +02:00
David Herrmann
48d9743be5 console: correctly catch text-renderer errors
We should check for errors to avoid doing all the rendering even though
the text-renderer already failed. Also print debug messages if specific
intermediate steps fail.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:53:25 +02:00
David Herrmann
ac8cc08f41 terminal: check for errors when initializing text renderer
We need to check for errors, otherwise, the text-renderer may be invalid
and we will never be able to render on it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:51:02 +02:00
David Herrmann
4e9ad1b915 terminal: choose "gltex" renderer if OpenGL is available
If the uterm backend supports OpenGL, then we should use the "gltex"
renderer as the "bblit" renderer performs pretty badly on OpenGL displays.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:49:12 +02:00
David Herrmann
2652637fb9 text: fix choosing fallback backend
We didn't correctly choose the fallback backend but instead used the
last-registered backend. Fix this.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:48:28 +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
ac3fa529dc text: rework text renderer system
This reworks the text renderer system to make it easier to write backends.
We also allow returning errors during rendering now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:42:00 +02:00
David Herrmann
4ee5c05b57 uterm: video: drm: reset vertex-attrib-arrays after use
We should reset all used vertex-attrib-arrays, otherwise, we have to reset
them before drawing as we cannot sure that some other renderer left them
on.
As a rule we always assume a reset state similar to our assumption that no
VBO is bound during rendering.

This is a quite bad side-effect from OpenGL being a state-machine. As we
are a library, we cannot make any undocumented assumptions about the
OpenGL state. Therefore, we try to be as strict as possible.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-10 11:38:42 +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
1de4f67f44 misc: fix returning false in kmscon_hashtable_find() when invalid
We currently return "true" if the hashtable is invalid which is
irritating. Fix this to be "false".

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 15:14:35 +02:00
David Herrmann
f880a3abdb misc: fix rehashing hashtable entries
We need to hash the key instead of the whole entry, otherwise, we have
dead/wrong entries in the hash-table after a rehash-round.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 15:13:49 +02:00
David Herrmann
2e06e93a80 llog: mark llog_format as unused
Gcc emits useless warnings when llog_format is not used so mark it as
unused.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 13:02:44 +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
beb36e962d terminal: remove gl.h include
We do not use this header inside of the terminal subsystem so we can
remove it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:28:23 +02:00
David Herrmann
f1f8fac0ec font: remove font.h
This header is unused so we can remove it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:28:03 +02:00
David Herrmann
002e8fb65e text: move font_char_attr to text.h
This way we can now remove all font.h includes. We can rename the
structure later.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:27:19 +02:00
David Herrmann
5126c02f17 uterm: video: drm: adopt new libgbm API
libgbm changed the API (why?) so we need to use get_stride() instead of
get_pitch().

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:21:20 +02:00
David Herrmann
1f5fa54bfe terminal: remove OpenGL drawing stubs
Drawing with OpenGL didn't work, so we can safely remove the stubs.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-08 11:20:36 +02:00
David Herrmann
f8e342c019 misc: remove log references
The static-* code does not depend on the log subsystem so it should not
include the header nor define some internal logging helpers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 19:04:04 +02:00
David Herrmann
9ae00680df text: bblit: remove unused private data
The bit-blitting renderer does not really use the helper structure so
remove it and simplify the code a lot.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 15:44:41 +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
d057ecadae Suppress some odd gcc warnings
As gcc is not aware of out list-semantics, it warns about uninitialized
variables when in fact we know that they must be initialized. Suppress
some by initializing the variables to NULL.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 15:04:42 +02:00
David Herrmann
3f492d9553 text: bblit: do not clear screen
The console layer guarantees that all glyphs are sent to the renderer so
there is no need to clear the screen before redrawing.

This reduces flickering of single-buffered video backends.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 14:54:34 +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
1ce3b14ca6 uterm: uxkb: fix typo in (u)xkb_available=false
When compiling without xkbcommon we currently get compiler errors as the
uxkb_available variable hasn't been correctly renamed previously.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 14:47:12 +02:00
David Herrmann
c52ecdfa6b conf: add "font-engine" option
This option allows to select the font-engine during run-time.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-06 14:45:03 +02:00