| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Excessive use of sed when moving GskTexture to GDK; the GskTextureNode
should still live under the GSK namespace.
|
|
|
|
|
|
|
|
|
|
|
| |
We cannot unrealize a renderer in the dispose function, because that
would cause this chain to happen:
gsk_gl_renderer_dispose
gsk_renderer_dispose
gsk_renderer_unrealize
gsk_gl_renderer_unrealize
So we would call into thje GL renderers unrealize when it has already
(partially) disposed itself and ause accesses to dead variables.
|
|
|
|
| |
We want this thing to replace GdkPixbuf, so it has to live in GDK.
|
| |
|
|
|
|
|
|
|
| |
This fixes blurry text and icons whenever we apply shadows
in a hidpi window. Shadow nodes are the last ones that we
still use fallback for, and this was causing us to render
the text blurry.
|
|
|
|
|
| |
No need to go to the window, we store a copy of the scale factor
in the render pass object.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This is can always be obtained from the window that is already
associated with the renderer, no need to maintain a separate
property for it.
|
|
|
|
|
|
|
| |
The copy of the PangoGlyphString we do here was showing up
in some profiles. To avoid it, allocate the PangoGlyphInfo array
as part of the node itself. Update all callers to deal with
the slight api change required for this.
|
|
|
|
| |
The compiler has those predefined, so use them.
|
|
|
|
|
| |
These have been renamed to .frag/.vert, apparently the originals weren't
deleted.
|
|
|
|
|
|
| |
We return a scalar value, so we don't need it to be constant.
https://bugzilla.gnome.org/show_bug.cgi?id=789351
|
|
|
|
| |
I overlooked these when I recently did the render node api changes.
|
|
|
|
|
| |
Render nodes don't have transformations, currently.
Only transform nodes do.
|
|
|
|
|
|
| |
Rename the getter to follow the peek naming scheme.
Update all callers.
|
|
|
|
|
|
| |
Rename getters to follow the peek naming pattern.
Update all callers.
|
|
|
|
|
|
|
|
| |
Rename the surface getter to peek, following other render
node getters, and make the surface-based constructor private,
since it is not something we want to encourage.
Update all callers.
|
|
|
|
| |
Keeping these private does not really buy us anything.
|
|
|
|
|
|
| |
The color-matrix shader was creating pixels with r,g,b > a in
some cases, which leads to unexpected test failures. In particular
this as visible the opacity render node test for opacity 0.
|
| |
|
|
|
|
| |
My reading of the spec formulas was imperfect.
|
|
|
|
|
| |
This is the same change that was applied to cross-fade
nodes.
|
|
|
|
|
| |
This makes the new reftests pass and hopefully does not
break other things.
|
|
|
|
| |
This is the same fix as was just committed for blendmode nodes.
|
|
|
|
|
|
|
| |
We were node handling coordinates correctly when dealing
with differently sized child nodes in a blendmode node.
This was showing up in the gtk4-demo css blendmode example,
for blendmodes other than normal.
|
|
|
|
|
|
| |
We were not treating non-trivial child bounds right at all.
This was visible in the css blendmode cmyk example in gtk4-demo,
for the normal blendmode.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=788534
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=788534
|
|
|
|
|
| |
We never set this, since it is assigned as a side-effect
of realizing the renderer. Make this a plain readonly property.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
|
|
|
|
|
|
|
|
| |
-Wint-conversion is important because it checks casts from ints to
pointers.
-Wdiscarded-qualifiers is important to catch cases where we don't
strings when we should.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, we were creating gigantic intermediate textures
only to clip out a small section afterwards (e.g. in the listbox
example in gtk4-demo). This is wasteful if we apply effects on
the texture, such as blur or color-matrix. So, clip the dimensions
of the intermediate texture with the current clip. To make this
feasible, we move the texture coordinate computation out of the
pipeline setup functions into the node_as_texture function where
this clipping happens.
One extra complication we encounter is that the node might get
clipped away completely. Since Vulkan does not allow to create
empty images, we bail out in this case and not draw anything.
With these changes, the listbox example in gtk4-demo goes from
32M pixels of intermediate texture to 320000.
|
|
|
|
|
| |
When I renamed blend to texture, I overlooked that the color
text pipeline also uses this shader. Fix it.
|
|
|
|
|
|
|
|
|
|
| |
Instead of having a function with lots of arguments in
GskVulkanRender that we call from GskVulkanRenderPass which
then just calls back into GskVulkanRenderPass, just create
the new render pass object locally, and an api to add it
to the list that GskVulkanRender keeps. This makes it
a lot easier to preserve all the relevant parameters from
the parent render pass.
|
|
|
|
|
| |
Just keep the viewport as a graphene_rect_t, we don't need
to use the Vulkan type here.
|
|
|
|
|
| |
Count how many pixels of intermediate textures we create.
If we can count it, we can optimize it.
|
|
|
|
| |
Factor out a helper function.
|
|
|
|
| |
It was missing a return.
|
|
|
|
| |
We can use the texture pipeline for this, with a repeating sampler.
|
|
|
|
| |
None of the render ops use it, yet.
|
|
|
|
| |
This is in preparation of allowing multiple samplers.
|
|
|
|
|
| |
This is what it does, and the name blend is easily
confused with blend-mode.
|
|
|
|
|
|
| |
Pass in a second rect that defines the size of the texture.
Update the sole caller to pass in the same rect, for unchanged
behavior.
|
|
|
|
| |
We were not correctly preserving the modelview transform.
|
|
|
|
|
| |
Repeating linear gradient nodes share most of the implementation
with linear gradient nodes, but they shouldn't share the class name.
|
|
|
|
|
| |
We don't have any other such getters in the public api at
this point, so leave this one out as well.
|
|
|
|
|
|
| |
Since this value is only meaningful if we wait for the rendering
to end, we only keep this timer if GSK_RENDERING_MODE=sync is
enabled.
|
|
|
|
|
|
| |
Move away from the idea of intra-frame sampling, since we only
push samples once per frame, anyway. Instead, make the profiler
keep a rolling average of the last n frames.
|
|
|
|
|
|
| |
Reset the min/max/average counters before calculating,
and only print the values if we have samples. In addition,
print the number of samples.
|
|
|
|
| |
This is interesting now that we have multiple render passes.
|