Commit Graph

43942 Commits

Author SHA1 Message Date
Alexander Larsson
eafedfbaf8 gdkwindow: Avoid list allocation and object refs during repaint
There is no need to ref the windows we're ignoring, so collect and ref
only the affected child windows. Also, use a on-stack array rather
than allocating a linked list.

Also, we don't need to ref during the event emissions too, as we
already hold a ref.

https://bugzilla.gnome.org/show_bug.cgi?id=754687
2015-09-14 11:01:13 +02:00
Pedro Albuquerque
d9c0706305 Updated Portuguese translation 2015-09-14 07:31:34 +00:00
Piotr Drąg
136e3877b9 Updated Polish translation 2015-09-14 09:30:30 +02:00
Matthias Clasen
b9322433d3 Update all ui files again
Replace translatable="1" by translatable="yes" so
xgettext stays happy and extracts the strings.
2015-09-13 23:26:16 -04:00
Matthias Clasen
fda5b4ce4c builder-tool: Don't simplify translatable="yes"
It turns out that xgettext does not understand translatable="1",
so don't make gtk-builder-tool produce this, even though
GtkBuilder can parse it just fine.

https://bugzilla.gnome.org/show_bug.cgi?id=754928
2015-09-13 23:24:05 -04:00
Matthias Clasen
0db331d244 file chooser: make rows with popovers visible
Without this, the popovers are just dangling in the middle of
nowhere.

https://bugzilla.gnome.org/show_bug.cgi?id=754411
2015-09-13 22:53:42 -04:00
Christian Hergert
6f10fa1f40 pixelcache: squash warnings introduced by previous commits 2015-09-13 13:41:19 -07:00
Christian Hergert
a3605bc557 textview: give pixelcache access to style context
This changes textview to share the style context with the pixelcache.
Doing so allows pixel cache to optimize the surface creation and use
a CAIRO_CONTENT_COLOR instead of CAIRO_CONTENT_COLOR_ALPHA when
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=754658
2015-09-13 13:41:19 -07:00
Christian Hergert
7c1ce9f3ad viewport: share style context with pixelcache
This allows the pixel cache to opportunistically use CAIRO_CONTENT_COLOR
instead of CAIRO_CONTENT_COLOR_ALPHA during surface creation.

https://bugzilla.gnome.org/show_bug.cgi?id=754658
2015-09-13 13:41:19 -07:00
Christian Hergert
d7eb90779f pixelcache: use GtkStyleContext to determine cairo_content_t for surface
We can take a fast path if the background for a widget is opaque by using
a CAIRO_CONTENT_COLOR instead of a CAIRO_CONTENT_COLOR_ALPHA surface. Most
blit'ing backends have a fast path for this, including Pixman and Quartz.

https://bugzilla.gnome.org/show_bug.cgi?id=754658
2015-09-13 13:41:19 -07:00
Christian Hergert
c1691a4964 stylecontext: add opaque background helper
This new private API, _gtk_style_context_is_background_opaque(), is meant to
be used by internal Gtk+ wigets to optimize fast paths for cases where
applicable. One such use would be to use a CAIRO_CONTENT_COLOR surface
instead of CAIRO_CONTENT_COLOR_ALPHA.

https://bugzilla.gnome.org/show_bug.cgi?id=754658
2015-09-13 13:41:19 -07:00
Matthias Clasen
b64a0b9233 wayland: Avoid a crash with GtkGLArea
We must not call gdk_wayland_window_attach_image when
using GL for drawing, this leads to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=754770
2015-09-13 15:56:30 -04:00
Alexander Larsson
ea294fd92c gdkwindow: Store children list nodes in GdkWindow structure
This avoids a bunch of allocations, and additionally it has better
cache behaviour, as we don't follow pointers to the separate GList
node memory areas during traversal.

From Christian Hergert:

  This machine is a Retina mac book pro so I've been working on getting
  GtkTextView (GtkPixelCache) up to our performance level on
  X11/Wayland. I'm seeing a jump from about 43 FPS to about 50 FPS.

https://bugzilla.gnome.org/show_bug.cgi?id=754687
2015-09-13 21:48:55 +02:00
Matthias Clasen
0175cd8ae7 places sidebar: keep open variants sensitive
Add a separate action for "Open in Tab" and "Open in new window"
so we can keep them enabled when we disable "Open" for the selected
row.

