Commits on Source (7)
-
Directly destroying the cprof is not ideal, because it may hide issues that we have in the code. If we are destroying a cprof with ref_count bigger than 1, there's something wrong that we need to fix. Instead, assert that the stock sRGB cprof has ref_count == 1 when we are destroying the color manager. And use unref() instead of destroy(). Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
39de0bd9 -
Use xzalloc instead of zalloc, etc. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
33ed9356 -
In the next commit we introduce a function to get the stock sRGB color profile from the color-manager, so mock a stock color profile in the color-noop. It has no valid content, but should make callers happy. This is safe to do because the color profile is opaque, and only color-noop itself should have access to its content. color-lcms already has a stock sRGB color profile, so we don't have to do anything there. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
154ce42b -
In the next commit we'll stop using NULL as the stock sRGB color profile, so add a function to the color manager to allow libweston core to have access to the stock sRGB profile. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
977c41a6 -
cmlcms_get_hdr_meta() returns early if the output has a color profile set. That makes sense, because we should be able to get the color characteristics from the color profiles. But in the next commits, every output will have a color profile set. To allow the color-metadata-parsing test, do not return early when output->color_profile != NULL in cmlcms_get_hdr_meta() anymore. In the future we'll adjust this function in order to always extract the color characteristics from color profiles, as output->color_profile should always be set. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
afbc729e -
In the following commits, we'll create the stock sRGB color profile for outputs in weston_output_init(), and destroy it in weston_output_release(). We already have a mock color manager in the tests, but we still need to add the functions to create/destroy a mock stock sRGB color profile. This should avoid crashes in the following commits. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
0c1ab2ad -
Stop assuming that NULL represents the stock sRGB color profile. From now on, query the stock sRGB color profile from the color manager. This should be internal to libweston (core and the color plugins), and users of the libweston public API should not be affected by this. They are still allowed to set an output color profile to the stock sRGB using NULL. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
cab1992b