mirror of https://github.com/penpot/penpot.git
🐛 Fix resize cache memory leak
This commit is contained in:
parent
44b70cf1d4
commit
9c21fd3359
|
|
@ -248,13 +248,8 @@ impl Surfaces {
|
|||
// The rest are tile size surfaces
|
||||
}
|
||||
|
||||
pub fn resize_cache(
|
||||
&mut self,
|
||||
gpu_state: &mut GpuState,
|
||||
cache_dims: skia::ISize,
|
||||
interest_area_threshold: i32,
|
||||
) {
|
||||
self.cache = gpu_state.create_surface_with_isize("cache".to_string(), cache_dims);
|
||||
pub fn resize_cache(&mut self, cache_dims: skia::ISize, interest_area_threshold: i32) {
|
||||
self.cache = self.target.new_surface_with_dimensions(cache_dims).unwrap();
|
||||
self.cache.canvas().reset_matrix();
|
||||
self.cache.canvas().translate((
|
||||
(interest_area_threshold as f32 * TILE_SIZE),
|
||||
|
|
|
|||
Loading…
Reference in New Issue