Closed Bug 1476506 Opened 6 years ago Closed 6 years ago

mozilla::RoundedRect uses double precision

Categories

(Core :: Graphics, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(1 file)

This causes a bunch of pointless conversions, and means RoundedRect is defined outside of Moz2D. There's no need for that as far as I can tell. This patch addresses the issue.
Comment on attachment 8992843 [details]
Bug 1476506: Move RoundedRect into Moz2D and convert all callers.

https://reviewboard.mozilla.org/r/257692/#review264574
Attachment #8992843 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8992843 [details]
Bug 1476506: Move RoundedRect into Moz2D and convert all callers.

https://reviewboard.mozilla.org/r/257692/#review264576


Code analysis found 3 defects in this patch:
 - 3 defects found by clang-tidy

You can run this analysis locally with:
 - `./mach static-analysis check path/to/file.cpp` (C/C++)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: gfx/2d/Rect.h:347
(Diff revision 1)
>  }
>  
> +struct RectCornerRadii {
> +  Size radii[eCornerCount];
> +
> +  RectCornerRadii() {}

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

  RectCornerRadii() {}
  ^                 ~~
                    = default;

::: gfx/2d/Rect.h:347
(Diff revision 1)
>  }
>  
> +struct RectCornerRadii {
> +  Size radii[eCornerCount];
> +
> +  RectCornerRadii() {}

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

  RectCornerRadii() {}
  ^                 ~~
                    = default;

::: gfx/2d/Rect.h:347
(Diff revision 1)
>  }
>  
> +struct RectCornerRadii {
> +  Size radii[eCornerCount];
> +
> +  RectCornerRadii() {}

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

  RectCornerRadii() {}
  ^                 ~~
                    = default;
Pushed by bschouten@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8580f0233058
Move RoundedRect into Moz2D and convert all callers. r=mattwoodrow
https://hg.mozilla.org/mozilla-central/rev/8580f0233058
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: