Timm Bäder
f5297e6f4b
snapshot: Use one GPtrArray for all nodes
...
Instead of creating one GPtrArray per GtkSnapshotState and saving nodes
in there, create one GPtrArray per snapshot and assign a
start_node_index to every GtkSnapshotState as well as a n_nodes variable
so every state knows which nodes belong to it.
2017-10-02 14:34:47 +02:00
Timm Bäder
8e59b3b387
snapshot: Use one large GArray for all states
...
Allocating all of them separately shows up in profiles.
2017-10-02 14:34:47 +02:00
Timm Bäder
d2afa1d72a
gtkroundedbox: Remove some unneeded conditionals
...
Always pass exactly 4 GtkCssValue* parameters to apply_border_radius
and make sure they are properly const.
2017-10-02 14:34:47 +02:00
Matthias Clasen
8beb78149d
Start reftests for gsk
...
Add a framework similar to what we have for gtk reftests
that lets us drop in a function to generate render nodes,
and compare reference output.
2017-10-02 00:21:56 -04:00
Matthias Clasen
47464ce4da
Create tests for gsk box shadows
2017-10-01 22:55:32 -04:00
Matthias Clasen
a4d984fb18
Create tests for GskTextNode
2017-10-01 22:09:43 -04:00
Matthias Clasen
3aaea0ef40
Clip intermediate textures
...
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.
2017-10-01 19:22:04 -04:00
Timm Bäder
0f6574dd05
stylecontext: Drop priv pointer
2017-10-01 09:19:09 +02:00
Timm Bäder
b5c3c51124
spinner: Remove priv pointer
2017-10-01 09:19:09 +02:00
Timm Bäder
29a6c66aec
switch: Remove priv pointer
2017-10-01 09:19:09 +02:00
Timm Bäder
edaa2c42ee
label: Remove priv pointer
2017-10-01 09:19:09 +02:00
Timm Bäder
bcaed4b420
image: Remove some unneeded includes
2017-10-01 09:19:09 +02:00
Timm Bäder
2da82f890a
image: Remove priv pointer
...
Look at all the free ram!
2017-10-01 09:19:09 +02:00
Timm Bäder
a32725bc9a
iconhelper: Don't inherit from GObject
...
It's not a GtkCssGadget anymore, it doesn't have any properties or
signals either and it's not public. Further, its lifetime is very clear
the way it's being used inside GTK+.
2017-10-01 09:19:09 +02:00
Timm Bäder
773973db78
cssshadowsvalue: Don't heap-allocate shadows
...
This showed up in profiles in certain scenarios, so export a
_get_n_shadows getter instead and let callers provide a sufficiently
large allocated array of GskShadows, which we can use with
g_alloc/g_newa.
2017-10-01 09:19:09 +02:00
Timm Bäder
53409623e5
switch: Remove some unneeded includes
2017-10-01 09:19:09 +02:00
Matthias Clasen
4e33be124d
Add a forgotten rename
...
When I renamed blend to texture, I overlooked that the color
text pipeline also uses this shader. Fix it.
2017-09-30 17:58:23 -04:00
Matthias Clasen
50bea37320
Reshuffle things a little bit
...
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.
2017-09-30 17:58:23 -04:00
Matthias Clasen
983e0b7956
Small simplification
...
Just keep the viewport as a graphene_rect_t, we don't need
to use the Vulkan type here.
2017-09-30 17:58:23 -04:00
Matthias Clasen
4c29102753
vulkan: Add a counter for intermediate textures
...
Count how many pixels of intermediate textures we create.
If we can count it, we can optimize it.
2017-09-30 17:58:23 -04:00
Matthias Clasen
3a37440be6
Cosmetics
...
Factor out a helper function.
2017-09-30 17:58:23 -04:00
Matthias Clasen
52afccb6a3
Fix a doc comment
...
It was missing a return.
2017-09-30 17:58:23 -04:00
Benjamin Otte
e9dedc5036
inspector: GSK_IS_RENDER_NODE() does NULL-check
...
That means we don't need an extra one just so gcc can complain.
2017-09-30 20:23:11 +02:00
Matthias Clasen
836e18cc96
Support repeat nodes in vulkan
...
We can use the texture pipeline for this, with a repeating sampler.
2017-09-29 23:08:14 -04:00
Matthias Clasen
31d8fe3a6a
vulkan: Add a repeating sampler
...
None of the render ops use it, yet.
2017-09-29 23:08:14 -04:00
Matthias Clasen
e382f956f3
vulkan: Move sampler creation down
...
This is in preparation of allowing multiple samplers.
2017-09-29 23:08:14 -04:00
Matthias Clasen
5577fde990
vulkan: Rename blend pipeline to texture
...
This is what it does, and the name blend is easily
confused with blend-mode.
2017-09-29 23:08:09 -04:00
Matthias Clasen
538e7c7982
vulkan: Allow to control scaling in the blend pipeline
...
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.
2017-09-29 22:12:25 -04:00
Matthias Clasen
e91051a562
vulkan: Fix setup for dependent render passes
...
We were not correctly preserving the modelview transform.
2017-09-29 15:58:16 -04:00
Daniel Boles
29d40196e6
docs: css-properties: Fix wrongly repeated colour
2017-09-29 18:14:07 +01:00
Timm Bäder
c8c39af454
testsuite: Add test case for previous commit
...
This previously led to a loop in the child widgets.
2017-09-29 12:16:06 +02:00
Timm Bäder
a196ad725a
widget: Fix inserting child widgets at the beginning
...
We have to care about the child widget's current prev/next sibling as
well.
2017-09-29 12:15:23 +02:00
Timm Bäder
18837248a6
build: Add widgetorder unit test to build system
2017-09-29 12:10:42 +02:00
Timm Bäder
392af59140
box: Remove return value from box_pack
...
Unused.
2017-09-29 10:50:33 +02:00
Timm Bäder
ad1f5fe61a
box: Remove size_allocate_no_center
...
GtkBox never has a center widget these days.
2017-09-29 10:49:41 +02:00
Timm Bäder
f38555712b
adwaita: Remove outlines from focused entries for now
2017-09-29 09:23:56 +02:00
Matthias Clasen
5d698c1452
Recorder: Add details for inset and outset shadow nodes
2017-09-28 21:41:24 -04:00
Matthias Clasen
9e2e6c1115
gsk: Fix a typo
...
Repeating linear gradient nodes share most of the implementation
with linear gradient nodes, but they shouldn't share the class name.
2017-09-28 21:06:52 -04:00
Matthias Clasen
352b566179
Recorder: Show details about linear gradient nodes
2017-09-28 21:06:35 -04:00
Matthias Clasen
89261d18c2
Recorder: Show details of blur nodes
2017-09-28 19:48:42 -04:00
Matthias Clasen
5e4f7301d6
recorder: Show details for blend nodes
2017-09-28 19:40:03 -04:00
Matthias Clasen
e45ab76664
gsk: remove gsk_blend_node_get_blend_mode from public api
...
We don't have any other such getters in the public api at
this point, so leave this one out as well.
2017-09-28 19:39:16 -04:00
Matthias Clasen
0d8b2535d8
Recorder: Show details of crossfade nodes
2017-09-28 19:20:25 -04:00
Matthias Clasen
2d5a121c3c
recorder: Show details for opacity nodes
2017-09-28 19:14:32 -04:00
Matthias Clasen
9e9df66b81
Recorder: Show details of border nodes
2017-09-28 18:58:18 -04:00
Matthias Clasen
ae549c6ce4
recorder: Put text color in the right row
...
It ended up in the wrong place by accident.
2017-09-28 18:41:39 -04:00
Matthias Clasen
cddf415cbb
Recorder: Show colors visually for text too
...
Just because we can do it.
2017-09-28 18:37:47 -04:00
Matthias Clasen
2da234d70d
Reshuffle the recorder ui a bit
...
Make it possible to see the properties and the rendering at
the same time, it makes navigating easier.
2017-09-28 18:37:00 -04:00
Matthias Clasen
e58ee9ad52
recorder: Show surfaces and textures
...
This makes the properties list much more interesting.
2017-09-28 18:17:38 -04:00
Matthias Clasen
65bfdf4b15
recorder: Show text node properties
2017-09-28 17:16:41 -04:00