summaryrefslogtreecommitdiff
path: root/gsk
Commit message (Collapse)AuthorAgeFilesLines
...
* vulkan: Split render ops into seperate structsBenjamin Otte2016-12-201-48/+63
| | | | | This makes it a lot clearer which members are relevant for each different operation.
* vulkan: Add infrastructure for push constantsBenjamin Otte2016-12-205-36/+188
| | | | | THe code includes fragment push constants for colors, but that code is so far unused.
* gsk: Add support for rounded clip rectanglesBenjamin Otte2016-12-203-0/+133
| | | | Also add support to GtkSnapshot, so people can push rounded clips.
* gsk: Add GskRoundedRectBenjamin Otte2016-12-206-1/+432
| | | | It's essentially a port of GtkRoundedBox to graphene.
* gsk: Add gsk_clip_node_new()Benjamin Otte2016-12-204-1/+136
| | | | | The node is a simple clipping node: It does a rectangular clip of its contents.
* gsk: Replace gsk_render_node_set_opacity()Benjamin Otte2016-12-207-58/+136
| | | | | | | ... with gsk_opacity_node_new(). Also implement support for opacity in gtk_widget_snapshot() using this new node.
* gsk: Remove gsk_renderer_create_fallback()Benjamin Otte2016-12-203-81/+3
| | | | Use gsk_render_node_draw() instead.
* gsk: Add fallback code to renderersBenjamin Otte2016-12-202-3/+39
| | | | | | | This code makes renderers fall back to Cairo rendering if they don't know how to handle a render node's type. This allows adding new render nodes with impunity.
* gsk: Add gsk_color_node_new()Benjamin Otte2016-12-204-0/+100
|
* Call gsk_render_node_draw() instead of creating fallback renderersBenjamin Otte2016-12-201-6/+1
|
* gsk: Add gsk_render_node_draw()Benjamin Otte2016-12-205-118/+150
| | | | | Draws a node to a given cairo_t. This is mostly intended for fallback usage.
* snapshot: Change how gtk_snapshot_push/pop worksBenjamin Otte2016-12-202-47/+29
| | | | | | | | | | | | | | Instead of appending a container node and adding the nodes to it as they come in, we now collect the nodes until gtk_snapshot_pop() is called and then hand them out in a container node. The caller of gtk_snapshot_push() is then responsible for doing whatever he wants with the created node. Another addigion is the keep_coordinates flag to gtk_snapshot_push() which allows callers to keep the current offset and clip region or discard it. Discarding is useful when doing transforms, keeping it is useful when inserting effect nodes (like the ones I'm about to add).
* gsk: gsk_render_node_set_transform() => GskTransformNodeBenjamin Otte2016-12-2010-107/+241
| | | | | | | | | | Instead of having a setter for the transform, have a GskTransformNode. Most of the oprations that GTK does do not require a transform, so it doesn't make sense to have it as a primary attribute. Also, changing the transform requires updating the uniforms of the GL renderer, so we're happy if we can avoid that.
* gsK: Move children handling to GskContainerNodeBenjamin Otte2016-12-207-346/+130
|
* gsk: Remove GskRenderNode::parentBenjamin Otte2016-12-204-119/+3
| | | | ... and all related APIs.
* gsk: Remove world matrix supportBenjamin Otte2016-12-205-108/+17
| | | | Use the real transform and compute it manually.
* gsk: Remove gsk_render_node_set_bounds()Benjamin Otte2016-12-204-57/+77
| | | | | | | gsk_render_node_get_bounds() still exists and is computed via vfunc call: - containers dynamically compute the bounds from their children - surface and texture nodes get bounds passed on construction
* gsk: Remove gsk_render_node_get_size()Benjamin Otte2016-12-203-37/+3
| | | | | | | | | | In the brave new world of refactored render nodes, this function doesn't really make any sense anymore. We could turn it into a vfunc, but I don't think it's useful. Especially because even in the brave old world, this function was causing a vastl overallocation of nodes when the GL renderer needed render targets.
* gsk: Add GskRenderNodeClass.make_immutable()Benjamin Otte2016-12-203-12/+32
|
* gsk: Remove gsk_render_node_set_opaque()Benjamin Otte2016-12-206-63/+8
| | | | | | | If we ever feel, we need this function again, we can readd it later. But nobody is using it other than for overriding opactiy. And you can just override opacity directly if you care.
* gsk: Add custom structs to RenderNode subclassesBenjamin Otte2016-12-203-19/+46
| | | | | So now we don't need to keep a texture pointer and a surface pointer and so on in the base struct.
* gsk: Add GskRenderNodeClass.finalize()Benjamin Otte2016-12-203-5/+27
|
* gsk: Add gsk_container_node_new()Benjamin Otte2016-12-204-26/+27
| | | | | It replaces gsk_renderer_create_render_node() which was doing the eact same thing, only taking an unused extra argument.
* gsk: Introduce GskRenderNodeClassBenjamin Otte2016-12-204-20/+41
| | | | This is modeled after GtkCssValueClass. So far it doesn't do anything.
* gsk: Split render node subclasses out into their own fileBenjamin Otte2016-12-203-168/+197
|
* gsk: Remove gsk_render_node_is_surface/texture()Benjamin Otte2016-12-205-95/+94
| | | | Use gsk_render_node_get_node_type() instead.
* gsk: Remove unneeded children modifiersBenjamin Otte2016-12-202-302/+6
| | | | | | | Creating render nodes is fire-and-forget, so all one should do is create a container, append, append, append and then send it off to the renderer. So there's no need to replace, insert between or anything else.
* gsk: Add gsk_cairo_node_new()Benjamin Otte2016-12-206-15/+45
| | | | | Split off Cairo drawn content nodes and require you to allocate them using this new function.
* gsk: Add gsk_texture_node_new()Benjamin Otte2016-12-206-22/+28
| | | | Start the transition into the different node types.
* gsk: Add GskRenderNodeTypeBenjamin Otte2016-12-205-5/+52
| | | | For now, this is unused.
* gsk: Remove GskRenderNodeIterBenjamin Otte2016-12-208-336/+34
|
* gsk: Make GskRenderNode a boxed typeBenjamin Otte2016-12-203-177/+17
|
* gsk: Remove custom GValue API for GskRenderNodeBenjamin Otte2016-12-202-119/+0
|
* gsk: Remove GskRenderNode::hiddenBenjamin Otte2016-12-206-59/+0
| | | | If you want to hide something, don't render it.
* gsk: Remove RenderNode::anchor-pointBenjamin Otte2016-12-203-28/+0
|
* Use the new definesMatthias Clasen2016-12-091-3/+5
| | | | It is no longer GDK_WINDOWING_VULKAN.
* gsk: Improve GSK_RENDERER env var handlingBenjamin Otte2016-12-091-12/+38
| | | | | | | | | - Recognize "gl" as well as "opengl" for the GL renderer - GSK_RENDERER=help now works - g_warning() for an unrecognized renderer (typo detection!) - g_print() the actual renderer that is used (and error messages when selecting) when a GSK_RENDERER is given, so you'll notice if your renderer isn't taken.
* vulkan: Implement texture cachingBenjamin Otte2016-12-093-9/+83
| | | | And with this change, the GPU looks bored again.
* vulkan: Don't create more than one render objectBenjamin Otte2016-12-091-20/+4
| | | | | | | | | | | | | | | By creating unlimited render objects, we would never wait on the GPU. This would mean that if the GPU was the bottleneck, we would fill its queue with render commands faster than it could process them. And because the nvidia binary driver and my code work surprisingly well and bugfree, this lead to exhaustion of RAM. I had 50GB of swap configured and my hard disk was quicker as swap storage than my GPU was at processing the commands, so stuff still filled up. At that point my computer became rather unresponsive and I decided to reboot it, so I that could write this patch.
* vulkan: Don't limit number of descriptor setsBenjamin Otte2016-12-091-4/+31
| | | | | If we need more than we have reserved as maximum, recreate the descriptor pool with a higher maximum.
* vulkan: Add more node operationsBenjamin Otte2016-12-091-2/+67
| | | | | | Add SURFACE and TEXTURE operations. This way, we actually render more than one node every frame because not everything is a fallback node anymore that gets composited with its children into a cairo surface.
* vulkan: Push the correct matrix when drawingBenjamin Otte2016-12-093-12/+20
| | | | | | Instead of pushing the root matrix, push the world matrix for the current node. That way, the bounds we emit as vertices are actually properly transformed.
* vulkan: Enable alpha blendingBenjamin Otte2016-12-092-5/+14
| | | | We will need that once we actually composite stuff.
* vulkan: Redo descriptor set handlingBenjamin Otte2016-12-094-52/+145
| | | | | | | | | First, we collect all the info about descriptor sets into a hash table, then we use its size to determine the amount of sets and allocate those before we finally go ahead and use the hash table's contents to initialize the descriptor sets. And then we're ready to render.
* vulkan: Move remaining structs to VulkanRender objectBenjamin Otte2016-12-093-109/+94
| | | | It now gets to maintain things.
* vulkan: Create framebuffers from GskVulkanRender objectBenjamin Otte2016-12-093-80/+98
| | | | | Also create them on-demand, as they need to be created per-image and per-framebuffer, so we don't want to create loads of them.
* vulkan: Turn swapchain image targets into GskVulkanImagesBenjamin Otte2016-12-093-44/+65
| | | | | This gives us proper refcounting here, too. And there's no longer a difference between the different types of images.
* vulkan: Store width/height of GskVulkanImageBenjamin Otte2016-12-092-0/+18
| | | | This is to enable lazy framebuffer creation later.
* vulkan: Turn GskVulkanImage into a GObjectBenjamin Otte2016-12-093-7/+25
| | | | This way, we can do real refcounting on them.
* vulkan: Hook up image upload mechanism to env variablesBenjamin Otte2016-12-092-18/+4
| | | | | | Instead of having to decie at compile-time, check if GSK_RENDERING=staging-image was given, and if so, select the staging image upload mode.