Closed Bug 1347469 Opened 7 years ago Closed 7 years ago

Add gradient border support in quantum render.

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mtseng, Assigned: mtseng)

References

Details

Attachments

(2 files)

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: → 1341101
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 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+
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: