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

Convert src/display/svg.js to ES6 syntax and implement setRenderingIntent and setFlatness for the SVG backend #10674

Merged
merged 3 commits into from
Apr 6, 2019

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Mar 23, 2019

The commit messages contain more information about the individual changes.

The objective is to modernize the SVG backend and bring it more in line with the canvas back-end. Once this is done, it becomes easier to include the open pull requests for the SVG backend as well as working towards implementing reference testing for the SVG backend. The latter is now difficult because the canvas and SVG backend don't share a common interface. After this patch, we can start to extract a common interface and have both backends implement that so they can be interchanged more easily. After that, the remaining drawing code and the test driver need to be made backend-agnostic.

In short, this pull request is the first step towards this goal (part of the open "SVG backend" project).

I recommend to use the ?w=1 flag to considerably reduce the size of the diff.

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/7b561dc3fd5e84e/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/7b561dc3fd5e84e/output.txt

Total script time: 2.16 mins

Published

@timvandermeij timvandermeij added this to In progress in SVG back-end via automation Mar 23, 2019
@timvandermeij
Copy link
Contributor Author

@Snuffleupagus Would you perhaps, time permitting, be willing to review this?

@Snuffleupagus
Copy link
Collaborator

Would you perhaps, time permitting, be willing to review this?

I don't really have any experience working with the SVG code, so unfortunately I don't think I'll have time until the next weekend; but if you don't mind waiting I'll see what I can do :-)

@timvandermeij
Copy link
Contributor Author

No problem, and thanks!

src/display/svg.js Show resolved Hide resolved
src/display/svg.js Show resolved Hide resolved
src/display/svg.js Outdated Show resolved Hide resolved
src/display/svg.js Outdated Show resolved Hide resolved
src/display/svg.js Outdated Show resolved Hide resolved
In particular, this should reduce intermediate string creation by using
template strings and reduce variable lookup times by removing unneeded
variables and caching `this.current` in more places.
This mirrors the canvas implementation where we ignore these operators.
This avoids console spam regarding unimplemented operators we're not
interested in.

For the Tracemonkey paper, we're now down to one warning about tiling
patterns which is in fact a valid one.
…ping only once

There is no need to recompute this for every operator list we encounter.
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Apr 6, 2019

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/5027f3167aabe00/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 6, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/5027f3167aabe00/output.txt

Total script time: 1.83 mins

Published

@timvandermeij timvandermeij merged commit ce62373 into mozilla:master Apr 6, 2019
SVG back-end automation moved this from In progress to Done Apr 6, 2019
@timvandermeij timvandermeij deleted the svg-backend-es6 branch April 6, 2019 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
SVG back-end
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants