Skip to content

Commit c8fa0de

Browse files
committed
shaders: remove async from shader nodes not needing it
1 parent 719c731 commit c8fa0de

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

node-graph/graster-nodes/src/adjustments.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ fn levels<T: Adjust<Color>>(
297297
// https://stackoverflow.com/a/55233732/775283
298298
// Works the same for gamma and linear color
299299
#[node_macro::node(name("Black & White"), category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
300-
async fn black_and_white<T: Adjust<Color>>(
300+
fn black_and_white<T: Adjust<Color>>(
301301
_: impl Ctx,
302302
#[implementations(
303303
Color,
@@ -370,7 +370,7 @@ async fn black_and_white<T: Adjust<Color>>(
370370
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=%27hue%20%27%20%3D%20Old,saturation%2C%20Photoshop%205.0
371371
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=0%20%3D%20Use%20other.-,Hue/Saturation,-Hue/Saturation%20settings
372372
#[node_macro::node(name("Hue/Saturation"), category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
373-
async fn hue_saturation<T: Adjust<Color>>(
373+
fn hue_saturation<T: Adjust<Color>>(
374374
_: impl Ctx,
375375
#[implementations(
376376
Color,
@@ -405,7 +405,7 @@ async fn hue_saturation<T: Adjust<Color>>(
405405
// Aims for interoperable compatibility with:
406406
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=%27%20%3D%20Color%20Lookup-,%27nvrt%27%20%3D%20Invert,-%27post%27%20%3D%20Posterize
407407
#[node_macro::node(category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
408-
async fn invert<T: Adjust<Color>>(
408+
fn invert<T: Adjust<Color>>(
409409
_: impl Ctx,
410410
#[implementations(
411411
Color,
@@ -428,7 +428,7 @@ async fn invert<T: Adjust<Color>>(
428428
// Aims for interoperable compatibility with:
429429
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=post%27%20%3D%20Posterize-,%27thrs%27%20%3D%20Threshold,-%27grdm%27%20%3D%20Gradient
430430
#[node_macro::node(category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
431-
async fn threshold<T: Adjust<Color>>(
431+
fn threshold<T: Adjust<Color>>(
432432
_: impl Ctx,
433433
#[implementations(
434434
Color,
@@ -474,7 +474,7 @@ async fn threshold<T: Adjust<Color>>(
474474
// When both parameters are set, it is equivalent to running this adjustment twice, with only vibrance set and then only saturation set.
475475
// (Except for some noise probably due to rounding error.)
476476
#[node_macro::node(category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
477-
async fn vibrance<T: Adjust<Color>>(
477+
fn vibrance<T: Adjust<Color>>(
478478
_: impl Ctx,
479479
#[implementations(
480480
Color,
@@ -640,7 +640,7 @@ pub enum DomainWarpType {
640640
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=%27mixr%27%20%3D%20Channel%20Mixer
641641
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=Lab%20color%20only-,Channel%20Mixer,-Key%20is%20%27mixr
642642
#[node_macro::node(category("Raster: Adjustment"), properties("channel_mixer_properties"), shader_node(PerPixelAdjust))]
643-
async fn channel_mixer<T: Adjust<Color>>(
643+
fn channel_mixer<T: Adjust<Color>>(
644644
_: impl Ctx,
645645
#[implementations(
646646
Color,
@@ -769,7 +769,7 @@ pub enum SelectiveColorChoice {
769769
// Algorithm based on:
770770
// https://blog.pkh.me/p/22-understanding-selective-coloring-in-adobe-photoshop.html
771771
#[node_macro::node(category("Raster: Adjustment"), properties("selective_color_properties"), shader_node(PerPixelAdjust))]
772-
async fn selective_color<T: Adjust<Color>>(
772+
fn selective_color<T: Adjust<Color>>(
773773
_: impl Ctx,
774774
#[implementations(
775775
Color,
@@ -912,7 +912,7 @@ async fn selective_color<T: Adjust<Color>>(
912912
// https://www.axiomx.com/posterize.htm
913913
// This algorithm produces fully accurate output in relation to the industry standard.
914914
#[node_macro::node(category("Raster: Adjustment"), shader_node(PerPixelAdjust))]
915-
async fn posterize<T: Adjust<Color>>(
915+
fn posterize<T: Adjust<Color>>(
916916
_: impl Ctx,
917917
#[implementations(
918918
Color,
@@ -946,7 +946,7 @@ async fn posterize<T: Adjust<Color>>(
946946
// Algorithm based on:
947947
// https://geraldbakker.nl/psnumbers/exposure.html
948948
#[node_macro::node(category("Raster: Adjustment"), properties("exposure_properties"), shader_node(PerPixelAdjust))]
949-
async fn exposure<T: Adjust<Color>>(
949+
fn exposure<T: Adjust<Color>>(
950950
_: impl Ctx,
951951
#[implementations(
952952
Color,

node-graph/graster-nodes/src/blending_nodes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub fn apply_blend_mode(foreground: Color, background: Color, blend_mode: BlendM
123123
}
124124

125125
#[node_macro::node(category("Raster"), shader_node(PerPixelAdjust))]
126-
async fn blend<T: Blend<Color> + Send>(
126+
fn blend<T: Blend<Color> + Send>(
127127
_: impl Ctx,
128128
#[implementations(
129129
Color,
@@ -195,7 +195,7 @@ mod test {
195195
use graphene_core::table::Table;
196196

197197
#[tokio::test]
198-
async fn color_overlay_multiply() {
198+
fn color_overlay_multiply() {
199199
let image_color = Color::from_rgbaf32_unchecked(0.7, 0.6, 0.5, 0.4);
200200
let image = Image::new(1, 1, image_color);
201201

0 commit comments

Comments
 (0)