Skip to content

Commit f787acc

Browse files
committed
Build the brush document benchmark's runtime without a clock, which master's AsyncRuntime doesn't take
1 parent 5c734a3 commit f787acc

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

‎node-graph/interpreted-executor/benches/brush_document_gungraun.rs‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use graphene_std::application_io::RenderConfig;
1616
use graphene_std::brush::basic_brush::{basic_brush, basic_brush_pipeline};
1717
use graphene_std::brush::{BrushCache, brush_strokes};
1818
use graphene_std::graphic;
19-
use graphene_std::runtime::{AsyncRuntime, Clock, Spawn, Task};
19+
use graphene_std::runtime::{AsyncRuntime, Spawn, Task};
2020
use graphene_std::uuid::NodeId;
2121
use gungraun::prelude::*;
2222
use interpreted_executor::dynamic_executor::DynamicExecutor;
@@ -68,7 +68,7 @@ fn setup(existing: usize) -> Session {
6868
application_io: Some(Arc::new(PlatformApplicationIo::new_with_executor(gpu.clone()))),
6969
}),
7070
gpu,
71-
runtime: AsyncRuntime::new(Arc::new(BlockingSpawner), Arc::new(StoppedClock)),
71+
runtime: AsyncRuntime::new(Arc::new(BlockingSpawner)),
7272
preprocessor: preprocessor::Preprocessor::new(),
7373
executor: DynamicExecutor::default(),
7474
document: NodeNetwork::default(),
@@ -153,15 +153,6 @@ impl Spawn for BlockingSpawner {
153153
}
154154
}
155155

156-
/// Keeps the same time throughout, so animation never depends on how slowly Valgrind runs.
157-
struct StoppedClock;
158-
159-
impl Clock for StoppedClock {
160-
fn now(&self) -> std::time::Duration {
161-
std::time::Duration::ZERO
162-
}
163-
}
164-
165156
#[library_benchmark]
166157
#[benches::existing_strokes(args = [0, 16, 256], setup = setup)]
167158
pub fn add_stroke(mut session: Session) -> Session {

0 commit comments

Comments
 (0)