mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
Fix bbox bug
Bounding boxes were being calculated as way too large in the element processing. Also wire up counters so winit binary is happy.
This commit is contained in:
parent
9bb06ec340
commit
fe1790e724
|
@ -37,7 +37,7 @@ fn main() -> Result<(), Error> {
|
|||
.map(|_| device.create_cmd_buf())
|
||||
.collect::<Result<Vec<_>, Error>>()?;
|
||||
let query_pools = (0..NUM_FRAMES)
|
||||
.map(|_| device.create_query_pool(6))
|
||||
.map(|_| device.create_query_pool(5))
|
||||
.collect::<Result<Vec<_>, Error>>()?;
|
||||
|
||||
let mut ctx = PietGpuRenderContext::new();
|
||||
|
@ -70,12 +70,11 @@ fn main() -> Result<(), Error> {
|
|||
|
||||
let timestamps = device.reap_query_pool(query_pool).unwrap();
|
||||
window.set_title(&format!(
|
||||
"k1: {:.3}ms, k2s: {:.3}ms, k2f: {:.3}ms, k3: {:.3}ms, k4: {:.3}ms",
|
||||
"e: {:.3}ms, b: {:.3}ms, c: {:.3}ms, f: {:.3}ms",
|
||||
timestamps[0] * 1e3,
|
||||
(timestamps[1] - timestamps[0]) * 1e3,
|
||||
(timestamps[2] - timestamps[1]) * 1e3,
|
||||
(timestamps[3] - timestamps[2]) * 1e3,
|
||||
(timestamps[4] - timestamps[3]) * 1e3,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ State combine_state(State a, State b) {
|
|||
c.translate.y = a.mat.y * b.translate.x + a.mat.w * b.translate.y + a.translate.y;
|
||||
c.linewidth = (b.flags & FLAG_SET_LINEWIDTH) == 0 ? a.linewidth : b.linewidth;
|
||||
c.flags = (a.flags & (FLAG_SET_LINEWIDTH | FLAG_SET_BBOX)) | b.flags;
|
||||
c.flags |= (a.flags & FLAG_RESET_BBOX) >> 1;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue