Commit Graph

48579 Commits

Author SHA1 Message Date
Emmanuele Bassi
bf09ce93c8 gsk: Make GskBlendMode enumeration public 2016-10-18 11:49:07 +01:00
Emmanuele Bassi
638297a22e gsk: Allow sampling between parent and child nodes 2016-10-18 11:49:07 +01:00
Emmanuele Bassi
7416aa762f gsk: Group render state attributes 2016-10-18 11:49:06 +01:00
Emmanuele Bassi
b8a92dfa0e gsk: Turn GskRenderNode into a pure GTypeInstance
Using GObject as the base type for a transient tree may prove to be too
intensive, especially when creating a lot of node instances. Since we
don't need properties or signals, and we don't need complex destruction
semantics, we can use GTypeInstance directly as the base type for
GskRenderNode.
2016-10-18 11:49:06 +01:00
Emmanuele Bassi
b997f4c575 gtk: Use GskRenderNode to render widgets
We need a virtual function to retrieve the GskRenderNode for each
widget, which is supposed to attach its own children's GskRenderNodes.
Additionally, we want to maintain the existing GtkWidget::draw mechanism
for widgets that do not implement get_render_node() — as well as widgets
that have handlers connected to the ::draw signal.
2016-10-18 11:49:06 +01:00
Emmanuele Bassi
258af60c18 gtk: Add a GskRenderer to GtkWindow
Each top-level should have its own GskRenderer, to be used when drawing
the render node tree.
2016-10-18 11:49:06 +01:00
Emmanuele Bassi
074c77e7ac gsk: Rework GskRenderer and GskRenderNode semantics
This commit changes the way GskRenderer and GskRenderNode interact and
are meant to be used.

GskRenderNode should represent a transient tree of rendering nodes,
which are submitted to the GskRenderer at render time; this allows the
renderer to take ownership of the render tree. Once the toolkit and
application code have finished assembling it, the render tree ownership
is transferred to the renderer.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
d99f91f5fd gsk: Flush the GL render items cache
Whenever the render tree changes we want to drop the RenderItem arrays,
as each item contains a pointer to the GskRenderNode which becomes
dangling once the root node changed.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
635fd7026a gsk: Add GskRenderer::clear_tree
We need a way to clear eventual caches inside GskRenderer subclasses if
the root node has changed.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
9d3ca22b4c gsk: Port GskGLRenderer to GLES
Use the appropriate API and shaders if the GdkGLContext was created for
OpenGL ES instead of OpenGL.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
5909ce6897 gsk: Use surface-to-texture utility function
Now that we have it.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
eb9c0920ab gsk: Rename shaders for OpenGL 2016-10-18 11:29:34 +01:00
Emmanuele Bassi
b425cff689 gdk: Add utility for uploading Cairo surfaces to GL
The surface-to-GL upload logic has become more complicated with the
addition of the GLES code paths; it's more logical to have a public
utility function that can be called from GDK users, instead of copy
pasting the whole thing multiple times.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
0e2a87a4bc build: Add GSK deps to GTK 2016-10-18 11:29:34 +01:00
Emmanuele Bassi
7afdd3fdb5 Initial implementation of GSK rendering pipeline
GSK is conceptually split into two scene graphs:

 * a simple rendering tree of operations
 * a complex set of logical layers

The latter is built on the former, and adds convenience and high level
API for application developers.

The lower layer, though, is what gets transformed into the rendering
pipeline, as it's simple and thus can be transformed into appropriate
rendering commands with minimal state changes.

The lower layer is also suitable for reuse from more complex higher
layers, like the CSS machinery in GTK, without necessarily port those
layers to the GSK high level API.

