weston/libweston/color-lcms/meson.build
Pekka Paalanen 7c13c4a476 color-lcms: use sRGB EOTF
Initialize LittleCMS and use it to generate the sRGB EOTF and inverse
curves. Use these curves to define the blending color space as optical
(linear) sRGB by assuming that both content and output color spaces are
sRGB.

As a consequence, this causes Weston to do "gamma correct blending", as
in, blend in light linear space which should avoid distorting colors in
alpha gradients, when color-lcms is active.

This makes use of the 3x1D LUT support added in gl-renderer earlier, and
shows how the color manager is responsible for re-using existing color
transformation objects.

Co-authored-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-21 14:36:33 +00:00

31 lines
691 B
Meson

if not get_option('color-management-lcms')
subdir_done()
endif
dep_lcms2 = dependency('lcms2', version: '>= 2.9', required: false)
if not dep_lcms2.found()
error('color-lcms plugin requires lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.')
endif
srcs_color_lcms = [
'color-lcms.c',
'color-transform.c',
]
deps_color_lcms = [
dep_libm,
dep_libweston_private,
dep_lcms2,
]
plugin_color_lcms = shared_library(
'color-lcms',
srcs_color_lcms,
include_directories: common_inc,
dependencies: deps_color_lcms,
name_prefix: '',
install: true,
install_dir: dir_module_libweston
)
env_modmap += 'color-lcms.so=@0@;'.format(plugin_color_lcms.full_path())