https://bugzilla.gnome.org/show_bug.cgi?id=754410
2015-09-13 12:44:17 -04:00
Dušan Kazik
2b3a116ef7 Updated Slovak translation 2015-09-13 08:58:00 +00:00
Dušan Kazik
4bcc49c9ef Updated Slovak translation 2015-09-13 08:50:28 +00:00
Matthias Clasen
8a540ea0d0 Drop GtkWidgetAuxInfo
Merge it into GtkWidgetPrivate. In my measurements, about half
of all widgets have a non-default auxinfo struct, and we use this
information in size allocation, so it is nice to avoid the gdata
overhead.
2015-09-13 00:12:04 -04:00
Matthias Clasen
b355b07c10 Move font map to qdata
This is very rarely used, lets not reserve space for it
in every widget.
2015-09-12 21:11:54 -04:00
Matthias Clasen
70a2281959 Move font options to gdata
This is very rarely used, lets not reserve space for it in
every widget.
2015-09-12 21:11:54 -04:00
Matthias Clasen
b166582835 Move action muxer to gdata
Most widgets don't have their own, and we don't access them
very frequently.
2015-09-12 21:11:54 -04:00
Matthias Clasen
e4de412fd3 Move widget paths to gdata
We only use widget paths for a few widgets nowadays (notebook,
treeview, pathbar, combobox), so we can save some space by
not having this field in GtkWidgetPrivate.
2015-09-12 21:11:54 -04:00
Benjamin Otte
bf95c8462b combobox: Stop using old styling code
Instead of get_path_for_child() use CSS nodes.
2015-09-13 01:54:03 +02:00
Matthias Clasen
75439cafb6 Move template support to qdata
The hash table is only accessed at creation and destruction time,
and many widgets don't use templates at all, so no need to have
this permanently occupying space.
2015-09-12 19:22:17 -04:00
Matthias Clasen
d8e1f1edf5 Pack GtkWidgetPrivate a bit better
This makes it shrink from 240 to 232 bytes.
2015-09-12 18:54:51 -04:00
Matthias Clasen
27db410fd5 Use NULL instead of g_direct_equal
GHashTable has built-in support for pointer comparison.
2015-09-12 18:48:17 -04:00
Matthias Clasen
f1414a125f Move GtkWidgetAuxInfo struct to private headers
There's no API returning such a struct, it is entirely internal.
Therefore, don't expose it in public headers.
2015-09-12 18:36:32 -04:00
Benjamin Otte
51a1bc21af Revert "Avoid type checking overhead for resize-mode"
This reverts commit 3eacfa88f2.

Apart from the patch not being correct, we don't want to expose private
structures in header files if we can avoid it.
And this type-checking overhead is not an optimization that is even
measurable.

https://bugzilla.gnome.org/show_bug.cgi?id=754932
2015-09-12 21:27:24 +02:00
Piotr Drąg
286e8eec3a Updated POTFILES.in 2015-09-12 19:42:41 +02:00
Matthias Clasen
29c799a1e7 Use g_object_get_qdata instead of g_object_get_data
This is less expensive.
2015-09-12 12:50:39 -04:00
Matthias Clasen
66f0bdee0a Intern all signal names beforehand
This avoids pointless allocations
2015-09-12 12:50:39 -04:00
Matthias Clasen
c8dcb690aa css node: Avoid a duplicate type check 2015-09-12 12:50:39 -04:00
Matthias Clasen
2a6a841db1 widget path: No need for atomic refcounting
We are all in one thread, anyway.
2015-09-12 12:50:39 -04:00
Matthias Clasen
9546ce798b css value: No need for atomic refcounting
We are all in one thread anyway.
2015-09-12 12:50:38 -04:00
Matthias Clasen
fe1e2cbfad css section: No need for atomic refcounting
We are all in one thread, anyway.
2015-09-12 12:50:38 -04:00
Matthias Clasen
3eacfa88f2 Avoid type checking overhead for resize-mode 2015-09-12 12:50:38 -04:00
Matthias Clasen
95cf550e15 window: Avoid unnecessary detours
Don't call gtk_widget_get_screen on a window - it only ends up
calling gtk_window_get_screen in the end, anyway.
2015-09-12 12:50:38 -04:00
Matthias Clasen
caa0ee3d25 Remove type check from gtk_widget_get_request_mode 2015-09-12 12:50:38 -04:00
Matthias Clasen
09e4f753fd widget: Move _gtk_widget_peek_request_cache to private.h 2015-09-12 12:50:38 -04:00
Matthias Clasen
20c49b8837 css node declaration: Avoid optional out parameters
Always pass a pos to find_class, and avoid the if.
2015-09-12 12:50:37 -04:00
Matthias Clasen
29505af07f css node declaration: Fix a typo 2015-09-12 12:50:37 -04:00
Matthias Clasen
bbeec3608f css section: Replace g_return by gtk_internal_return 2015-09-12 11:29:46 -04:00
Matthias Clasen
a9b80a6391 style cascade: Replace g_return by gtk_internal_return 2015-09-12 11:29:37 -04:00
Matthias Clasen
60ccda0597 css lookup: Replace g_return by gtk_internal return
These functions are called in an inner loop in
gtk_css_style_provider_lookup.
2015-09-12 11:28:39 -04:00
Matthias Clasen
83d68ea107 css selector: Use a builtin to count bits 2015-09-12 11:24:43 -04:00
Matthias Clasen
a831f1fb11 css matcher: Avoid a redundant call
The sole caller passes an interned string, so we don't
need to call g_intern_string again.
2015-09-12 11:24:42 -04:00
Matthias Clasen
11d3582333 css selector: Take advantage of interned strings
We know these strings are interned, no need to use strcmp or
g_str_hash for hem.
2015-09-12 11:24:42 -04:00
Matthias Clasen
4654fa6efe bitmask: Trivial formatting fix 2015-09-12 11:24:37 -04:00
Matthias Clasen
c86f0b1b23 bitmask: Optimize no-op resizes
Statistics for the gtk3-demo listbox example show that the
vast majority of calls to _gtk_allocated_bitmask_resize go
from a size of 2 to 2. Don't needlessly call realloc() in
this case.
2015-09-12 11:24:37 -04:00
Matthias Clasen
0957ba5220 bitmask: Optimize intersect
The functions was written in a way that would possibly
resize the mask twice, which is not necessary.
2015-09-12 11:24:37 -04:00
Matthias Clasen
3a503b7ba1 widget-factory: Simplify the ui file 2015-09-12 11:24:37 -04:00