Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Kearwood "Kip" Gilbert 55278c6768 Bug 1532375 - Implement Matrix4x4Double and QuaternionDouble r=lsalzman
The upcoming WebXR API (Bug 1419190) requires intermediate calculations of real-world space coordinates to have more precision with larger ranges. I expect that double precision matrix and quaternions will also be useful in other graphics and layout work.

It would not be ideal to expand the existing classes to always use double precision, as it would incur a significant performance penalty on certain platforms (eg, Arm). The double-precision variants should be used only when required.

The existing gfx::Matrix4x4 and gfx::Quaternion implementation can be extended with templates to generate both single and double precision variants.

Differential Revision: https://phabricator.services.mozilla.com/D22010

--HG--
extra : moz-landing-system : lando
2019-03-19 17:19:47 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Bas Schouten 051f79e412 Bug 1437492 - Part 1: Add a Matrix class with optimizations for simple matrices. r=mattwoodrow
MozReview-Commit-ID: EVrgqE0VlwM
2018-02-17 00:43:36 +01:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Kartikaya Gupta 8609d33dec Bug 1377090 - Further generify the Matrix class and define MatrixDouble. r=bas
To allow MatrixDouble to be a drop-in replacement for gfxMatrix, it
needs to accept the "double" versions of Point, Rect, and Size. This
patch does that by adding some extra typedefs inside BaseMatrix to
abstract over that.

It also moves some function implementations into the .h file as they
don't need specialization. I left some function implementations in
the Matrix.cpp file:
- Rotation, because it is specialized for Float and Double, since it uses
  sinf/cosf vs sin/cos in the two implementations.
- The Matrix4x4 multiplication operator overload, because if I put it
  inside the BaseMatrix class declaration Matrix4x4 isn't defined yet
  and the compiler doesn't like it.

MozReview-Commit-ID: K56dZjJhXWS

--HG--
extra : rebase_source : d009151942811a725ee6bf854238073e59665d5c
2017-07-05 11:18:49 -04:00
Kartikaya Gupta 1c54bb2347 Bug 1377090 - Make the Matrix class templated so we can instantiate it with a double type. r=bas
This extracts a BaseMatrix template of which Matrix is now a particular
specialization. The BaseMatrix allows us to reuse the same code for
floats and doubles, much like the other "base" classes (BasePoint,
BaseRect, etc.).

MozReview-Commit-ID: HO7bA83S9E0

--HG--
extra : rebase_source : dcd84d9a978cdea00bb54eb11eefcca9c6635901
2017-07-05 11:18:48 -04:00
Botond Ballo 0858698ac3 Bug 1069417 - Generalize Matrix4x4 into Matrix4x4Typed<SourceUnits, TargetUnits>. r=Bas
Matrix4x4 remains a typedef for Matrix4x4Typed<UnknownUnits, UnknownUnits>.

No client code needed changing, except for forward-declarations of Matrix4x4
as a class (since it's now a typedef).

--HG--
extra : rebase_source : ecd9470b9defcc55cfb9e7dbd26e928a6219c3e5
extra : source : 0fc99b5490830953f37a4d8769e42dad2d10bc6e
2015-12-02 18:52:00 -05:00