Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF support for the demo #384

Merged
merged 4 commits into from Jul 7, 2020
Merged

PDF support for the demo #384

merged 4 commits into from Jul 7, 2020

Conversation

@s3bk
Copy link
Contributor

s3bk commented Jul 4, 2020

No description provided.

Cargo.toml Outdated
pathfinder_simd = { path = "simd" }
pathfinder_renderer = { path = "renderer" }
pathfinder_content = { path = "content" }
pathfinder_color = { path = "color" }

This comment has been minimized.

@pcwalton

pcwalton Jul 6, 2020

Collaborator

Please squash these commits into one

@@ -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.

@pcwalton

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.

@s3bk

s3bk Jul 6, 2020

Author Contributor

fixed

@@ -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.

@pcwalton

pcwalton Jul 6, 2020

Collaborator

Maybe OpenFile?

@@ -114,7 +114,7 @@ pub struct OcularTransform {
}

#[derive(Clone)]
pub enum SVGPath {
pub enum DataPath {

This comment has been minimized.

@pcwalton

pcwalton Jul 6, 2020

Collaborator

Maybe FilePath?

This comment has been minimized.

@s3bk

s3bk Jul 6, 2020

Author Contributor

Technically, it doesn't have to be a file… I could see URLs useful too.
Maybe DataSource?

demo/common/src/lib.rs Outdated Show resolved Hide resolved
@s3bk
Copy link
Contributor Author

s3bk commented Jul 6, 2020

How about putting the PDF part behind a feature flag? It is a bit fragile…

@s3bk s3bk force-pushed the s3bk:PR-pdf branch from 288398a to 80f9e87 Jul 6, 2020
@s3bk s3bk force-pushed the s3bk:PR-pdf branch from 80f9e87 to fa47d5a Jul 6, 2020
@pcwalton
Copy link
Collaborator

pcwalton commented Jul 6, 2020

It's just the demo. Lots of things in the demo are fragile. I'm not worried about it :)

@pcwalton
Copy link
Collaborator

pcwalton commented Jul 7, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jul 7, 2020

📌 Commit dec6fa0 has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented Jul 7, 2020

Testing commit dec6fa0 with merge 0bf0f58...

@bors-servo
Copy link
Contributor

bors-servo commented Jul 7, 2020

☀️ Test successful - checks-travis
Approved by: pcwalton
Pushing 0bf0f58 to master...

@bors-servo bors-servo merged commit 0bf0f58 into servo:master Jul 7, 2020
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.