Small improvements to cache (#130)
* Remove `Arc` around `RenderPipeline` It is not necessary anymore in last `wgpu` version. * Replace `RwLock` with `Mutex` It was only used for writing.
This commit is contained in:
parent
114cfa3e02
commit
505f12f6ce
3 changed files with 13 additions and 14 deletions
|
|
@ -2,7 +2,7 @@ use crate::{
|
|||
ColorMode, FontSystem, GlyphDetails, GlyphToRender, GpuCacheStatus, PrepareError, RenderError,
|
||||
SwashCache, SwashContent, TextArea, TextAtlas, Viewport,
|
||||
};
|
||||
use std::{num::NonZeroU64, slice, sync::Arc};
|
||||
use std::{num::NonZeroU64, slice};
|
||||
use wgpu::util::StagingBelt;
|
||||
use wgpu::{
|
||||
Buffer, BufferDescriptor, BufferUsages, CommandEncoder, DepthStencilState, Device, Extent3d,
|
||||
|
|
@ -15,7 +15,7 @@ pub struct TextRenderer {
|
|||
staging_belt: StagingBelt,
|
||||
vertex_buffer: Buffer,
|
||||
vertex_buffer_size: u64,
|
||||
pipeline: Arc<RenderPipeline>,
|
||||
pipeline: RenderPipeline,
|
||||
glyph_vertices: Vec<GlyphToRender>,
|
||||
glyphs_to_render: u32,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue