Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the blur shader to remove the variable-length loop and to use the texture filtering hardware more effectively. #3028

Closed
wants to merge 4 commits into from

Allow the output path to be specified for the `wrench png` subtool

  • Loading branch information
pcwalton committed Sep 6, 2018
commit 28f977cf611530270d7c4dc8f3ea489f03d72259
@@ -85,6 +85,10 @@ subcommands:
help: The input YAML file
required: true
index: 1
- OUTPUT:
help: The output PNG file
required: false
index: 2
- show:
about: show frame(s) described by YAML, binary recording, or capture
aliases: ['load', 'replay']
@@ -497,7 +497,15 @@ fn main() {
_ => panic!("Unknown surface argument value")
};
let reader = YamlFrameReader::new_from_args(subargs);
png::png(&mut wrench, surface, &mut window, reader, rx.unwrap());
let output_path = match subargs.value_of("OUTPUT") {
Some(path) => PathBuf::from(path),
None => {
let mut path = reader.yaml_path().clone();
path.set_extension("png");
path
}
};
png::png(&mut wrench, surface, &mut window, output_path, reader, rx.unwrap());
} else if let Some(subargs) = args.subcommand_matches("reftest") {
// Exit with an error code in order to ensure the CI job fails.
process::exit(reftest(wrench, &mut window, subargs, rx.unwrap()) as _);
@@ -6,7 +6,7 @@ use {WindowWrapper, NotifierEvent};
use image::png::PNGEncoder;
use image::{self, ColorType, GenericImage};
use std::fs::File;
use std::path::Path;
use std::path::{Path, PathBuf};
use std::sync::mpsc::Receiver;
use webrender::api::*;
use wrench::{Wrench, WrenchThing};
@@ -76,6 +76,7 @@ pub fn png(
wrench: &mut Wrench,
surface: ReadSurface,
window: &mut WindowWrapper,
out_path: PathBuf,
mut reader: YamlFrameReader,
rx: Receiver<NotifierEvent>,
) {
@@ -106,8 +107,5 @@ pub fn png(
}
};

let mut out_path = reader.yaml_path().clone();
out_path.set_extension("png");

save(out_path, data, device_size, settings);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.