Commit Graph

2506 Commits

Author SHA1 Message Date
Bas Schouten
546415cd2c Bug 1536229: Remove NS_RELEASE_ASSERT that is being tripped and seems to be unnecessary. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D29105

--HG--
extra : rebase_source : 4dd690f83fb2d1e922a8fd41834d5d8595861883
2019-04-27 17:31:49 +00:00
Lee Salzman
e12dc53ba3 Bug 1544188 - check cleartype level for WR DWrite fonts. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D27563

--HG--
extra : moz-landing-system : lando
2019-04-18 15:58:22 +00:00
Botond Ballo
6bb3e05a9d Bug 1543501 - Add operator<< to ScaleFactor. r=kats
This allows it to be used more easily with MOZ_DBG().

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

--HG--
extra : moz-landing-system : lando
2019-04-12 16:49:00 +00:00
Lee Salzman
4140aef08f Bug 1511131 - init UnscaledFontFreeType's face from file when creating scaled fonts. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D27126

--HG--
extra : moz-landing-system : lando
2019-04-12 12:48:56 +00:00
Jean-Yves Avenard
d91ea6eb87 Bug 1540581 - P9. Add R16G16 type and update of P010/P016 resource update. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D26464

--HG--
extra : moz-landing-system : lando
2019-04-11 12:37:23 +00:00
Jean-Yves Avenard
11ac9e9cf8 Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods

I probably missed some, it quickly became a rabbit hole.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:51 +00:00
Jean-Yves Avenard
e5f2be092a Bug 1540581 - P5. Add ColorSpace info to MacIOSurface. r=mattwoodrow
It would have been nicer and more logical to use a MacIOSurfaceImage to store the colorspace information, however the data passed around is a IOSurface Id via a SurfaceDescriptorMacIOSurface; the original data structure isn't kept; so we must transit the data at the same time as the IOSurface Id.

Also remove unnecessary test (new operator is infallible).

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:31 +00:00
Jean-Yves Avenard
3ae43eb506 Bug 1493898 - P6. Move YUVColorSpace definition in the gfx namespace. r=mattwoodrow.
YUVColorSpace is inseparable from the bit depth as the matrix coefficients to be calculated need the bit depth information.

So let's put the two types together. gfx namespace also makes more sense as that's where we find IntRect, IntSize and other.

The extent of the changes highlight how much similar data structures are duplicated across the code, to the point it's scary.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:41:33 +00:00
Andreea Pavel
4146c75e78 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-06 13:58:33 +03:00
Bas Schouten
d3803cedc6 Bug 1538666: Fix typo in PathCapture::TransformedCopyToBuilder. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D26335

--HG--
extra : rebase_source : 82cf8458d06c98de595afa6656a4712957ece96f
2019-04-05 17:59:17 +02:00
Sylvestre Ledru
03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Gerald Squelart
e2d15a1cfb Bug 1429613 - Variant matcher callbacks renamed from match to operator() - r=froydnj
Mechanical change from Matcher::match(...) to Matcher::operator()(...).
This will now permit the use of generic lambdas, and facilitate the
implementation of multi-lambda match.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 11:53:47 +00:00
Sylvestre Ledru
ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Lee Salzman
552e417755 Bug 1539026 - Skia m74 Moz2D fixes. r=rhunt 2019-03-26 11:06:56 -04:00
Jeff Gilbert
758e836333 No bug - clang-format -p gfx 2019-03-29 23:41:48 -07:00
Lee Salzman
fad3958ac4 Bug 1495400 - don't draw non-scalable FT faces as paths. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D24416

--HG--
extra : moz-landing-system : lando
2019-03-22 17:52:48 +00:00
Mike Hommey
f065aaf078 Bug 1537673 - Remove remaining useless CC_TYPE test. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D24314

--HG--
extra : moz-landing-system : lando
2019-03-21 13:22:02 +00:00
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
Daniel Varga
358f816f63 Merge mozilla-inbound to mozilla-central. a=merge 2019-03-19 11:50:28 +02:00
Jeff Gilbert
52d58f2a74 Bug 1533527 - Forbid non-size_t calls to malloc and calloc. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D22627
2019-03-18 13:47:18 -07:00
Kartikaya Gupta
6743c7ace2 Bug 1536128 - Make apz.printtree work on non-debug builds. r=botond
This eliminates the need to additionally modify gfx.logging.level on
non-debug builds to make apz.printtree output show up.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 18:42:04 +00:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Andreea Pavel
5a60df453a Backed out changeset 5f7ea2187fa6 (bug 1533527) for build bustages on a CLOSED TREE 2019-03-10 03:50:15 +02:00
Jeff Gilbert
8235aa9f56 Bug 1533527 - Forbid non-size_t calls to malloc and calloc. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D22627

