Add gradient border support in quantum render.

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: mtseng, Assigned: mtseng)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(2 attachments)

Recently, I added gradient border support in webrender. So we can support it in quantum render. And most of code would be shared with background gradient. I'll wait for the finishing of background gradient before doing this.
See Also: → bug 1341101
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8853326 [details]
Bug 1347469 - Add bindings for gradient border.

https://reviewboard.mozilla.org/r/125416/#review128084

LGTM

::: gfx/webrender_bindings/src/bindings.rs:1264
(Diff revision 1)
>  
>  #[no_mangle]
> +pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState, rect: WrRect, clip: WrRect,
> +                                             widths: WrBorderWidths,
> +                                             start_point: WrPoint, end_point: WrPoint,
> +                                             stops: * const WrGradientStop, stops_count: usize,

nit: remove space between * and const. Same for the other function
Attachment #8853326 - Flags: review?(bugmail) → review+

Comment 4

2 years ago
mozreview-review
Comment on attachment 8853327 [details]
Bug 1347469 - Add support for gradient border.

https://reviewboard.mozilla.org/r/125418/#review128158

::: layout/painting/nsDisplayList.cpp:4822
(Diff revision 1)
> +      float outset[4];
> +      NS_FOR_CSS_SIDES(i) {
> +        slice[i] = (float)(mBorderImageRenderer->mSlice.Side(i)) / appUnitsPerDevPixel;
> +        widths[i] = (float)(mBorderImageRenderer->mWidths.Side(i)) / appUnitsPerDevPixel;
> +        outset[i] = (float)(mBorderImageRenderer->mImageOutset.Side(i)) / appUnitsPerDevPixel;
> +      }

Please move these lines outside of the switch and share them with the case above.
Attachment #8853327 - Flags: review?(matt.woodrow) → review+

Comment 6

2 years ago
Pushed by mtseng@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/350d77ec1b74
Add bindings for gradient border. r=kats
https://hg.mozilla.org/projects/graphics/rev/b47985cfad21
Add support for gradient border. r=mattwoodrow
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
status-firefox55: --- → fixed
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.