Commit Graph

51916 Commits

Author SHA1 Message Date
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
Matthias Clasen
149dd1f558 recorder: show color information for color nodes
A first step towards showing more information for render nodes.
2017-09-28 15:54:30 -04:00
Timm Bäder
29a4f0ce1f Plug some memory leaks
Make sure the scroll controllers in GtkComboBox and GtkScrolledWindow
get destroyed.
2017-09-28 20:01:01 +02:00
Timm Bäder
29dd0a940e GdkEvent: OWNER_CHANGE events have a selection as well 2017-09-28 20:01:01 +02:00
Timm Bäder
74ce20451f GdkEvent: Unref user_data in free
gdk_event_set_user_data refs it and this was creating pretty bad leaks.
2017-09-28 20:01:01 +02:00
Matthias Clasen
535529ca98 vulkan: Measure gpu time
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.
2017-09-28 10:29:16 -04:00
Matthias Clasen
72d043d51f gsk: Change the profiler setup
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.
2017-09-28 10:26:01 -04:00
Matthias Clasen
767966933d gsk: Redo the sampling in the profiler
Reset the min/max/average counters before calculating,
and only print the values if we have samples. In addition,
print the number of samples.
2017-09-28 10:25:49 -04:00
Matthias Clasen
4d8e7d71ca gsk: Add a profile counter for vulkan render passes
This is interesting now that we have multiple render passes.
2017-09-28 08:39:22 -04:00
Matthias Clasen
d61a715909 vulkan: Implement multiple render passes
Whenever we need a node as a texture, we now start a new render
pass that renders the node into a new intermediate texture, and
set up a semaphore to make the current render pass wait for it.

As part of this reorganization, much of the setup and drawing
code moved from gskvulkanrender.c to gskvulkanrenderpass.c.
2017-09-28 08:39:22 -04:00
Matthias Clasen
cbf897ab22 Add an api to get the vertex data for a render pass 2017-09-28 08:39:22 -04:00
Matthias Clasen
85e4e0672a Add semaphores to the command buffer submit api
Allow to pass in semaphores to wait for before executing
and to signal after executing the command buffer. This
just exposes the capabilities of the underlying Vulkan
api. Update all callers to pass no semaphores, for now.

We will use this in the future.
2017-09-28 08:39:22 -04:00
Matthias Clasen
ff188f6bf0 Add an api to create intermediate textures
The new function creates a vulkan image that is suitable for
use as a framebuffer to render to and as a texture to read from.
2017-09-28 08:39:22 -04:00