Skip to content

Enable antialiasing for the canvas. - #6065

Merged
bors-servo merged 3 commits into
servo:masterfrom
mmatyas:canvas_antialias
May 28, 2015
Merged

bors-servo merged 3 commits into
servo:masterfrom
mmatyas:canvas_antialias

Conversation

@mmatyas

@mmatyas mmatyas commented May 15, 2015

Copy link
Copy Markdown
Contributor

This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 15, 2015
@hoppipolla-critic-bot

Copy link
Copy Markdown

Critic review: https://critic.hoppipolla.co.uk/r/5010

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@mmatyas

mmatyas commented May 15, 2015

Copy link
Copy Markdown
Contributor Author

Unfortunately, I couldn't run the test on the current master due to #6042, but it worked fine and looked great before I rebased.

@jdm

jdm commented May 15, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review +S-needs-code-changes
This just needs ./mach update-cargo additions and it's ready to go!


Review status: :shipit: all files reviewed, all discussions resolved, all commit checks successful.
Reviewed files:

  • components/canvas/canvas_paint_task.rs @ r1
  • components/gfx/paint_context.rs @ r1

Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 15, 2015
@mmatyas
mmatyas force-pushed the canvas_antialias branch from bd18657 to 33fbce7 Compare May 15, 2015 17:21
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels May 15, 2015
@mmatyas

mmatyas commented May 15, 2015

Copy link
Copy Markdown
Contributor Author

Done!

@jdm

jdm commented May 15, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 33fbce7 has been approved by jdm

@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 15, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 33fbce7 with merge 8d0ad1f...

bors-servo pushed a commit that referenced this pull request May 15, 2015
This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6065)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac2

@mmatyas

mmatyas commented May 15, 2015

Copy link
Copy Markdown
Contributor Author

Well, as expected.

@jdm

jdm commented May 15, 2015

Copy link
Copy Markdown
Member
    acid1_a.html == acid1_b.html
    acid2_noscroll.html == acid2_ref_broken.html
    border_code_tag.html == border_code_tag_ref.html
    borders_a.html == borders_b.html
    box_shadow_spread_a.html == box_shadow_spread_ref.html
    clip_a.html == clip_ref.html
    inline_block_border_intrinsic_size_a.html == inline_block_border_intrinsic_size_ref.html
    inset.html == inset_ref.html
    linear_gradients_parsing_a.html == linear_gradients_parsing_ref.html
    linear_gradients_reverse_a.html == linear_gradients_reverse_ref.html
    outline_offset_a.html == outline_offset_ref.html
    outset.html == outset_ref.html

Do we need to make reftests explicitly disable antialiasing for canvases?

@jdm jdm added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels May 15, 2015
@larsbergstrom

Copy link
Copy Markdown
Contributor

We already do for text AA:
https://github.com/servo/servo/blob/master/tests/reftest.rs#L253-L254

Oh, and if we add a flag and make that change here, we will probably need it in the WPT test runner, too.

lglearn referenced this pull request in servo/rust-azure May 17, 2015
@mmatyas
mmatyas force-pushed the canvas_antialias branch from 33fbce7 to 23f760e Compare May 19, 2015 10:17
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels May 19, 2015
@mmatyas

mmatyas commented May 19, 2015

Copy link
Copy Markdown
Contributor Author

I've added an antialias flag for the canvas, but now mach test-ref hangs after counting the tests. Did I miss something?

@mmatyas
mmatyas force-pushed the canvas_antialias branch from 23f760e to 2ff2891 Compare May 19, 2015 10:33
@mmatyas

mmatyas commented May 19, 2015

Copy link
Copy Markdown
Contributor Author

The test runner works with the new flag now, but what would be the preferred way to handle antialiasing? Since it can be used many places other than fonts and canvas (eg. CSS borders), should we define a global antialias flag? Or set the default to 'off' for now, then add support later maybe?

@pcwalton

Copy link
Copy Markdown
Contributor

Possibly it should be part of the PaintContext.

@jdm jdm removed the S-awaiting-review There is new code that needs to be reviewed. label May 21, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac1

@jdm

jdm commented May 22, 2015

Copy link
Copy Markdown
Member
/2dcontext/path-objects/2d.path.arcTo.shape.curve2.html
-------------------------------------------------------
FAIL arcTo() curves in the right kind of shape
/2dcontext/path-objects/2d.path.arcTo.shape.curve1.html
-------------------------------------------------------
FAIL arcTo() curves in the right kind of shape

@jdm jdm added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels May 22, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #6196) made this pull request unmergeable. Please resolve the merge conflicts.

@mmatyas
mmatyas force-pushed the canvas_antialias branch from 7579c8d to 8cd0d0c Compare May 28, 2015 12:11
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels May 28, 2015
@mmatyas

mmatyas commented May 28, 2015

Copy link
Copy Markdown
Contributor Author

Rebased, and, because I don't know when #6042 will get fixed, I've turned those two test off for now.

@jdm

jdm commented May 28, 2015

Copy link
Copy Markdown
Member

Could you squash the last two commits in with the others?

@jdm jdm added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 28, 2015
@mmatyas
mmatyas force-pushed the canvas_antialias branch from 8cd0d0c to f4c0bd3 Compare May 28, 2015 16:43
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 28, 2015
@mmatyas

mmatyas commented May 28, 2015

Copy link
Copy Markdown
Contributor Author

Like this?

@jdm

jdm commented May 28, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit f4c0bd3 has been approved by jdm

bors-servo pushed a commit that referenced this pull request May 28, 2015
This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6065)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit f4c0bd3 with merge c97c0a9...

@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-squash Some (or all) of the commits in the PR should be combined. labels May 28, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux1, linux2, mac1, mac2

@bors-servo
bors-servo merged commit f4c0bd3 into servo:master May 28, 2015
@mmatyas
mmatyas deleted the canvas_antialias branch November 14, 2016 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants