mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-08 00:05:00 +00:00
Set Raster<GPU> to have usize::MAX render complexity
This commit is contained in:
parent
30e9b3c5fd
commit
8b102d2507
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ pub trait RenderComplexity {
|
||||||
|
|
||||||
impl<T: RenderComplexity> RenderComplexity for Instances<T> {
|
impl<T: RenderComplexity> RenderComplexity for Instances<T> {
|
||||||
fn render_complexity(&self) -> usize {
|
fn render_complexity(&self) -> usize {
|
||||||
self.instance_ref_iter().map(|instance| instance.instance.render_complexity()).sum()
|
self.instance_ref_iter().map(|instance| instance.instance.render_complexity()).fold(0, usize::saturating_add)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ impl RenderComplexity for Raster<CPU> {
|
||||||
|
|
||||||
impl RenderComplexity for Raster<GPU> {
|
impl RenderComplexity for Raster<GPU> {
|
||||||
fn render_complexity(&self) -> usize {
|
fn render_complexity(&self) -> usize {
|
||||||
(self.width() * self.height()) as usize
|
usize::MAX // GPU textures can't have a thumbnail
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue