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

24 Коммитов

Автор SHA1 Сообщение Дата
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
Nicolas Silva 56e5119c61 Bug 1301027 - Remove the matrix * point operator and replace it with TransformPoint methods. r=Bas 2016-09-08 18:26:03 +02: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
Matt Woodrow 545885b406 Bug 1217012 - Use doubles when untransforming points since we need the extra precision. r=kip 2015-11-16 17:05:55 +13:00
Nicholas Nethercote a249f7cf80 Bug 1209206 (part 3) - Use sinf() and cosf() instead of sin() and cos() in a couple of places. r=Bas.
--HG--
extra : rebase_source : 0e282b829a48738fdcfde5b79c5ec3b36eb0bd06
2015-09-28 17:12:07 -07:00
Kearwood (Kip) Gilbert 5265775c94 Bug 1157984 - Part 2: Implement double precision clipping functions in Matrix4x4,r=vlad
- Implement Matrix4x4::TransformAndClipBounds
- Update methods in Matrix4x4 with templates, allowing for both single
  and double precision.

--HG--
extra : rebase_source : 6d5710a85bf5d82c441463debd98b31be4ec2ace
2015-08-06 17:26:03 -07:00
Kearwood (Kip) Gilbert 60dfc52e22 Bug 1181240 - Part 1: Copy methods from gfx3DMatrix,r=vlad
- Copied methods from gfx3DMatrix to Matrix4x4, gfxPoint, and gfxRect that
  with at double-precision floating point.
2015-07-09 16:27:38 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Kearwood (Kip) Gilbert 8371055034 Bug 766345 - Part 2 - Implement Matrix4x4::TransformAndClipRect (v2 Patch). r=vladimir
- Implemented Matrix4x4::TransformAndClipRect, which emulates
the frustum clipping behavior of the GPU.
2015-04-29 14:25:47 -07:00
Jeremy Chen 8061736c42 Bug 1152263 - Ensure Matrix4x4::ProjectRectBounds being functional for Rect with zero width/height. r=mattwoodrow 2015-04-13 03:10:00 -04:00
Vladimir Vukicevic 9a93b6f1a0 Bug 1148009; [webvr] Add Quaternion class to Moz2D; r=jrmuizel 2015-04-01 16:02:20 -04:00
Kearwood (Kip) Gilbert f97c17593c Bug 1035611 - Part 1: Updated Matrix4x4::ProjectRectBounds to properly handle infinite values when untransformed rects cross the w=0 plane. r=mattwoodrow
- Added specialized rect clipping functionality to Matrix4x4::ProjectRectBounds
  so we don't have to return infinite values when rects cross the w=0 plane
  in homogenous coordinate space.
- Updated callsites of ProjectRectBounds to pass a clipping rect that is
  appropriate for the units that are returned.

--HG--
extra : rebase_source : 9b1088a77e88259e2c32379ade23fbc2236596fb
2015-03-13 16:42:00 -04:00
Botond Ballo c3259de44b Bug 1120609 - Printing support for gfx::Matrix. r=Bas
--HG--
extra : rebase_source : 38e46208c14df09dc49c73c7fddfc3b5534efd4c
2015-01-19 11:29:16 -05:00
Robert O'Callahan 6e80dcb31b Bug 1081185. Traverse rect edges when searching for w=0 crossings instead of taking diagonals. r=mattwoodrow
--HG--
extra : rebase_source : c87d145abea750cf0d8b02f0ea387ec9148e6be1
2014-10-22 11:01:00 +13:00
Jonathan Watt 58325191a8 Bug 1065764, part 2 - Make Moz2D's Matrix::NudgeToIntegers() return a reference. r=Bas 2014-09-11 01:46:21 +01:00
David Zbarsky 1b247e50b6 Bug 952977: Switch some uses of gfx3DMatrix in nsLayoutUtils to Matrix4x4 r=nical 2014-08-22 09:40:02 -04:00
Rik Cabanier cab684d975 Bug 1018497 - Implementation of DOMMatrix. r=roc,bz 2014-06-24 20:15:00 +02:00
Matt Woodrow 18192455ba Bug 982318 - Add TransformBounds to Matrix4x4 so that we can stop assuming 2d matrices in TiledContentHost. r=Bas 2014-03-18 12:06:23 +08:00
Robert O'Callahan d70cc1420e Bug 772726. Part 8: Add Rect::NudgeToIntegers and share improved nudging code among all nudging APIs. r=bas 2012-09-12 17:24:09 +12:00
Robert O'Callahan f8eaf0bc83 Bug 772726. Part 6: Add NudgeToIntegers operation to Azure Matrix, add MultiplyAndNudgeToIntegers to gfxContext, and call it from SVG when we render path geometry, to ensure that small internal rounding errors in transforms don't cause unnecessary differences in rasterization of paths. r=bas 2012-09-05 12:15:52 +12:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Bas Schouten 189472e8c9 Bug 651858 - Part 1: Add the Azure API and Direct2D backend. r=jrmuizel sr=roc
--HG--
rename : gfx/src/BaseMargin.h => gfx/2d/BaseMargin.h
rename : gfx/src/BasePoint.h => gfx/2d/BasePoint.h
rename : gfx/src/BaseRect.h => gfx/2d/BaseRect.h
rename : gfx/src/BaseSize.h => gfx/2d/BaseSize.h
2011-06-24 19:41:16 +02:00