mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 22:38:11 +08:00
Caching for resources is now used instead of ignored
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
use std::fs;
|
||||
use image::GenericImageView;
|
||||
|
||||
pub struct Texture {
|
||||
@@ -9,7 +10,7 @@ pub struct Texture {
|
||||
impl Texture {
|
||||
pub fn from_filepath(device: &wgpu::Device, queue: &mut wgpu::Queue, path: &str) -> Result<Self, failure::Error> {
|
||||
// Read the raw bytes from the specified file
|
||||
let bytes = std::fs::read(path)?;
|
||||
let bytes = fs::read(path)?;
|
||||
|
||||
// Construct and return a Texture from the bytes
|
||||
Texture::from_bytes(device, queue, &bytes[..])
|
||||
|
||||
Reference in New Issue
Block a user