--HG--
extra : moz-landing-system : lando
2019-03-09 17:40:54 +00:00
Emilio Cobos Álvarez
cd9ccbbe42 Bug 1533142 - followup: Fix Windows MinGW bustage. r=me 2019-03-07 00:34:19 +01:00
Emilio Cobos Álvarez
cb19991fd7 Bug 1533142 - Use more cbindgen features. r=kats
We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 23:01:11 +00:00
Bas Schouten
ef0300b3f8 Bug 1521774 - Part 2: Ensure a device is available when attempting to create a device context. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D21899

--HG--
extra : rebase_source : e193dac57302af15820bfaa774540797cde2a0c3
2019-03-04 10:33:19 +01:00
Jeff Muizelaar
4febae72fc Bug 1495170. Use CreateClippedDrawTarget more. r=mstange
This lets us restrict the size of the mask surface that we allocate
to the destination tile size. This gives a large performance
improvement.

It also includes some miscelanous fixes to the CreateClippedDrawTarget
code path.

Differential Revision: https://phabricator.services.mozilla.com/D21750
2019-03-04 22:30:09 -05:00
Jeff Muizelaar
acbf363d37 Bug 1495170. Handle mask offsets.
Differential Revision: https://phabricator.services.mozilla.com/D21749
2019-03-04 22:30:08 -05:00
Jeff Muizelaar
967d03ef66 Bug 1531532. Use preTranslate instead of postTranslate when correcting for the mask offset. r=mattwoodrow
DTO = DrawTargetOffset = (-Origin.x, -Origin.y)
CTM = CurrentTransform
MASKT = MaskTransform = Inv(CurrentTransform)
MASKO = MaskOffset = (GetRect().x, GetRect().y)

The transform to device space is:

MASKT * CTM * DTO

Currently we do:
MASKT = MASKT * MASKO

Which gives us MASKT * MASKO * CTM * DTO. This works fine if there's no scale but
will not properly cancel out if there is.

I believe we want:
MASKO * MASKT * CTM * DTO

To get this we need to preTranslate instead of postTranslate.

Differential Revision: https://phabricator.services.mozilla.com/D21604
2019-03-04 22:30:06 -05:00
Gurzau Raul
6b94d177d1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Lee Salzman
a330f87601 Bug 1530471 - remove Moz2D/thebes SkiaGL glue r=jrmuizel
Depends on D21052

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

--HG--
extra : moz-landing-system : lando
2019-02-28 14:59:16 +00:00
Emilio Cobos Álvarez
b7bb398730 Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-26 06:01:34 -08:00
Ryan Hunt
85ff4bdc33 Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
2019-02-25 16:07:19 -06:00
Cosmin Sabou
a499294d09 Backed out 4 changesets (bug 1516454, bug 1530247) for multiple failures on Linux x64 asan. CLOSED TREE
Backed out changeset 180c7672c57c (bug 1516454)
Backed out changeset a460a4d0a66c (bug 1516454)
Backed out changeset c6ab8d3dd19a (bug 1530247)
Backed out changeset 43862dc87e0b (bug 1516454)
2019-02-26 00:49:27 +02:00
Emilio Cobos Álvarez
b411b3894d Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-25 12:42:31 -08:00
Chris Peterson
e77882620f Bug 1528881 - Part 4: gfx/2d: Make some global functions static. r=lsalzman
And #include "BufferUnrotate.h" in BufferUnrotate.cpp for BufferUnrotate() function prototype.

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

