Skip to content

Commit

Permalink
シグニチャの変更など
Browse files Browse the repository at this point in the history
  • Loading branch information
mitoma committed Jan 19, 2025
1 parent 128f5fe commit 1c0861b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion font_rasterizer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ pub mod svg;
pub mod time;
pub mod vector_instances;
mod vector_vertex;
mod vector_vertex_buffer;
pub mod vector_vertex_buffer;
4 changes: 2 additions & 2 deletions font_rasterizer/src/rasterizer_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl RasterizerPipeline {
queue: &wgpu::Queue,
view_proj: ([[f32; 4]; 4], [[f32; 4]; 4]),
glyph_buffers: Option<(&GlyphVertexBuffer, &[&GlyphInstances])>,
vector_buffers: Option<(&VectorVertexBuffer<&str>, &[&VectorInstances<&str>])>,
vector_buffers: Option<(&VectorVertexBuffer<String>, &[&VectorInstances<String>])>,
screen_view: wgpu::TextureView,
) {
self.overlap_bind_group.update(view_proj);
Expand All @@ -406,7 +406,7 @@ impl RasterizerPipeline {
&self,
encoder: &mut wgpu::CommandEncoder,
glyph_buffers: Option<(&GlyphVertexBuffer, &[&GlyphInstances])>,
vector_buffers: Option<(&VectorVertexBuffer<&str>, &[&VectorInstances<&str>])>,
vector_buffers: Option<(&VectorVertexBuffer<String>, &[&VectorInstances<String>])>,
) {
let overlap_bind_group = &self.overlap_bind_group.bind_group;
let mut overlay_render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
Expand Down
8 changes: 8 additions & 0 deletions font_rasterizer/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ impl SvgBuffers {
.or_insert_with(|| VectorInstances::new(key.to_string(), device))
.push(instance)
}

pub fn vector_vertex_buffer(&self) -> &VectorVertexBuffer<String> {
&self.vertex_buffer
}

pub fn vector_instances(&self) -> Vec<&VectorInstances<String>> {
self.instances.values().collect()
}
}

#[allow(non_upper_case_globals)]
Expand Down

0 comments on commit 1c0861b

Please sign in to comment.