Skip to content

Commit

Permalink
make sure secondary plot components check out default values
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Aug 28, 2024
1 parent 68360ee commit 72d56c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ impl SeriesLineSystem {
})
}

if let Some(all_color_chunks) = results.get_required_chunks(&Color::name()) {
{
let all_color_chunks = results.get_optional_chunks(&Color::name());
if all_color_chunks.len() == 1 && all_color_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let color = all_color_chunks[0]
.iter_primitive::<u32>(&Color::name())
Expand Down Expand Up @@ -337,12 +338,12 @@ impl SeriesLineSystem {

debug_assert_eq!(StrokeWidth::arrow_datatype(), ArrowDatatype::Float32);

if let Some(all_stroke_width_chunks) =
results.get_required_chunks(&StrokeWidth::name())
{
let all_stroke_width_chunks = results.get_optional_chunks(&StrokeWidth::name());

if all_stroke_width_chunks.len() == 1 && all_stroke_width_chunks[0].is_static()
{
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let stroke_width = all_stroke_width_chunks[0]
.iter_primitive::<f32>(&StrokeWidth::name())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ impl SeriesPointSystem {
})
}

if let Some(all_color_chunks) = results.get_required_chunks(&Color::name()) {
{
let all_color_chunks = results.get_optional_chunks(&Color::name());

if all_color_chunks.len() == 1 && all_color_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let color = all_color_chunks[0]
.iter_primitive::<u32>(&Color::name())
Expand Down Expand Up @@ -353,11 +355,11 @@ impl SeriesPointSystem {

debug_assert_eq!(MarkerSize::arrow_datatype(), ArrowDatatype::Float32);

if let Some(all_marker_size_chunks) =
results.get_required_chunks(&MarkerSize::name())
{
let all_marker_size_chunks = results.get_optional_chunks(&MarkerSize::name());

if all_marker_size_chunks.len() == 1 && all_marker_size_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let marker_size = all_marker_size_chunks[0]
.iter_primitive::<f32>(&MarkerSize::name())
Expand Down Expand Up @@ -401,13 +403,14 @@ impl SeriesPointSystem {
{
re_tracing::profile_scope!("fill marker shapes");

if let Some(all_marker_shapes_chunks) =
results.get_required_chunks(&MarkerShape::name())
{
let all_marker_shapes_chunks =
results.get_optional_chunks(&MarkerShape::name());

if all_marker_shapes_chunks.len() == 1
&& all_marker_shapes_chunks[0].is_static()
{
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let marker_shape = all_marker_shapes_chunks[0]
.iter_component::<MarkerShape>()
Expand Down

0 comments on commit 72d56c2

Please sign in to comment.