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

Check the aa_range before calculating the ellipse distance. #2158

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

demo99
Copy link
Contributor

@demo99 demo99 commented Dec 4, 2017

We always put the ellipse distance to distance_aa. We can avoid some unnecessary calculations if we precheck the distance with aa_range. It also helps gecko bug 1414575 2ms on my device. For the large-boxshadow-ellipse-2.yaml, without the patch, I got:

{
  "name": "benchmarks/large-boxshadow-ellipse-2.yaml",
  "backend_time_ns": 67797,
  "composite_time_ns": 7240335,
  "paint_time_ns": 5583450,
  "draw_calls": 5
},

with the patch:

{
  "name": "benchmarks/large-boxshadow-ellipse-2.yaml",
  "backend_time_ns": 63598,
  "composite_time_ns": 4920898,
  "paint_time_ns": 4163536,
  "draw_calls": 5
},

This change is Reviewable

@demo99
Copy link
Contributor Author

demo99 commented Dec 4, 2017

I'll have a gecko try later.

@demo99
Copy link
Contributor Author

demo99 commented Dec 5, 2017

@glennw
Copy link
Member

glennw commented Dec 5, 2017

Thanks!

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit dcad8be has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit dcad8be with merge 439dfef...

bors-servo pushed a commit that referenced this pull request Dec 5, 2017
Check the aa_range before calculating the ellipse distance.

We always put the ellipse distance to distance_aa. We can avoid some unnecessary calculations if we precheck the distance with aa_range. It also helps gecko [bug 1414575](https://bugzilla.mozilla.org/show_bug.cgi?id=1414575)  2ms on my device. For the large-boxshadow-ellipse-2.yaml, without the patch, I got:

    {
      "name": "benchmarks/large-boxshadow-ellipse-2.yaml",
      "backend_time_ns": 67797,
      "composite_time_ns": 7240335,
      "paint_time_ns": 5583450,
      "draw_calls": 5
    },

with the patch:

    {
      "name": "benchmarks/large-boxshadow-ellipse-2.yaml",
      "backend_time_ns": 63598,
      "composite_time_ns": 4920898,
      "paint_time_ns": 4163536,
      "draw_calls": 5
    },

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2158)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: glennw
Pushing 439dfef to master...

@bors-servo bors-servo merged commit dcad8be into servo:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants