From 9db9a993eb8164ada03fc45d962a3477abd7243a Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 19 Apr 2024 11:18:52 +0200 Subject: [PATCH] no need to track time range anymore --- .../src/visualizer_system.rs | 17 ++++++++--------- .../src/line_visualizer_system.rs | 18 ++++++++---------- .../src/point_visualizer_system.rs | 16 ++++++++-------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/crates/re_space_view_text_log/src/visualizer_system.rs b/crates/re_space_view_text_log/src/visualizer_system.rs index ddfb1b91bcff..58c1ebcd39a6 100644 --- a/crates/re_space_view_text_log/src/visualizer_system.rs +++ b/crates/re_space_view_text_log/src/visualizer_system.rs @@ -1,4 +1,4 @@ -use re_data_store::{RangeQuery, TimeRange}; +use re_data_store::TimeRange; use re_entity_db::EntityPath; use re_log_types::{RowId, TimeInt}; use re_query_cache2::{clamped_zip_1x2, range_zip_1x2, CachedRangeData, PromiseResult}; @@ -74,22 +74,22 @@ impl VisualizerSystem for TextLogSystem { }; all_bodies.to_dense::(resolver) }; - check_range(&query, &all_bodies)?; + check_range(&all_bodies)?; let all_levels = results .get_or_empty(TextLogLevel::name()) .to_dense::(resolver); - check_range(&query, &all_levels)?; + check_range(&all_levels)?; let all_colors = results .get_or_empty(Color::name()) .to_dense::(resolver); - check_range(&query, &all_colors)?; + check_range(&all_colors)?; let all_frames = range_zip_1x2( - all_bodies.range_indexed(query.range()), - all_levels.range_indexed(query.range()), - all_colors.range_indexed(query.range()), + all_bodies.range_indexed(), + all_levels.range_indexed(), + all_colors.range_indexed(), ); for (&(data_time, row_id), bodies, levels, colors) in all_frames { @@ -132,10 +132,9 @@ impl VisualizerSystem for TextLogSystem { // TODO(#5607): what should happen if the promise is still pending? #[inline] fn check_range<'a, C: Component>( - query: &RangeQuery, results: &'a CachedRangeData<'a, C>, ) -> re_query_cache2::Result<()> { - let (front_status, back_status) = results.status(query.range()); + let (front_status, back_status) = results.status(); match front_status { PromiseResult::Pending => return Ok(()), PromiseResult::Error(err) => return Err(re_query_cache2::QueryError::Other(err.into())), diff --git a/crates/re_space_view_time_series/src/line_visualizer_system.rs b/crates/re_space_view_time_series/src/line_visualizer_system.rs index 02c188dbeaf4..b51a249ec290 100644 --- a/crates/re_space_view_time_series/src/line_visualizer_system.rs +++ b/crates/re_space_view_time_series/src/line_visualizer_system.rs @@ -207,10 +207,10 @@ fn load_series( let all_scalars = results .get_required(Scalar::name())? .to_dense::(resolver); - let all_scalars_entry_range = all_scalars.entry_range(query.range()); + let all_scalars_entry_range = all_scalars.entry_range(); if !matches!( - all_scalars.status(query.range()), + all_scalars.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -250,7 +250,7 @@ fn load_series( let all_colors = all_colors.to_dense::(resolver); if !matches!( - all_colors.status(query.range()), + all_colors.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -260,11 +260,9 @@ fn load_series( .range_indices(all_scalars_entry_range.clone()) .map(|index| (index, ())); - let all_frames = re_query_cache2::range_zip_1x1( - all_scalars_indexed, - all_colors.range_indexed(query.range()), - ) - .enumerate(); + let all_frames = + re_query_cache2::range_zip_1x1(all_scalars_indexed, all_colors.range_indexed()) + .enumerate(); for (i, (_index, _scalars, colors)) in all_frames { if let Some(color) = colors.and_then(|colors| { @@ -290,7 +288,7 @@ fn load_series( let all_stroke_widths = all_stroke_widths.to_dense::(resolver); if !matches!( - all_stroke_widths.status(query.range()), + all_stroke_widths.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -302,7 +300,7 @@ fn load_series( let all_frames = re_query_cache2::range_zip_1x1( all_scalars_indexed, - all_stroke_widths.range_indexed(query.range()), + all_stroke_widths.range_indexed(), ) .enumerate(); diff --git a/crates/re_space_view_time_series/src/point_visualizer_system.rs b/crates/re_space_view_time_series/src/point_visualizer_system.rs index 305440cb48b2..a97df8c415bf 100644 --- a/crates/re_space_view_time_series/src/point_visualizer_system.rs +++ b/crates/re_space_view_time_series/src/point_visualizer_system.rs @@ -162,10 +162,10 @@ impl SeriesPointSystem { let all_scalars = results .get_required(Scalar::name())? .to_dense::(resolver); - let all_scalars_entry_range = all_scalars.entry_range(query.range()); + let all_scalars_entry_range = all_scalars.entry_range(); if !matches!( - all_scalars.status(query.range()), + all_scalars.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -205,7 +205,7 @@ impl SeriesPointSystem { let all_colors = all_colors.to_dense::(resolver); if !matches!( - all_colors.status(query.range()), + all_colors.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -217,7 +217,7 @@ impl SeriesPointSystem { let all_frames = re_query_cache2::range_zip_1x1( all_scalars_indexed, - all_colors.range_indexed(query.range()), + all_colors.range_indexed(), ) .enumerate(); @@ -245,7 +245,7 @@ impl SeriesPointSystem { let all_marker_sizes = all_marker_sizes.to_dense::(resolver); if !matches!( - all_marker_sizes.status(query.range()), + all_marker_sizes.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -257,7 +257,7 @@ impl SeriesPointSystem { let all_frames = re_query_cache2::range_zip_1x1( all_scalars_indexed, - all_marker_sizes.range_indexed(query.range()), + all_marker_sizes.range_indexed(), ) .enumerate(); @@ -277,7 +277,7 @@ impl SeriesPointSystem { let all_marker_shapes = all_marker_shapes.to_dense::(resolver); if !matches!( - all_marker_shapes.status(query.range()), + all_marker_shapes.status(), (PromiseResult::Ready(()), PromiseResult::Ready(())) ) { // TODO(#5607): what should happen if the promise is still pending? @@ -289,7 +289,7 @@ impl SeriesPointSystem { let all_frames = re_query_cache2::range_zip_1x1( all_scalars_indexed, - all_marker_shapes.range_indexed(query.range()), + all_marker_shapes.range_indexed(), ) .enumerate();