eirikbakke commented on issue #998: [NETBEANS-1586] Make 
ImageUtilities.createDisabledIcon work with HiDPI icons
URL: 
https://github.com/apache/incubator-netbeans/pull/998#issuecomment-437698496
 
 
   Strictly speaking, it's not possible to cache the image here, because we 
don't know what part of the "Component c" parameter's state the delegate's 
paintImage method might use. If said state changes, we'd have to invalidate the 
cache. Though the previous code didn't seem to care about this. There's also a 
fair bit of extra logic that would have to be added to check if the cache needs 
to be updated (comparing the FontRenderContext, ensuring thread-safety etc.). I 
figured the added complexity was not worth it, given that icon images (even 
HiDPI ones) are typically tiny. If you disagree, and think it's preferable to 
ignore the "Component c" state problem, I'm happy to add caching logic.
   
   I can remove the deactivated debugging lines.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to