mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 10:38:11 +08:00
Improve rendering efficiency and add caching (#95)
Fixes #84 *Reduce heap allocations * Add caching for rendering svgs * Deduplicate UpdateCanvas Responses
This commit is contained in:
committed by
Keavon Chambers
parent
5f1620b008
commit
cb9d34c84d
@@ -29,7 +29,7 @@ impl fmt::Display for LayerType {
|
||||
#[repr(C)]
|
||||
// TODO - Make Copy when possible
|
||||
pub enum DocumentResponse {
|
||||
UpdateCanvas { document: String },
|
||||
DocumentChanged,
|
||||
CollapseFolder { path: Vec<LayerId> },
|
||||
ExpandFolder { path: Vec<LayerId>, children: Vec<LayerPanelEntry> },
|
||||
}
|
||||
@@ -37,7 +37,7 @@ pub enum DocumentResponse {
|
||||
impl fmt::Display for DocumentResponse {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let name = match self {
|
||||
DocumentResponse::UpdateCanvas { .. } => "UpdateCanvas",
|
||||
DocumentResponse::DocumentChanged { .. } => "DocumentChanged",
|
||||
DocumentResponse::CollapseFolder { .. } => "CollapseFolder",
|
||||
DocumentResponse::ExpandFolder { .. } => "ExpandFolder",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user