On Thu, 6 Mar 2025 20:30:42 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> I'm just not sure how this should be handled from the application's point of 
> view. The app may obtain a profile from some place and use it for some images 
> or pixels. Then, if the app wants to tweak the rendering intent for some 
> reason, what should it do?
> 
> * Clone the profile and then change the intent?
> * Change the intent, and if an exception occurs, clone the profile and try to 
> change the intent again?
> * Skip changing the intent completely?

If an app got a profile 'from some place', it probably should not be trying to 
change it, and likely has no idea if some isolated change will work properly, 
or the effect on what handed it that profile.
So copying the data and creating a new profile is what I'd recommend in such a 
case, regardless of this proposed restriction, and even then, only on a 'known' 
profile. 

> I remember we discussed this issue during the review of [this 
> commit](https://github.com/openjdk/jdk/pull/3037/files#diff-3dd53a33889801159f43dbb990ba033066bdabaed71bbc7254f58331d3898d69R39),
>  and the conclusion was that it was too late to change it and break apps. It 
> wasn’t considered very important since the "appcontext was withdrawn". So, 
> why are we deciding to change it now?

I don't see such a discussion there. Maybe it was 'offline' ?
Yes, this is less of an issue in a closed application, but it is an 
inappropriate thing to do/allow.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1984070656

Reply via email to