Commit Graph

11 Commits

Author SHA1 Message Date
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Matthias Clasen
a0bbd14325 gsk: Scale glyphs in the glyph cache
Pass a scale factor when caching glyphs or looking them
up in the cache. The glyphs in the cache are rendered
with subpixel precision determined by the scale. Update
all callers to pass a scale factor according to the window
scale. This lets us render crisp glyphs on hidpi systems.
2017-10-28 13:13:31 -04:00
Matthias Clasen
b5eeb98374 Add simple aging for the glyph cache
This should prevent the cache from growing out of bounds.
2017-09-20 23:26:14 -04:00
Matthias Clasen
4d4a0212fb vulkan: Better glyph cache api
Move the glyph caching api to something that can support using
multiple textures. We now split the text render ops into multiple
ops for different textures, and make each op render just a substring
of the text node's glyph string.
2017-09-20 23:26:14 -04:00
Matthias Clasen
ff45a86a1c Fix rendering glyphs from the cache
We were not quite using all the right dimensions.
2017-09-11 14:45:36 -04:00
Matthias Clasen
47cf17c70c vulkan: Add a primitive glyph cache
This is just a proof of concept - we use a single 1024x1024 surface,
and just give up when we run out of space. The cache is populated
incrementally, and items are never removed.
2017-09-10 21:56:37 -04:00
Matthias Clasen
b0e8d8483d More work on text nodes
This commit takes several steps towards rendering text
like we want to.

The creation of the cairo surface and texture is moved
to the backend (in GskVulkanRenderer). We add a mask
shader that is used in the next text pipeline to use
the texture as a mask, like cairo_mask_surface does.
There is a separate color text pipeline that uses the
already existing blend shaders to use the texture as
a source, like cairo_paint does.

The text node api is simplified to have just a single
offset, which determines the left end of the text baseline,
like all our other text drawing APIs.
2017-09-10 14:36:26 -04:00
Benjamin Otte
7b9ace488b vulkan: Add GskVulkanUploader
It's the thing that makes sure pixels end up on the GPU.
2016-12-20 18:01:11 +01:00
Benjamin Otte
85559d1fd9 vulkan: Split out command pool
This way we can pass the command pool around.
And that allows us to allocate and submitcustom buffers.
And that is necessary to make staging images work.
2016-12-20 18:01:11 +01:00
Benjamin Otte
f52dd12569 vulkan: Implement texture caching
And with this change, the GPU looks bored again.
2016-12-09 18:35:52 +01:00
Benjamin Otte
a753f047df gsk: Add skeleton for Vulkan renderer
The renderer itself obviously doesn't do anything.
2016-12-09 18:35:51 +01:00