Matthias Clasen
fda050e4fa
gsk: Linearize colors too
...
Convert all the GdkRGBA colors that we have
in render nodes to linear sRGB before using
them. This brings the rendering back in line
with what cairo produces, except for the video.
2022-09-30 14:42:03 -04:00
Matthias Clasen
7e91c156fe
gsk: Apply gamma to frames
...
Use a shader to go from linear sRGB to sRGB when
we are done with a frame.
2022-09-30 14:42:03 -04:00
Matthias Clasen
d9e6e92a64
gsk: Upload textures in linear sRGB
...
We want to do compositing in a linear color space,
so convert textures to linear sRGB before uploading.
Currently, this causes images to come out dark, since
we don't have a way to tell the compositor that our
framebuffer is linear, so it assumes a gamma that we
don't provide.
2022-09-30 14:42:03 -04:00
Benjamin Otte
ff78a913d7
gdk: Add GDK_DEBUG=srgb
...
Disables gdk_surface_set_color_profile() for backends and forces
sRGB.
This does not change any GSK renderers, it just turns off any backends
trying to hand us color profiles.
2022-09-30 14:42:03 -04:00
Benjamin Otte
91ffa97874
Add crude color management impl for cairo
2022-09-30 14:42:03 -04:00
Benjamin Otte
3ce7556235
x11: Implement support for color profiles
...
Stole the implementation from eog.
This doesn't yet update the profile when it changes though.
2022-09-30 14:42:03 -04:00
Matthias Clasen
2880a9c80f
Support color space in pixbufs
...
When creating a GdkTexture from a GdkPixbuf,
see if it has an icc profile attached, and if
so, use it.
2022-09-30 14:42:03 -04:00
Benjamin Otte
f0e2e58939
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-09-30 14:42:03 -04:00
Matthias Clasen
4137f26f41
lcmscolorspace: 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-09-30 14:42:03 -04:00
Benjamin Otte
b4116cbbb2
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-09-30 14:42:03 -04:00
Benjamin Otte
c5909b16ad
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-09-30 14:42:03 -04:00
Matthias Clasen
d2f9acf3b0
gsk: Avoid cairo in icon upload
...
Use the new memory texture magic
2022-09-30 14:42:03 -04:00
Matthias Clasen
3214e5a703
tiff: Add color space support
...
Apply an embedded icc profile when loading tiff
images, and save associated icc profile information
when saving tiff images.
2022-09-30 14:42:03 -04:00
Benjamin Otte
9ceaf3445d
png: Handle color spaces
2022-09-30 14:42:02 -04:00
Matthias Clasen
8fd866ba2e
gdk: Take a color space in gdk_memory_texture_from_texture
...
This will let us do profile conversions at the
same time.
Update all callers.
2022-09-30 14:42:02 -04:00
Benjamin Otte
f1e3ccf0d4
gdk: Take a color space in gdk_texture_download_surface
...
This way, the resulting surface can contain the pixels
in the desired color space.
2022-09-30 14:42:02 -04:00
Matthias Clasen
03c9e25377
memoryformat: Take a color space when converting
2022-09-30 14:42:02 -04:00
Benjamin Otte
d161830d4c
API: Add color space get/set for cairo
...
Add a centralized place to attach color space to.
Nothing uses that information yet, but all the
backends do set it.
2022-09-30 14:42:02 -04:00
Benjamin Otte
d546785f90
API: Add GdkSurface::color-space
...
Unused so far, but there's a private setter for backends and a public
readable property for code.
2022-09-30 14:42:02 -04:00
Matthias Clasen
e9315dbcf8
gtk-demo: Add a color space demo
...
This is using test images from http://displaycal.net/ .
2022-09-30 14:42:02 -04:00
Benjamin Otte
69403eb66c
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-09-30 14:42:02 -04:00
Benjamin Otte
23fdeb9f20
jpeg: Add color space support
2022-09-30 14:42:02 -04:00
Benjamin Otte
157ad464d8
API: Add gdk_memory_texture_new_with_color_space()
...
A version of gdk_memory_texture_new() that allows passing
a color space. The old version assumes sRGB.
2022-09-30 14:42:02 -04:00
Benjamin Otte
e675b54df7
API: Add a GdkTexture::color-space property
...
Returns the associated color space. For now, this is always sRGB.
2022-09-30 14:42:02 -04:00
Matthias Clasen
9b824abddd
Add some colorspace tests
...
This is very minimal, but it is enough to do
a very basic check of the gdk_color_space_equal
implementation.
2022-09-30 14:42:02 -04:00
Benjamin Otte
28f670d5fa
gdk: Add GdkLcmsColorSpace
...
This is a colorspace implementation using LCMS to implement support
for random colorspaces from ICC profiles.
2022-09-30 14:41:31 -04:00
Benjamin Otte
28d70d17e0
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-09-30 14:41:31 -04:00
Matthias Clasen
b286901f2b
ci: Update dependencies for msys
...
Add libpng, libjpeg-turbo, libtiff and lcms2.
2022-09-30 14:41:31 -04:00
Matthias Clasen
588a7212c7
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-09-30 14:41:31 -04:00
Benjamin Otte
6979811b0e
cms: Add lcms to the build
2022-09-30 14:41:31 -04:00
Benjamin Otte
87fcac7508
gdk: Add GdkColorSpace
...
The code doesn't do anything yet, this is just the boilerplate.
2022-09-30 14:41:31 -04:00
Asier Sarasua Garmendia
d2c9cbba4f
Update Basque translation
2022-09-29 16:55:20 +00:00
Balázs Úr
8b33900e1d
Update Hungarian translation
2022-09-29 16:43:31 +00:00
Nart Tlisha
0c3572312a
Update Abkhazian translation
2022-09-29 15:19:37 +00:00
Zurab Kargareteli
160a83023a
Update Georgian translation
2022-09-28 18:33:41 +00:00
Matthias Clasen
911abe2d2c
Fix expected test output
...
The major.minor version number shows up in the expected
output of this test, so it needs to be adjusted at the
beginning of every cycle.
2022-09-28 13:32:40 -04:00
Matthias Clasen
0c02573c47
Add 4.10 version macros
2022-09-28 13:30:01 -04:00
Matthias Clasen
4257e1ce4f
Post-release version bump
...
This is an experiment to see if I can keep up with
doing post-release version bumps, so git snapshots
will always have a different version from released
tarballs.
This commit also marks the beginning of the 4.10
development cycle, as 4.8 has been branched.
2022-09-28 13:19:49 -04:00
Matthias Clasen
39bc13c8a7
Merge branch 'matthiasc/for-main' into 'main'
...
Add more names to sources
See merge request GNOME/gtk!5064
2022-09-28 17:02:09 +00:00
Matthias Clasen
dd7cd6ffdd
Add more names to sources
...
This helps with identifying things in sysprof logs,
and while debugging.
2022-09-28 12:37:21 -04:00
Matthias Clasen
349cda3d36
Merge branch 'post-install' into 'main'
...
meson: Remove post-install script
See merge request GNOME/gtk!5063
2022-09-28 16:21:49 +00:00
Xavier Claessens
48cc56081d
meson: Remove post-install script
...
GTK depends on Meson >= 0.60 so it was never used.
2022-09-28 11:25:43 -04:00
Matthias Clasen
aa9a7a931d
Merge branch 'wip/carlosg/shuffle-reset-take2' into 'main'
...
gtkimcontextwayland: Shuffle full resets after IM changes
Closes #5200
See merge request GNOME/gtk!5050
2022-09-28 01:39:49 +00:00
Matthias Clasen
3aee45de28
Merge branch 'wroy-main-patch-32519' into 'main'
...
Fix #5211 : Preprocessor conformance with MSVC
Closes #5211
See merge request GNOME/gtk!5058
2022-09-28 01:39:15 +00:00
Matthias Clasen
5f469d8903
Merge branch 'broadway-device-query-state-fix' into 'main'
...
GTK4 gdk/broadway: correct gdk_broadway_device_query_state() to return pointer coordinates relative to the upper left corner of surface
See merge request GNOME/gtk!5053
2022-09-28 01:38:45 +00:00
Matthias Clasen
2ce2e90205
Merge branch 'fix-scale-crashes' into 'main'
...
scale: Fix a typo
See merge request GNOME/gtk!5061
2022-09-28 01:22:49 +00:00
Matthias Clasen
8b76cc841d
scale: Fix a typo
...
We want to update the label size request when
the adjustment changes, not when anything else
changes.
This may be the reason for crash reports like
https://retrace.fedoraproject.org/faf/problems/bthash/?bth=1e5cc1318358d5db298e5d6c2ec47361922cce74
2022-09-27 21:03:56 -04:00
Aurimas Černius
75b1d75751
Updated Lithuanian translation
2022-09-27 22:40:49 +03:00
Hugo Carvalho
2d19a1f1ec
Update Portuguese translation
2022-09-27 19:39:53 +00:00
Rafael Fontenelle
e57d005076
Update Brazilian Portuguese translation
2022-09-27 13:10:05 +00:00