mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 02:37:26 +02:00
🎉 Improve performance reducing unnecessary calls to set-objects
This commit is contained in:
parent
e012046f62
commit
7728d5b317
20 changed files with 360 additions and 180 deletions
|
@ -1,7 +1,7 @@
|
|||
use skia_safe::{self as skia, Rect};
|
||||
|
||||
use super::Color;
|
||||
use uuid::Uuid;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[repr(C)]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::fmt;
|
||||
|
||||
use uuid::Uuid;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||
pub enum FontStyle {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::utils::uuid_from_u32_quartet;
|
||||
use uuid::Uuid;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[allow(dead_code)]
|
||||
|
|
|
@ -4,8 +4,6 @@ mod constraints;
|
|||
mod flex_layout;
|
||||
mod grid_layout;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
use common::GetBounds;
|
||||
|
||||
use crate::math::{identitish, Bounds, Matrix, Point};
|
||||
|
@ -13,6 +11,7 @@ use crate::shapes::{
|
|||
ConstraintH, ConstraintV, Frame, Group, Layout, Modifier, Shape, TransformEntry, Type,
|
||||
};
|
||||
use crate::state::State;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
fn propagate_children(
|
||||
shape: &Shape,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::collections::HashMap;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::math::Bounds;
|
||||
use crate::shapes::Shape;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
pub trait GetBounds {
|
||||
fn find(&self, shape: &Shape) -> Bounds;
|
||||
|
|
|
@ -4,8 +4,9 @@ use crate::shapes::{
|
|||
AlignContent, AlignItems, AlignSelf, FlexData, JustifyContent, LayoutData, LayoutItem,
|
||||
Modifier, Shape,
|
||||
};
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::common::GetBounds;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#![allow(dead_code, unused_variables)]
|
||||
use crate::math::{Bounds, Matrix, Point, Vector, VectorExt};
|
||||
use crate::shapes::{GridData, LayoutData, Modifier, Shape};
|
||||
use crate::uuid::Uuid;
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::common::GetBounds;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use skia_safe as skia;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::mem::SerializableResult;
|
||||
use crate::utils::{uuid_from_u32_quartet, uuid_to_u32_quartet};
|
||||
use crate::uuid::Uuid;
|
||||
use skia::Matrix;
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
|
@ -101,7 +101,7 @@ impl SerializableResult for TransformEntry {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use uuid::uuid;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue