You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/11/11 19:43:51 UTC

[GitHub] eirikbakke commented on issue #998: [NETBEANS-1586] Make ImageUtilities.createDisabledIcon work with HiDPI icons

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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