Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPDF support for the demo #384
Merged
+1,742
−1,535
Conversation
Cargo.toml
Outdated
| pathfinder_simd = { path = "simd" } | ||
| pathfinder_renderer = { path = "renderer" } | ||
| pathfinder_content = { path = "content" } | ||
| pathfinder_color = { path = "color" } |
This comment has been minimized.
This comment has been minimized.
demo/common/src/lib.rs
Outdated
| @@ -81,14 +83,19 @@ mod device; | |||
| mod renderer; | |||
| mod ui; | |||
|
|
|||
| enum Content { | |||
| Svg(SvgTree), | |||
| Pdf(PdfFile<Vec<u8>>, PdfRenderCache, u32) | |||
This comment has been minimized.
This comment has been minimized.
pcwalton
Jul 6, 2020
Collaborator
I think this should probably be a struct-like enum variant, so that we can give the u32 field a name.
This comment has been minimized.
This comment has been minimized.
| @@ -430,25 +435,22 @@ impl<W> DemoApp<W> where W: Window { | |||
| } | |||
| } | |||
|
|
|||
| Event::OpenSVG(ref svg_path) => { | |||
| Event::OpenData(ref data_path) => { | |||
This comment has been minimized.
This comment has been minimized.
| @@ -114,7 +114,7 @@ pub struct OcularTransform { | |||
| } | |||
|
|
|||
| #[derive(Clone)] | |||
| pub enum SVGPath { | |||
| pub enum DataPath { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
s3bk
Jul 6, 2020
Author
Contributor
Technically, it doesn't have to be a file… I could see URLs useful too.
Maybe DataSource?
|
How about putting the PDF part behind a feature flag? It is a bit fragile… |
|
It's just the demo. Lots of things in the demo are fragile. I'm not worried about it :) |
|
@bors-servo: r+ |
|
|
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
s3bk commentedJul 4, 2020
No description provided.