mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 13:08:12 +08:00
Implement viewport culling (#667)
* culling is working * fixed tests * Ready for review * cleanup * code review * Fix import Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
6f6c67a508
commit
a26a0ddfcf
@@ -42,10 +42,10 @@ impl Default for Document {
|
||||
|
||||
impl Document {
|
||||
/// Wrapper around render, that returns the whole document as a Response.
|
||||
pub fn render_root(&mut self, mode: ViewMode, font_cache: &FontCache) -> String {
|
||||
pub fn render_root(&mut self, mode: ViewMode, font_cache: &FontCache, culling_bounds: Option<[DVec2; 2]>) -> String {
|
||||
let mut svg_defs = String::from("<defs>");
|
||||
|
||||
self.root.render(&mut vec![], mode, &mut svg_defs, font_cache);
|
||||
self.root.render(&mut vec![], mode, &mut svg_defs, font_cache, culling_bounds);
|
||||
|
||||
svg_defs.push_str("</defs>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user