| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Pass a format do GdkTextureClass::download(). That way we can download
data in any format.
Also replace gdk_texture_download_texture() with
gdk_memory_texture_from_texture() which again takes a format.
The old functionality is still there for code that wants it: Just pass
gdk_texture_get_format (texture) as the format argument.
|
|\
| |
| |
| |
| |
| |
| | |
Rename ngl to gl
Closes #4318
See merge request GNOME/gtk!4037
|
| |
| |
| |
| |
| |
| | |
Provide a minimal renderer implementation that fails
in realize. This avoids reusing the same type, which
might give bindings trouble.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Keep gsk_ngl_renderer_new and gsk_ngl_renderer_get_type,
since they were part of the abi in 4.2, and in an
installed header.
Fixes: #4318
|
| |
| |
| |
| |
| | |
We have only one gl renderer now, and it is
a bit odd for it not be called gl.
|
| |
| |
| |
| | |
It's GL_RGBA, not GL_BGRA, or GLES will complain.
|
| |
| |
| |
| |
| | |
GLES is very adamant about the format and type matching the internal
format, even if the data is NULL.
|
| |
| |
| |
| | |
We want to round up, not down.
|
|/
|
|
| |
Query the backbuffer instead.
|
|
|
|
|
|
|
|
|
| |
Make a deep texture, if the render nodes have
high depth content.
For now, we use 32F here for the deep format,
since using 16F causes small rounding errors
that break the memorytexture roundtrip tests.
|
|
|
|
|
|
| |
Look at whether the render nodes are high depth and
if so, request a high depth framebuffer.
Whether we actually get one is up to the backend.
|
|
|
|
|
|
|
|
|
| |
Look at the framebuffer and the rendernode to
determine what format to use for intermediate
textures.
Our preference here is to use fp16, if we have it
and it makes sense for the framebuffer we're given.
|
|
|
|
|
|
|
| |
Allow passing a format when creating textures or render targets.
Update all callers to pass GL_RGBA8, which is the format we
have always used so far.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add private api to find out if the content
of a render node should be considered 'deep'.
The information is collected at creation time,
so there is no tree-walking involved when we
are using this information in the renderer.
Currently, this comes down to whether there are
any texture nodes with high depth textures in the subtree.
In the future, we may want to allow marking gradient
nodes in this way as well.
|
|
|
|
|
|
|
|
|
|
|
| |
For MemoryTexture, this is a simple change.
For GLTexture, we need to query the format at texture creation. This
sounds like a bad idea and extra work until one realizes that we'd
need to do that anyway when using the texure the first time - either
when downloading, or when trying to use it in a rendernode, where we
will soon need that information to determine if the texture prefers high
depth.
|
|
|
|
|
|
|
| |
Also, now make gdk_memory_convert() the only conversion functions
and allow conversions between any 2 formats by going via a float[4].
This could be optimized via fast-paths, but so far it isn't.
|
|
|
|
|
|
|
|
| |
We never put large icons into the icon cache,
so all its items are always atlased, but we do
put large glyphs in to the glyph cache, and we
were never freeing those items, even when they
go unused. Fix that.
|
|
|
|
| |
Don't refer to nonexisting functions.
|
|
|
|
|
|
| |
When creating a GdkTexture from the texture
stored in the driver, we must free the GskNglTexture
struct.
|
|
|
|
| |
This wasn't serving any clear purpose.
|
|
|
|
| |
Move _GskNglTextureState to the one place it is used.
|
|
|
|
| |
Correct the function being called.
|
|\
| |
| |
| |
| | |
transform: Add sections
See merge request GNOME/gtk!3974
|
| |
| |
| |
| |
| |
| |
| | |
This function decomposes a general 2D transform
into skew, scale, rotation and translation.
Tests included.
|
| |
| |
| |
| |
| |
| | |
Add gsk_transform_skew() to make our transform
api more complete wrt to what you would expect
for a graphics api.
|
| |
| |
| |
| | |
This makes the code easier to navigate (for me).
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 87af45403ace1047b91ddbab98d9d5a5e15b84eb.
I've found that this change is needed to ensure that the
bounding boxes of text nodes encompass all the glyphd drawing.
Without it, we overdraw the widget boundaries and cut off
glyphs.
|
|/
|
|
|
|
|
|
|
| |
We are rendering the glyphs on a larger surface,
and we should avoid introducing unnecessary
rounding errors here. Also, I've found that
we always need to enlarge the surface by one
pixels in each direction to avoid cutting off
the tops of large glyphs.
|
|
|
|
| |
The subpixel-positioned glyph extends on both sides.
|
|
|
|
|
| |
This should not be necessary and only serves
to make the actual bugs harder to find.
|
|
|
|
| |
Add an example for reconstructing transforms.
|
|
|
|
|
|
|
|
|
| |
For 2D transforms, we can read the scale
factors more directly off the matrix.
This should eventually be moved out into a
function to decompose a 2D transform into
scale + rotation + skew + translation.
|
|
|
|
|
|
| |
We can just use gdk_texture_new_from_bytes here now.
Update affected test output.
|
|
|
|
|
|
| |
Avoid cairo, and use our own api for saving png data.
Update affected test output.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We avoid an offscreen if we know the child node
can 'handle' the transform. Shadow nodes can if their
child node does - either the child node is a text node
in which case the shortcuts we take for shadow nodes
will work fine with the transform (we just render the
text node offset), or the child is not a text node,
in which case we render the shadow to an offscreen
anyway.
This change makes the label-shadows reftest pass with
the GL renderer, not by fixing the issue but by avoiding
it.
|
|
|
|
|
|
|
|
| |
For shadow nodes, we try pretty hard to avoid
rendering shadows, and and we have a shortcut
that just renders text offset, but we can try
harder to do nothing - if the text is offset
by zero, we don't need to draw it at all.
|
|
|
|
|
|
| |
The wrong index was used for offsetting the bottom border rect.
Test included.
|
|
|
|
|
|
|
|
| |
We need to use an offscreen whenever there is overlapping
children somewhere in the tree below, just checking the
direct child of the opacity node is not enough.
Fixes: #4261
|
|
|
|
|
| |
Just use a GL texture and gdk_texture_save_to_png,
it was made for this.
|
| |
|
| |
|
|
|
|
| |
And also mark gsk_rounded_rect_to_string as malloc.
|
| |
|
|
|
|
|
| |
If we can't handle the texture, always just download_texture() it,
that way we are sure it's a memory texture.
|
|
|
|
|
| |
Now gdk_memory_convert() converts to one of these conversions instead of
re(ab)using parts of the GdkMemoryFormat enum.
|
|\
| |
| |
| |
| | |
rendernode: Write the whole node
See merge request GNOME/gtk!3938
|
| |
| |
| |
| |
| | |
It turns out g_output_stream_write_bytes() does not write the bytes.
It should be renamed to g_output_stream_write_some_of_the_bytes() maybe.
|
|/
|
|
|
|
|
|
| |
We can't make the -4 versions inline, since
we use ifuncs for them, so make vectorized
versions.
Test included.
|
|
|
|
|
|
| |
Followup to b244f31337eea. Pango provides color glyph
information for us now, so we don't need to steal a
bit anymore.
|