gfx/2d/BufferUnrotate.cpp:17:6 [-Wmissing-prototypes] no previous prototype for function 'BufferUnrotate'
gfx/2d/DrawTargetCairo.cpp:195:6 [-Wmissing-prototypes] no previous prototype for function 'ReleaseData'
gfx/2d/DrawTargetCairo.cpp:201:18 [-Wmissing-prototypes] no previous prototype for function 'CopyToImageSurface'
gfx/2d/DrawTargetCairo.cpp:239:18 [-Wmissing-prototypes] no previous prototype for function 'GetAsImageSurface'
gfx/2d/DrawTargetCairo.cpp:251:18 [-Wmissing-prototypes] no previous prototype for function 'CreateSubImageForData'
gfx/2d/DrawTargetCairo.cpp:272:18 [-Wmissing-prototypes] no previous prototype for function 'ExtractSubImage'
gfx/2d/DrawTargetCairo.cpp:308:18 [-Wmissing-prototypes] no previous prototype for function 'GetCairoSurfaceForSourceSurface'
gfx/2d/DrawTargetRecording.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetRecording.cpp:272:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingFontUserDataDestroyFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:358:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordFontUserDataDestroyFunc'
gfx/2d/FilterNodeSoftware.cpp:1816:6 [-Wmissing-prototypes] no previous prototype for function 'IsAllZero'
gfx/2d/FilterNodeSoftware.cpp:183:37 [-Wmissing-prototypes] no previous prototype for function 'CloneAligned'
gfx/2d/MacIOSurface.cpp:442:6 [-Wmissing-prototypes] no previous prototype for function 'MacIOSurfaceBufferDeallocator'
gfx/2d/QuartzSupport.mm:38:6 [-Wmissing-prototypes] no previous prototype for function 'cgdata_release_callback'
gfx/2d/ScaledFontMac.cpp:191:10 [-Wmissing-prototypes] no previous prototype for function 'CalcTableChecksum'
gfx/2d/ScaledFontMac.cpp:224:5 [-Wmissing-prototypes] no previous prototype for function 'maxPow2LessThan'
gfx/2d/unittest/TestCairo.cpp:12:6 [-Wmissing-prototypes] no previous prototype for function 'TryCircle'

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

--HG--
extra : rebase_source : b42bce33ed899caeb89e462d99a5cde29a9bb559
extra : intermediate-source : 7923cc86a6394bcd2fb3b7e38f458a5180d31e11
extra : source : 02388f2454e8842d2c023bf9f9fab222d8130093
2019-02-16 18:08:30 -08:00
Masatoshi Kimura
e59e3b3e20 Bug 1528651 - Fix some trivial warnings and re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : 5ee9efeda9e67f6af0521be85266703763cc4c50
2019-02-19 20:42:11 +09:00
Sylvestre Ledru
41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Makoto Kato
e9230ae06d Bug 1526737 - Enable moz2d's NEON even if windows/aarch64. r=jrmuizel,dmajor
Bug 1516062 turns on NEON when using gcc and clang. But windows compiler uses
clang-cl, so I would like to turn on it even if windows.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 16:21:26 +00:00
Bas Schouten
fea87b2298 Bug 1521774: Ensure a DC is available when using the generic dc on the main thread. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D19146

--HG--
extra : rebase_source : d7f0135c283e0ed84667d896467c26447e9c2cf8
2019-02-08 14:52:05 +01:00
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Bas Schouten
a3c4519183 Bug 1521368 - Part 3: Ensure DrawTargetDual properly implements IsValid(). r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D18383

--HG--
extra : rebase_source : a9af7a64f274c89a48c3aedb05f77d0d63fcfa2e
2019-02-01 21:22:48 +01:00
Bas Schouten
296f494160 Bug 1524554: Ensure Canvas surfaces are initialized on the main thread and ensure their validity. r=rhunt
This isn't the prettiest solution but it's minimally invasive. More long-term a better solution may be to expose a call on DrawTargets to ensure their initialization even if they're on the main thread. IsValid probably isn't a good candidate for this as we want it to be usable freely on the main thread to ensure none of the basic conditions of the surface are still valid.

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

--HG--
extra : rebase_source : 2b2f05a247ea8c6896288624c5620501592e3dcc
2019-02-01 13:18:55 +01:00
Bas Schouten
5382fe49af Bug 1521368 - Part 2: Ensure destination DT is valid when replaying SourceSurfaceCapture. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D18239

--HG--
extra : rebase_source : 5b3422070eae74e795cacd48cd401a5c02ce27d5
2019-01-31 17:28:46 +01:00