mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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:
@@ -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()]);
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user