Benjamin Otte
aef5f3b837
widget-factory: Add tests for loading color profiles
...
I figured out how to generate them, yay:
cmsHPROFILE lcms_profile;
cmsToneCurve *curve[3];
curve[0] = cmsBuildParametricToneCurve (NULL, 4, (double[5]) { 1.0, 0, 0, 0, 0 });
curve[1] = cmsBuildParametricToneCurve (NULL, 4, (double[5]) { 2.4, 255.0 / 15 / 1.055, 0.055 / 1.055, 0, 15./255 });
curve[2] = cmsBuildGamma (NULL, 2.4);
lcms_profile = cmsCreateRGBProfile (&(cmsCIExyY) {
0.3127, 0.3290, 1.0
},
&(cmsCIExyYTRIPLE) {
{ 0.6400, 0.3300, 1.0 },
{ 0.3000, 0.6000, 1.0 },
{ 0.1500, 0.0600, 1.0 }
},
curve);
cmsSaveProfileToFile (lcms_profile, "foo.icc");
cmsFreeToneCurveTriple (curve);
cmsCloseProfile (lcms_profile);
2022-05-10 09:10:25 -04:00
Benjamin Otte
6d8f12ae48
colorprofile: Implement a global transform cache
...
Speeds up things by a factor of 10x, so seems like a good idea.
The cache is never purges, we might want to fix that.
2022-05-10 09:10:25 -04:00
Benjamin Otte
46e7509cf7
memoryformat: Optimize more
...
Make the formats allow converting to an lcms-compatible format and
then use a cmsTransform to convert between them.
Note that mixing RGBA and non-RGBA formats doesn't seem to work, so we
force all our RGB-only formats to convert to a RGBA format.
2022-05-10 09:10:25 -04:00
Benjamin Otte
2b5cbf5369
memoryformat: Do some gdk_memory_convert() massaging
...
* Add name support to the formats
* Add profiler mark to gdk_memory_convert()
* Split up the different branches of conversion
* Use memcpy for straight copies
2022-05-10 09:10:25 -04:00
Matthias Clasen
73bed6adc3
gsk: Avoid cairo in icon upload
...
Use the new memory texture magic
2022-05-10 09:10:25 -04:00
Matthias Clasen
c8fce2c35d
tiff: Add color profile support
...
Apply an embedded icc profile when loading tiff
images, and save associated icc profile information
when saving tiff images.
2022-05-10 09:10:25 -04:00
Benjamin Otte
feb6721848
png: Handle color profiles
2022-05-10 09:10:24 -04:00
Matthias Clasen
cd13109f85
gdk: Take a profile in gdk_memory_texture_from_texture
...
This will let us do profile conversions at the
same time.
Update all callers.
2022-05-10 09:10:24 -04:00
Benjamin Otte
d79c7b14ff
gdk: Take a profile in gdk_texture_download_surface
...
This way, the resulting surface can contain the pixels
in the desired color profile.
2022-05-10 09:10:24 -04:00
Matthias Clasen
007631fe1b
gdk: Take a profile in gdk_texture_do_download
...
Allow specifying a color profile in addition to
a memory format when downloading.
2022-05-10 09:10:24 -04:00
Matthias Clasen
15cce98a31
memoryformat: Take a color profile when converting
2022-05-10 09:10:24 -04:00
Benjamin Otte
7aaaf65d6c
API: Add color profile get/set for cairo
...
Add a centralized place to attach color profiles to.
Nothing uses that information yet, but all the backends do set it.
2022-05-10 09:10:24 -04:00
Benjamin Otte
2c96391bd2
API: Add GdkSurface::color-profile
...
Unused so far, but there's a private setter for backends and a public
readable property for code.
2022-05-10 09:10:24 -04:00
Matthias Clasen
03ed9592a7
gtk-demo: Add a color profile demo
...
This is using test images from http://displaycal.net/ .
2022-05-10 09:10:24 -04:00
Benjamin Otte
85437edf3d
widget-factory: Add gradient rendering test
...
Test how GTK draws gradients, by adding an sRGB and a linear colorspace
gradient and draw one with CSS.
Have a look which one (if any) matches.
2022-05-10 09:10:24 -04:00
Benjamin Otte
dbc0574d2e
jpeg: Add color profile support
2022-05-10 09:10:24 -04:00
Benjamin Otte
5eda3eee87
API: Add gdk_memory_texture_new_with_color_profile()
...
A version of gdk_memory_texture_new() that allows passing a color
profile. The old version t assumes sRGB.
2022-05-10 09:10:24 -04:00
Benjamin Otte
4ac6fb72fc
API: Add a GdkTexture::color-profile property
...
Returns the associated color profile. For now, this is always sRGB.
2022-05-10 09:10:24 -04:00
Benjamin Otte
7cd6256add
API: Add GdkColorProfile
...
The code doesn't do anything yet, this is just the boilerplate.
2022-05-10 09:10:24 -04:00
Benjamin Otte
4dda8bfb58
Add mutter and lcms2-devel to the Fedora image
...
mutter will be needed to get a WM for the x11 testsuite.
lcms2 is needed for upcoming HDR work, so having it available in
varioius branches is neat.
2022-05-10 09:10:24 -04:00
Matthias Clasen
2e09436483
ci: Update dependencies for msys
...
Add libpng, libjpeg-turbo, libtiff and lcms2.
2022-05-08 10:32:55 -04:00
Matthias Clasen
b32262128c
Add an lcms2 subproject
...
Since lcms2 is using autotools, this uses the
experimental 'external project' module of meson,
and adds a minimal meson.build file to lcms2.
It seems to work.
2022-05-08 10:31:25 -04:00
Benjamin Otte
b867b425a0
cms: Add lcms to the build
2022-05-08 07:06:43 -04:00
Pawan Chitrakar
6be466b675
Update Nepali translation
...
(cherry picked from commit 5ae37c6d99 )
2022-05-08 08:44:59 +00:00
Matthias Clasen
9e6855cdb8
Merge branch 'matthiasc/for-main' into 'main'
...
printdialog: Handle nonexisting files better
See merge request GNOME/gtk!4702
2022-05-08 00:51:08 +00:00
Matthias Clasen
a6c3e440f6
printdialog: Handle nonexisting files better
...
When a non-existing file is selected in the file chooser
for print-to-file, we weren't updating the button label
to show the new filename. Fix that.
Also, use newer file chooser api.
2022-05-07 20:31:46 -04:00
Matthias Clasen
08d386844a
4.7.0
4.7.0
2022-05-07 11:59:38 -04:00
Matthias Clasen
48e98d333e
NEWS: Updates
2022-05-07 11:45:31 -04:00
Matthias Clasen
ad4536e825
Merge branch 'install-node-editor' into 'main'
...
Install gtk4-node-editor
See merge request GNOME/gtk!4701
2022-05-07 12:09:29 +00:00
Piotr Drąg
2080f3db17
Update POTFILES.in and POTFILES.skip
2022-05-07 13:49:37 +02:00
Matthias Clasen
726a92200f
Install gtk4-node-editor
...
It is an application worth having around.
2022-05-07 07:18:36 -04:00
Matthias Clasen
f9afee0667
Add a man page for gtk4-node-editor
2022-05-07 07:18:36 -04:00
Matthias Clasen
78d34c098e
node-editor: Add things
...
Add a desktop file and appdata.
2022-05-07 07:18:36 -04:00
Matthias Clasen
aa4e8334ee
Merge branch 'faster-listview-scrolling' into 'main'
...
listitemwidget: Avoid some unnecessary work
See merge request GNOME/gtk!4700
2022-05-07 03:51:45 +00:00
Matthias Clasen
5eee5e8cac
Merge branch 'redo-doc-images' into 'main'
...
wip: Redo doc image generation
See merge request GNOME/gtk!4646
2022-05-07 03:51:10 +00:00
Matthias Clasen
376d95a549
Updated screenshots
...
Produced by running the screenshot command over the
ui files in the same directory.
2022-05-06 23:05:15 -04:00
Matthias Clasen
a3ac414465
Generate screenshots on the fly
...
This commit adds a new meson option -Dupdate_screenshots=true.
When it is enabled, and -Dgtk_doc=true is also used, then the
build will generate images to include in the API docs from
ui files in docs/reference/gtk/images.
Note: we still keep a copy of the images in git, in order to
allow building without a display connection. To update the
images in git, the generated images need to be copied back
from the builddir to the srcdir.
2022-05-06 22:59:22 -04:00
Matthias Clasen
8ee6203e2c
Remove the old doc shooter infrastructure
...
This is no longer used.
2022-05-06 22:59:22 -04:00
Matthias Clasen
fadeda61e5
listitemwidget: Avoid more paramspec lookups
...
We can use the same helper function in all
places where we notify all three listitem
properties.
2022-05-06 22:28:14 -04:00
Matthias Clasen
3307b8ce88
listitemwidget: Avoid some unnecessary work
...
Only update widget and accessible state if the
selected property actually changed.
2022-05-06 21:36:22 -04:00
Matthias Clasen
fff32faa67
Merge branch 'screenshot-popovers' into 'main'
...
builder-tool: Screenshot popovers properly
See merge request GNOME/gtk!4699
2022-05-07 00:39:35 +00:00
Matthias Clasen
c0acf264a9
builder-tool: Screenshot popovers properly
...
Do the necessary shenanigans to get popovers to show
up in screenshots.
2022-05-06 14:43:45 -04:00
Matthias Clasen
dacca9ece0
Merge branch 'check-half-float' into 'main'
...
gdk: Check OES_vertex_half_float GLES extension
See merge request GNOME/gtk!4689
2022-05-06 18:02:05 +00:00
Benjamin Otte
bd9c491076
Merge branch 'list-item-factory-notify-by-pspec' into 'main'
...
list-item: Use notify_by_pspec instead of by name
See merge request GNOME/gtk!4697
2022-05-06 16:11:21 +00:00
Matthias Clasen
93d62acdf3
Merge branch 'builder-treestore-data' into 'main'
...
Add buildable data support to GtkTreeStore
See merge request GNOME/gtk!4695
2022-05-06 15:22:41 +00:00
Matthias Clasen
0da75b0bbf
gsk: Check for half float support
...
The GL renderer currently relies on half float support
in vertex buffers, so check that we have it.
Related: #4894
2022-05-06 11:05:57 -04:00
Ivan Molodetskikh
8328bd9f96
list-item: Use notify_by_pspec instead of by name
...
This is a hot path when scrolling a ColumnView, and
g_param_spec_pool_lookup () was taking a measurable part in this hot
path. Instead, notify using pspecs to avoid the name lookup.
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3334
2022-05-06 18:05:03 +03:00
Luca Bacci
1a82e6a762
Merge branch 'gdk-win32-rework-scroll-input-handling' into 'main'
...
GdkWin32: Rework scroll input handling
See merge request GNOME/gtk!4633
2022-05-06 14:58:32 +00:00
Benjamin Otte
886bb0f522
Merge branch 'list-item-factory-no-freeze-thaw' into 'main'
...
listitemfactory: Track notify manually instead of freeze/thaw
See merge request GNOME/gtk!4696
2022-05-06 14:52:21 +00:00
Ivan Molodetskikh
d65e7c9d05
listitemfactory: Track notify manually instead of freeze/thaw
...
freeze/thaw_notify () showed up on the perf trace for rapid ColumnView
scrolling. Track the three properties manually to make it a little
faster.
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3334
2022-05-06 17:31:24 +03:00