summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wip: static valuesmatthiasc/css-valuesMatthias Clasen2020-01-1019-136/+237
| | | | | | | Determine whether a css value is 'static' at creation time. Static values don't need to have compute() called, since their value is always the same, so we can just ref them.
* Remove GtkCssRgbaValueTimm Bäder2020-01-1019-70/+102
| | | | | | The differenciation between a literal color value and an RGBA value caused problems in various situations. Just treat the two the same but don't allow access to the rgba value of a non-literal color value.
* Fix up css parser testsMatthias Clasen2020-01-108-324/+324
| | | | | | | Some css parser tests were relying on the parser preserving some units. Update them. The numbers look uglier this way, but they are the same numbers the css machinery was using anyway.
* css: Do more computation ahead of timeMatthias Clasen2020-01-101-0/+20
| | | | | | The computation we do for angles and times does not depend on the context, and can be done at creation time.
* update css parser test resultsMatthias Clasen2020-01-104-88/+88
| | | | We now print colors differently in some places.
* css: Make the common font size singletonsMatthias Clasen2020-01-101-0/+6
|
* dump css value statsMatthias Clasen2020-01-101-0/+45
|
* css: Simplify compute for font variationsMatthias Clasen2020-01-101-23/+1
| | | | | | Just like font features, font variations are stored as a hash table mapping strings to pure number values, which never change during compute.
* css: Simplify compute for font featuresMatthias Clasen2020-01-101-23/+1
| | | | | | | | Font features consist of a hash table of number values, which will never change during compute, so there is no point in recreating a new value with a copy of the hash table, constaining the same string->number mapping.
* Add opaque black singletonMatthias Clasen2020-01-101-0/+6
|
* dimension: Improve the coverage of singletonsMatthias Clasen2020-01-101-11/+23
| | | | | The values 5px, 6px, 7px, 0.15s, 0.2s and 0.3s all show up in high numbers.
* cssshadowvalue: Treat one shadow like multiple shadowsTimm Bäder2020-01-103-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we create a GtkCssShadowsValue for just one shadow, just return that show value instead and allow calls on GtkCssShadowsValue API on one shadow. That saves us around 480 GtkCssShadowsValue instances in the widget factory. css value stats before: GtkCssColorValue: 1452 GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 882 GtkCssShadowsValue: 584 GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssArrayValue: 143 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2765 SUM: 7872 and after: GtkCssShadowsValue: 107 GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssArrayValue: 143 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2764 GtkCssColorValue: 1452 GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 883 SUM: 7395 7872 to 7395 is a 477 reduction (6.0%)
* csssshadwovalue: Remove unused function prototypeTimm Bäder2020-01-101-3/+0
|
* cssnumbervalue: Add early-outs to transition codeTimm Bäder2020-01-101-0/+9
| | | | | | | | | we don't need to do the calculation at all if the progress is 0 or 1 anyway. We also sometimes transition from 0 to 0 etc., so we can short-circuit that as well by doing the fast pointer-equality check and relying on the singletons.
* csscornervalue: Accept other values if x == yTimm Bäder2020-01-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most corners are square, so x == y. In that case, just accept either of them. This makes the corner value unnecessary. In fact none of the corner values in the widget-factory are needed, so this spares us around 500 corner value allocations. css value stats before: GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssCornerValue: 556 GtkCssArrayValue: 143 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2765 GtkCssColorValue: 1452 GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 882 GtkCssShadowsValue: 584 SUM: 8428 and after: GtkCssColorValue: 1452 GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 882 GtkCssShadowsValue: 584 GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssArrayValue: 143 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2765 SUM: 7872 8428 to 7872 is a 556 reduction (6.5%)
* cssarrayvalue: Reserve 2 pointers when parsing array valuesTimm Bäder2020-01-101-1/+1
| | | | given that we parse an array, chances are we're gonna see 2 values.
* cssarrayvalue: Loosen the definition of "array value"Timm Bäder2020-01-104-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just allow calling _get_nth() and _get_n_values() on every kind of css value. This way we can allow all values in places where only array values would be allowed before. This spares us around 1000 array values in the widget factory. css value stats before: GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 882 GtkCssShadowsValue: 584 GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssCornerValue: 556 GtkCssArrayValue: 1130 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2765 GtkCssColorValue: 1452 SUM: 9415 and after: GtkCssBgSizeValue: 23 GtkCssIdentValue: 25 GtkCssPositionValue: 81 GtkCssCornerValue: 556 GtkCssArrayValue: 143 GtkCssStringValue: 33 GtkCssPaletteValue: 29 GtkCssImageValue: 2765 GtkCssColorValue: 1452 GtkCssFilterValue: 3 GtkCssRgbaValue: 1092 GtkCssShadowValue: 708 GtkCssEaseValue: 33 GtkCssBorderValue: 2 GtkCssTransformValue: 11 GtkCssDimensionValue: 882 GtkCssShadowsValue: 584 SUM: 8428 9415 to 8428 is a 987 reduction (10.4%)
* cssvalue: Add type names for all classesTimm Bäder2020-01-1026-0/+47
|
* csscolorvalue: Compute alpha/shade/mix of color literals directlyTimm Bäder2020-01-101-10/+69
| | | | | The values of these are never gonna change so we can as well create literal color values from the resulting colors instead.
* csscolorvalue: Don't resolve literal color valuesTimm Bäder2020-01-101-7/+18
|
* Update Slovak translationDušan Kazik2020-01-101-1944/+3877
|
* rename CODE-OWNERS to CODEOWNERSTimm Bäder2020-01-082-1/+1
| | | | gitlab reads the new filename but not the old one.
* Merge branch 'fixed-fixed' into 'master'Emmanuele Bassi2020-01-081-1/+2
|\ | | | | | | | | fixed layout: Actually set child transforms See merge request GNOME/gtk!1292
| * fixed layout: Actually set child transformsMatthias Clasen2020-01-081-1/+2
| | | | | | | | | | | | The code was unintentionally appending to the existing child transform, leading to ever-moving children when you call gtk_fixed_put.
* | Merge branch 'master-fix-set-functions' into 'master'Alex Samorukov2020-01-081-1/+0
|\ \ | | | | | | | | | | | | quartz: impl_class->set_functions listed twice in the object See merge request GNOME/gtk!1283
| * | impl_class->set_functions listed twice in the objectAlex Samorukov2020-01-081-1/+0
|/ /
* | Merge branch 'master-eventloop-fix' into 'master'Alex Samorukov2020-01-081-3/+2
|\ \ | | | | | | | | | | | | Move `[NSApplication sharedApplication]` after event loop init to avoid window focus issues (closes #2342). See merge request GNOME/gtk!1286
| * | move [NSApplication sharedApplication] after _gdk_quartz_events_init() to ↵Alex Samorukov2020-01-081-3/+2
|/ / | | | | | | | | | | avoid initialization issues (cherry picked from commit 46c2451c5a3cd42aa5a94935bfc850a484288ff3)
* | Merge branch 'check-for-sincosf' into 'master'Timm Bäder2020-01-082-1/+10
|\ \ | |/ |/| | | | | gsk/gsktransform.c: Fix building on non-GCC See merge request GNOME/gtk!1291
| * build: Check for sincosf()Chun-wei Fan2020-01-082-1/+10
|/ | | | | | | sincosf() is really a GCC-specific function that may more may not be supported on non-GCC compilers, so we want to check for it, otherwise we use a fallback implementation, not unlike the one in demos/gtk-demo/gtkgears.c.
* gl renderer: Handle repeat nodes with invisible childrenTimm Bäder2020-01-071-2/+12
| | | | | We can handle this pretty easily by normally drawing the other (visible) child node, if any.
* testsuite: Add a testcase for blend nodes with invisible childrenTimm Bäder2020-01-073-0/+26
|
* sizerequest: Remove _gtk_widget_get_preferred_size_and_baselineTimm Bäder2020-01-072-64/+27
| | | | Private and unused function.
* transform: Properly compare scale transformsTimm Bäder2020-01-071-3/+3
| | | | | If the epsilon we use there is too much, we can run into rendering errors because the GPU will use the actual scale value.
* rendernodepaintable: ceil() bounds for intrinsic sizeTimm Bäder2020-01-071-2/+2
| | | | | Otherweise we floor() implicitly when casting to int, resulting in slight scaling later.
* label: Fix assumptions regaring linkTimm Bäder2020-01-071-7/+8
|
* gltextureatlas: Packing must succeed hereTimm Bäder2020-01-071-1/+2
|
* Window: Avoid some redundant assignmentsTimm Bäder2020-01-071-15/+16
|
* colorswatch: Avoid redundant assignmentTimm Bäder2020-01-071-1/+0
|
* transform: Scale+translate bounds directylTimm Bäder2020-01-071-8/+8
| | | | Make these two code paths look the same.
* widget: Use cssnode api to get the filter valueTimm Bäder2020-01-071-2/+3
| | | | | it's confusing that we use GtkStyleContext here while we use the CssNode directly elsewhere.
* transform: Compare class before ->nextTimm Bäder2020-01-071-2/+2
|
* snapshot: Only normalize rectangle if we have toTimm Bäder2020-01-071-2/+3
| | | | We can even replace the comment this way.
* bin: Move vfunc implementations before class_initTimm Bäder2020-01-071-37/+20
| | | | And avoid every single function prototype.
* bin: Avoid some type checksTimm Bäder2020-01-071-2/+3
|
* gl renderer: Sprinkle some const aroundTimm Bäder2020-01-071-2/+2
|
* text: Reset cursor opacity when unmappingTimm Bäder2020-01-071-0/+2
| | | | Otherwise we might get mapped again with a half-transparent cursor.
* scrolledwindow: Don't snapshot junction if we use indicatorsTimm Bäder2020-01-071-1/+2
| | | | | | The junction doesn't make sense when we use indicators, since the scrollbars overlap anyway. Not snappshotting it anymore has no visual effect since it's being drawn below the scrollbars anyway.
* cssimagelinear: Don't call get_start_end if !repeatingTimm Bäder2020-01-071-39/+42
| | | | This makes it clear that the !repeating case is easier.
* cssimagelinear: Avoid computing the length if we know itTimm Bäder2020-01-071-16/+28
| | | | | We handlet the common easy cases manually anyway, so don't bother sqrt()ing the x/y coords in those cases.