Commit Graph

17 Commits

Author SHA1 Message Date
Matthias Clasen
2ff3e3d1e4 gtk: Improve struct packing in places
Plug some holes in our structs by rearranging
a few fields. This is was done looking at
pahole output.
2020-07-25 11:57:37 -04:00
Timm Bäder
1b10020b6e css: Make GtkStyleAnimation and subclasses non-objects
Making them GObjects is unnecessary. This enables further optimizations
down the road. The only place we use them in is gtkcssanimatedstyle.c
after all.
2020-05-10 08:44:20 +02:00
Timm Bäder
06460ea50c css: Drop a few dynamic type checks
We hit these code paths a lot
2020-05-10 08:44:20 +02:00
Timm Bäder
e12c9de5df csstransiton: Save finished state
Once a transtion is finished it can't change to unfinished again, so we
don't have to consult the progress tracker all the time.
2020-05-10 08:44:20 +02:00
Timm Bäder
75a48aed0b cssanimatedstyle: Make set_animated_value transfer-full 2019-09-09 17:36:24 +02:00
Matt Watson
a970ba5ef6 animatedstyle: don't share styleanimations
Because of our port of css animation and css transition to
progress tracker, we should not think of animated styles as
immutable objects that can map any timestamp to css values.
Rather, timestamps can correspond to different values depending
on the value of GTK_SLOWDOWN over the course of the animation.

To keep animated styles and style animations totally immutable,
we will not share styleanimations between animatedstyles, and
make a new copy of a styleanimation for each timestamp.
2016-04-08 16:09:30 -07:00
Matt Watson
50e057e025 csstransition: port to progress tracker 2016-04-08 16:09:30 -07:00
Benjamin Otte
4168e0385e cssstyle: Split into GtkCssStyle and GtkCssAnimatedStyle
GtkCssStyle is the base class to be used for all types of styles that do
exist.

GtkCssAnimatedStyle is the only implementation so far, that is exactly a
copy/paste of the old GtkCssStyle code.
2015-01-07 14:26:46 +01:00
Benjamin Otte
572f46067f cssstyle: Rename GtkCssComputedValues => GtkCssStyle
This is literally just renaming of the object (and the associated source
files). No other changes are in there.
2015-01-07 14:26:46 +01:00
Benjamin Otte
55ade04e11 animations: Don't set animated values for finished transitions
Otherwise, that value will never get reset and remain frozen in time.
This is problematic for example when the value is inherited and the
parent changes the value.
2012-10-06 15:55:31 -04:00
Benjamin Otte
9138fc11cf cssanimation: Don't store the end value in a CSS transition
Instead, query the intrinsic value at runtime.
2012-10-01 13:09:49 +02:00
Benjamin Otte
bf19d89510 animation: Don't set the changed properties anymore
The code is not needed anymore. And it looked wrong, too, so I'm glad
it's gone.
2012-09-17 20:39:13 +02:00
Benjamin Otte
7248c19037 csscomputedvalues: Store animated values here
Actually use the GtkCssComputedValues to store the computed values here
instead of putting them into the GtkCssAnimatedValues separately.
2012-09-17 20:39:12 +02:00
Benjamin Otte
7224f897d6 animation: Add _gtk_style_animation_is_static()
This will be useful to not trigger updates all the time when nothing is
happening (ie due to animations being paused or due to them having
reached their final value).
2012-09-17 20:39:12 +02:00
Benjamin Otte
e3fc081c5d cssvalue: Pass property ID to transition function
This is to allow animating arrays properly. I'm not really thrilled
about this solution (we leak propertys into the values again...), but
it's the best I can come up with - I prefer it to having N different
array types...
2012-09-03 12:54:14 +02:00
Benjamin Otte
6fbd8b0003 computedvalues: Pass dependencies to set_value()
This simplifies the code.
2012-08-28 15:42:24 +02:00
Benjamin Otte
9c57b96f56 animation: Add CSS transition object
This is an implementation of GtkStyleAnimation for CSS transitions.

Again, this doesn't do anything but store the data needed to do the
transition.
2012-04-17 08:59:23 +02:00