mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-24 08:05:04 +00:00
Remove leftover debug logs
This commit is contained in:
parent
834cb1a227
commit
089df947ac
9 changed files with 1 additions and 24 deletions
|
@ -231,7 +231,6 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
||||||
percent,
|
percent,
|
||||||
status,
|
status,
|
||||||
} => {
|
} => {
|
||||||
debug!("ImaginateSetGeneratingStatus: {:?} {:?} {:?} {:?}", document_id, layer_path, node_path, percent);
|
|
||||||
let get = |name: &str| IMAGINATE_NODE.inputs.iter().position(|input| input.name == name).unwrap_or_else(|| panic!("Input {name} not found"));
|
let get = |name: &str| IMAGINATE_NODE.inputs.iter().position(|input| input.name == name).unwrap_or_else(|| panic!("Input {name} not found"));
|
||||||
if let Some(percentage) = percent {
|
if let Some(percentage) = percent {
|
||||||
responses.push_back(
|
responses.push_back(
|
||||||
|
|
|
@ -27,13 +27,10 @@ impl NodeGraphExecutor {
|
||||||
scoped_network.duplicate_outputs(&mut generate_uuid);
|
scoped_network.duplicate_outputs(&mut generate_uuid);
|
||||||
scoped_network.remove_dead_nodes();
|
scoped_network.remove_dead_nodes();
|
||||||
|
|
||||||
//debug!("Execute document network:\n{scoped_network:#?}");
|
|
||||||
|
|
||||||
// We assume only one output
|
// We assume only one output
|
||||||
assert_eq!(scoped_network.outputs.len(), 1, "Graph with multiple outputs not yet handled");
|
assert_eq!(scoped_network.outputs.len(), 1, "Graph with multiple outputs not yet handled");
|
||||||
let c = Compiler {};
|
let c = Compiler {};
|
||||||
let proto_network = c.compile_single(scoped_network, true)?;
|
let proto_network = c.compile_single(scoped_network, true)?;
|
||||||
//debug!("Execute proto network:\n{proto_network}");
|
|
||||||
assert_ne!(proto_network.nodes.len(), 0, "No protonodes exist?");
|
assert_ne!(proto_network.nodes.len(), 0, "No protonodes exist?");
|
||||||
if let Err(e) = self.executor.update(proto_network) {
|
if let Err(e) = self.executor.update(proto_network) {
|
||||||
error!("Failed to update executor:\n{}", e);
|
error!("Failed to update executor:\n{}", e);
|
||||||
|
|
|
@ -10,14 +10,12 @@ pub fn block_on<F: Future + 'static>(future: F) -> F::Output {
|
||||||
let result = executor::spawn(async move {
|
let result = executor::spawn(async move {
|
||||||
let result = executor::yield_async(future).await;
|
let result = executor::yield_async(future).await;
|
||||||
*move_val.lock().unwrap() = Some(result);
|
*move_val.lock().unwrap() = Some(result);
|
||||||
log::info!("Finished");
|
|
||||||
});
|
});
|
||||||
executor::run(Some(result.task()));
|
executor::run(Some(result.task()));
|
||||||
loop {
|
loop {
|
||||||
if let Some(result) = val.lock().unwrap().take() {
|
if let Some(result) = val.lock().unwrap().take() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
log::info!("Waiting");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -603,16 +603,6 @@ impl Color {
|
||||||
Self::from_rgbaf32_unchecked(f(self.r()), f(self.g()), f(self.b()), self.a())
|
Self::from_rgbaf32_unchecked(f(self.r()), f(self.g()), f(self.b()), self.a())
|
||||||
}
|
}
|
||||||
pub fn blend_rgb<F: Fn(f32, f32) -> f32>(&self, other: Color, f: F) -> Self {
|
pub fn blend_rgb<F: Fn(f32, f32) -> f32>(&self, other: Color, f: F) -> Self {
|
||||||
let color = Color {
|
|
||||||
red: f(self.red, other.red),
|
|
||||||
green: f(self.green, other.green),
|
|
||||||
blue: f(self.blue, other.blue),
|
|
||||||
alpha: self.alpha,
|
|
||||||
};
|
|
||||||
#[cfg(feature = "log")]
|
|
||||||
if *self == Color::RED {
|
|
||||||
debug!("{} {} {} {}", color.red, color.green, color.blue, color.alpha);
|
|
||||||
}
|
|
||||||
Color {
|
Color {
|
||||||
red: f(self.red, other.red).clamp(0., 1.),
|
red: f(self.red, other.red).clamp(0., 1.),
|
||||||
green: f(self.green, other.green).clamp(0., 1.),
|
green: f(self.green, other.green).clamp(0., 1.),
|
||||||
|
|
|
@ -39,7 +39,6 @@ pub struct BlitSubpath<P> {
|
||||||
|
|
||||||
#[node_macro::node_fn(BlitSubpath)]
|
#[node_macro::node_fn(BlitSubpath)]
|
||||||
fn bilt_subpath(base_image: Image, path_data: VectorData) -> Image {
|
fn bilt_subpath(base_image: Image, path_data: VectorData) -> Image {
|
||||||
log::info!("Blitting subpath {path_data:#?}");
|
|
||||||
// TODO: Get forma to compile
|
// TODO: Get forma to compile
|
||||||
/*use forma::prelude::*;
|
/*use forma::prelude::*;
|
||||||
let composition = Composition::new();
|
let composition = Composition::new();
|
||||||
|
|
|
@ -342,7 +342,7 @@ impl ProtoNetwork {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info!("Sorted order {sorted:?}");
|
debug!("Sorted order {sorted:?}");
|
||||||
sorted
|
sorted
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ fn generate_quantization_fn(image_frame: ImageFrame, samples: u32, function: u32
|
||||||
.filter(|(i, _)| i % (image.data.len() / len) == 0)
|
.filter(|(i, _)| i % (image.data.len() / len) == 0)
|
||||||
.map(|(_, x)| vec![x.r() as f64, x.g() as f64, x.b() as f64, x.a() as f64])
|
.map(|(_, x)| vec![x.r() as f64, x.g() as f64, x.b() as f64, x.a() as f64])
|
||||||
.for_each(|x| x.into_iter().enumerate().for_each(|(i, value)| channels[i].push(value)));
|
.for_each(|x| x.into_iter().enumerate().for_each(|(i, value)| channels[i].push(value)));
|
||||||
log::info!("Quantizing {} samples", channels[0].len());
|
|
||||||
log::info!("In {} channels", channels.len());
|
|
||||||
let quantization: Vec<Quantization> = channels.into_iter().map(|x| generate_quantization_per_channel(x, samples)).collect();
|
let quantization: Vec<Quantization> = channels.into_iter().map(|x| generate_quantization_per_channel(x, samples)).collect();
|
||||||
core::array::from_fn(|i| quantization[i].clone())
|
core::array::from_fn(|i| quantization[i].clone())
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,6 @@ where
|
||||||
let bg_point = DVec2::new(x as f64, y as f64);
|
let bg_point = DVec2::new(x as f64, y as f64);
|
||||||
let fg_point = bg_to_fg.transform_point2(bg_point);
|
let fg_point = bg_to_fg.transform_point2(bg_point);
|
||||||
if !((fg_point.cmpge(DVec2::ZERO) & fg_point.cmple(foreground_size)) == BVec2::new(true, true)) {
|
if !((fg_point.cmpge(DVec2::ZERO) & fg_point.cmple(foreground_size)) == BVec2::new(true, true)) {
|
||||||
//log::debug!("Skipping pixel at {:?}", dest_point);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +244,6 @@ pub struct ImaginateNode<E> {
|
||||||
|
|
||||||
#[node_macro::node_fn(ImaginateNode)]
|
#[node_macro::node_fn(ImaginateNode)]
|
||||||
fn imaginate(image_frame: ImageFrame, cached: Option<std::sync::Arc<graphene_core::raster::Image>>) -> ImageFrame {
|
fn imaginate(image_frame: ImageFrame, cached: Option<std::sync::Arc<graphene_core::raster::Image>>) -> ImageFrame {
|
||||||
info!("Imaginating image with {} pixels", image_frame.image.data.len());
|
|
||||||
let cached_image = cached.map(|mut x| std::sync::Arc::make_mut(&mut x).clone()).unwrap_or(image_frame.image);
|
let cached_image = cached.map(|mut x| std::sync::Arc::make_mut(&mut x).clone()).unwrap_or(image_frame.image);
|
||||||
ImageFrame {
|
ImageFrame {
|
||||||
image: cached_image,
|
image: cached_image,
|
||||||
|
|
|
@ -17,7 +17,6 @@ pub struct GpuExecutor<'a, I: StaticTypeSized, O> {
|
||||||
|
|
||||||
impl<'a, I: StaticTypeSized, O> GpuExecutor<'a, I, O> {
|
impl<'a, I: StaticTypeSized, O> GpuExecutor<'a, I, O> {
|
||||||
pub fn new(context: Context, shader: Cow<'a, [u32]>, entry_point: String) -> anyhow::Result<Self> {
|
pub fn new(context: Context, shader: Cow<'a, [u32]>, entry_point: String) -> anyhow::Result<Self> {
|
||||||
log::info!("Creating executor");
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
context,
|
context,
|
||||||
entry_point,
|
entry_point,
|
||||||
|
@ -29,7 +28,6 @@ impl<'a, I: StaticTypeSized, O> GpuExecutor<'a, I, O> {
|
||||||
|
|
||||||
impl<'a, I: StaticTypeSized + Sync + Pod + Send, O: StaticTypeSized + Send + Sync + Pod> Executor for GpuExecutor<'a, I, O> {
|
impl<'a, I: StaticTypeSized + Sync + Pod + Send, O: StaticTypeSized + Send + Sync + Pod> Executor for GpuExecutor<'a, I, O> {
|
||||||
fn execute<'i, 's: 'i>(&'s self, input: Any<'i>) -> Result<Any<'i>, Box<dyn std::error::Error>> {
|
fn execute<'i, 's: 'i>(&'s self, input: Any<'i>) -> Result<Any<'i>, Box<dyn std::error::Error>> {
|
||||||
log::info!("Executing shader");
|
|
||||||
let input = dyn_any::downcast::<Vec<I>>(input).expect("Wrong input type");
|
let input = dyn_any::downcast::<Vec<I>>(input).expect("Wrong input type");
|
||||||
let context = &self.context;
|
let context = &self.context;
|
||||||
let future = execute_shader(context.device.clone(), context.queue.clone(), self.shader.to_vec(), *input, self.entry_point.clone());
|
let future = execute_shader(context.device.clone(), context.queue.clone(), self.shader.to_vec(), *input, self.entry_point.clone());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue