Remove leftover debug logs

This commit is contained in:
Keavon Chambers 2023-03-21 00:41:39 -07:00
parent 834cb1a227
commit 089df947ac
9 changed files with 1 additions and 24 deletions

View file

@ -231,7 +231,6 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
percent,
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"));
if let Some(percentage) = percent {
responses.push_back(

View file

@ -27,13 +27,10 @@ impl NodeGraphExecutor {
scoped_network.duplicate_outputs(&mut generate_uuid);
scoped_network.remove_dead_nodes();
//debug!("Execute document network:\n{scoped_network:#?}");
// We assume only one output
assert_eq!(scoped_network.outputs.len(), 1, "Graph with multiple outputs not yet handled");
let c = Compiler {};
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?");
if let Err(e) = self.executor.update(proto_network) {
error!("Failed to update executor:\n{}", e);

View file

@ -10,14 +10,12 @@ pub fn block_on<F: Future + 'static>(future: F) -> F::Output {
let result = executor::spawn(async move {
let result = executor::yield_async(future).await;
*move_val.lock().unwrap() = Some(result);
log::info!("Finished");
});
executor::run(Some(result.task()));
loop {
if let Some(result) = val.lock().unwrap().take() {
return result;
}
log::info!("Waiting");
}
}

View file

@ -603,16 +603,6 @@ impl Color {
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 {
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 {
red: f(self.red, other.red).clamp(0., 1.),
green: f(self.green, other.green).clamp(0., 1.),

View file

@ -39,7 +39,6 @@ pub struct BlitSubpath<P> {
#[node_macro::node_fn(BlitSubpath)]
fn bilt_subpath(base_image: Image, path_data: VectorData) -> Image {
log::info!("Blitting subpath {path_data:#?}");
// TODO: Get forma to compile
/*use forma::prelude::*;
let composition = Composition::new();

View file

@ -342,7 +342,7 @@ impl ProtoNetwork {
}
}
}
info!("Sorted order {sorted:?}");
debug!("Sorted order {sorted:?}");
sorted
}*/

View file

@ -24,8 +24,6 @@ fn generate_quantization_fn(image_frame: ImageFrame, samples: u32, function: u32
.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])
.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();
core::array::from_fn(|i| quantization[i].clone())
}

View file

@ -224,7 +224,6 @@ where
let bg_point = DVec2::new(x as f64, y as f64);
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)) {
//log::debug!("Skipping pixel at {:?}", dest_point);
continue;
}
@ -245,7 +244,6 @@ pub struct ImaginateNode<E> {
#[node_macro::node_fn(ImaginateNode)]
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);
ImageFrame {
image: cached_image,

View file

@ -17,7 +17,6 @@ pub struct GpuExecutor<'a, I: StaticTypeSized, 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> {
log::info!("Creating executor");
Ok(Self {
context,
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> {
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 context = &self.context;
let future = execute_shader(context.device.clone(), context.queue.clone(), self.shader.to_vec(), *input, self.entry_point.clone());