mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
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:
committed by
Keavon Chambers
parent
5816807f18
commit
bb93d243a0
@@ -81,7 +81,7 @@ impl<P: Pixel + Alpha> Sample for BrushStampGenerator<P> {
|
||||
};
|
||||
|
||||
use graphene_core::raster::Channel;
|
||||
Some(self.color.multiplied_alpha(P::AlphaChannel::from_f32(result)))
|
||||
Some(self.color.multiplied_alpha(P::AlphaChannel::from_linear(result)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user