Optimize colorspace conversion (#1228)

* Enabled cross-crate inlining for release builds.

* Sprinkled inline-enabling directives in color.rs.

* Reduced abstraction in color channel handling for better inlining.

* Alpha should not use gamma.

* Oops, didn't compile.

* Added discrete sRGB <-> linear float conversion.

* Use new float <-> sRGB conversion.

* Improved comments.

* Don't convert fully transparent pixels.
This commit is contained in:
Orson Peters
2023-05-25 02:00:30 -07:00
committed by Keavon Chambers
parent a08d8e4537
commit 9e3b31f152
8 changed files with 322 additions and 55 deletions
+3
View File
@@ -58,3 +58,6 @@ opt-level = 3
[profile.dev]
opt-level = 1
[profile.release]
lto = "thin"