-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean code for Image display #1271
Clean code for Image display #1271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried here about the performance, we should call this function twice for everypixel. Did you compare the performance ? maybe we should use inline
?
@ahcorde Thanks for your suggestion. I ignored the performance impact of function calls, will change it to I will continuelly work on BTW, eventhough it is inline, convert color for every pixel is not efficient, especially when image is large. |
Signed-off-by: Peng Wang <[email protected]>
d628df0
to
d1483b3
Compare
Has pushed new patch to change this function to
In |
Hi @ahcorde |
Pulls: #1271 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind to merge with rolling
?
Some cleanup:
std::clamp()
instead of clamp expressions.