This lower layer is based on GskRenderNode instances, which represent
the tree of rendering operations; and a GskRenderer instance, which
takes the render nodes and submits them (after potentially reordering
and transforming them to a more appropriate representation) to the
underlying graphic system.
2016-10-18 11:29:34 +01:00
Emmanuele Bassi
d519e4aafe gsk: Initial commit / build environment 2016-10-18 11:29:34 +01:00
Emmanuele Bassi
3fb413beea label: Avoid shadowing variables 2016-10-18 11:29:34 +01:00
Piotr Drąg
ba299d9ba4 Update POTFILES.in 2016-10-18 03:50:55 +02:00
Matthias Clasen
dfb45f4396 Add a test for cursor names
This tests both that all standard cusor yield a cursor, and that
unknown cursor names yield NULL.
2016-10-17 19:11:32 -04:00
Matthias Clasen
95c7de70c7 x11: Add the same message as the wayland backend has
This seems prudent, if we make noise about missing cursors
on Wayland, we should do the same on X11.
2016-10-17 19:11:32 -04:00
Matthias Clasen
a0140cad15 Reduce a warning to a message
The warning interferes with having a testcase to check this behavior,
so reduce this to a message.
2016-10-17 19:11:32 -04:00
Timm Bäder
4384628afb Remove GtkAction 2016-10-18 00:34:41 +02:00
Timm Bäder
ead36206a3 Remove GtkActionGroup 2016-10-18 00:34:41 +02:00
Timm Bäder
1bb3501ef7 Fix unittests 2016-10-18 00:34:41 +02:00
Timm Bäder
a864f4d474 widget: Not all toplevels are also containers 2016-10-18 00:34:41 +02:00
Timm Bäder
8245374f9c tests/testylecontext: Don't double-free widgetpath 2016-10-18 00:34:41 +02:00
Timm Bäder
f7d22fec7b Remove GtkRecentAction 2016-10-18 00:34:41 +02:00
Timm Bäder
d963ede668 Remove GtkUIManager 2016-10-18 00:34:41 +02:00
Timm Bäder
62b2949fa2 Remove GtkActivatable 2016-10-18 00:34:41 +02:00
Timm Bäder
a8a2588cab recentchooser: Stop implementing GtkActivatable 2016-10-18 00:34:41 +02:00
Timm Bäder
d0c087be37 recentchooserdefault: Stop implementing GtkActivatable 2016-10-18 00:34:40 +02:00
Timm Bäder
0c7d091651 toolitem: Stop implementing GtkActivatable 2016-10-18 00:34:40 +02:00
Timm Bäder
41f5d3b14c Remove GtkToggleAction 2016-10-18 00:34:40 +02:00
Timm Bäder
53ab8eb46d Remove GtkRadioAction 2016-10-18 00:34:40 +02:00
Timm Bäder
bc7206d70f Remove GtkStock 2016-10-18 00:29:20 +02:00
Timm Bäder
cf56decbb4 infobar: Stop looking at stock items
GtkButton doesn't have a use-stock property anymore anyway.
2016-10-18 00:29:20 +02:00
Timm Bäder
301e1a4d55 window: Remove decoration-button-layout style property
GtkSettings has a gtk-decoration-layout property for this.
2016-10-18 00:29:20 +02:00
Timm Bäder
7823406db4 window: Remove decoration-resize-handle style property 2016-10-18 00:29:20 +02:00
Timm Bäder
4bf1e4ebe6 toolbar: Remove max-child-expand child property 2016-10-18 00:29:20 +02:00
Timm Bäder
dece018994 Remove GtkAlignment 2016-10-18 00:29:19 +02:00
Timm Bäder
e0d50233f6 gtkapplication: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
700300eb81 treeview: Remove deprecated adjustment API 2016-10-18 00:29:19 +02:00
Timm Bäder
d5e3897052 combobox: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
3ad624d6c0 adjustment: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
b65908da3e menutoolbutton: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
3573cdc0cd popover: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
d9a3afb059 range: Remove unused class struct members 2016-10-18 00:29:19 +02:00
Timm Bäder
2a07ee2dac filechooserbutton: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
1b2f291c1d messagedialog: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
be2f19663b button: Add icon-name property
Remove the old-style button construction that allowed to show both an
icon and a label and change visibility based on a GtkSetting.
2016-10-18 00:29:19 +02:00