Rename the Table type's "rows" -> "items" and "columns" -> "attributes" everywhere (#4130)

* Rename TableRow -> Item

* Rename row -> item and column -> attribute throughout

* Fix a few missed ones

* Format
This commit is contained in:
Keavon Chambers
2026-05-08 23:11:33 -07:00
committed by GitHub
parent cb21e5960b
commit 6b3e4757de
26 changed files with 554 additions and 550 deletions

View File

@@ -1,7 +1,7 @@
use crate::WgpuContext;
use crate::shader_runtime::{FULLSCREEN_VERTEX_SHADER_NAME, ShaderRuntime};
use core_types::shaders::buffer_struct::BufferStruct;
use core_types::table::{Table, TableRow};
use core_types::table::{Item, Table};
use futures::lock::Mutex;
use raster_types::{GPU, Raster};
use std::borrow::Cow;
@@ -233,8 +233,8 @@ impl PerPixelAdjustGraphicsPipeline {
rp.set_bind_group(0, Some(&bind_group), &[]);
rp.draw(0..3, 0..1);
let attributes = textures.clone_row_attributes(index);
TableRow::from_parts(Raster::new(GPU { texture: tex_out }), attributes)
let attributes = textures.clone_item_attributes(index);
Item::from_parts(Raster::new(GPU { texture: tex_out }), attributes)
})
.collect::<Table<_>>();
context.queue.submit([cmd.finish()]);

View File

@@ -3,7 +3,7 @@ use core_types::Color;
use core_types::Ctx;
use core_types::color::SRGBA8;
use core_types::ops::Convert;
use core_types::table::{Table, TableRow};
use core_types::table::{Item, Table};
use core_types::transform::Footprint;
use raster_types::Image;
use raster_types::{CPU, GPU, Raster};
@@ -155,7 +155,7 @@ impl<'i> Convert<Table<Raster<GPU>>, &'i WgpuExecutor> for Table<Raster<CPU>> {
let (image, attributes) = row.into_parts();
let texture = upload_to_texture(device, queue, &image);
TableRow::from_parts(Raster::new_gpu(texture), attributes)
Item::from_parts(Raster::new_gpu(texture), attributes)
})
.collect();
@@ -199,7 +199,7 @@ impl<'i> Convert<Table<Raster<CPU>>, &'i WgpuExecutor> for Table<Raster<GPU>> {
for row in self {
let (element, attributes) = row.into_parts();
converters.push(RasterGpuToRasterCpuConverter::new(device, &mut encoder, element));
rows_meta.push(TableRow::from_parts((), attributes));
rows_meta.push(Item::from_parts((), attributes));
}
queue.submit([encoder.finish()]);
@@ -219,7 +219,7 @@ impl<'i> Convert<Table<Raster<CPU>>, &'i WgpuExecutor> for Table<Raster<GPU>> {
.zip(rows_meta)
.map(|(element, row)| {
let (_, attributes) = row.into_parts();
TableRow::from_parts(element, attributes)
Item::from_parts(element, attributes)
})
.collect()
}