Commit Graph

2465 Commits

Author SHA1 Message Date
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
Jeff Muizelaar
0c609e94c7 Bug 1522021. Propagate input size to CreateSimilarDrawTarget for filters. r=mstange
This lets us avoid drawing the complete input for ever tile when
drawing filters into a tile.

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

--HG--
extra : moz-landing-system : lando
2019-01-27 23:36:04 +00:00
Jeff Muizelaar
93752e905d Bug 1522021. Implement SourceSurfaceOffset. r=mstange
This forwards to an underlying source surface but also has an origin that it
uses to correctly return results from GetRect()

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

--HG--
extra : moz-landing-system : lando
2019-01-25 23:06:24 +00:00
Jeff Muizelaar
b0d9cc5e6d Bug 1522310. Use GetRect() instead of IntRect(IntPoint(), GetSize()) in Filters code. r=mstange
This is needed so that we can use SourceSurfaces that don't have a
implicit 0,0 origin like those that would come from a DrawTargetTiled
or DrawTargetOffset.

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

--HG--
extra : moz-landing-system : lando
2019-01-25 23:03:16 +00:00
Bas Schouten
d8a0c14970 Bug 1522415: Properly track initialization state in case a device reset occurs during initialization. r=rhunt
This fixes a situation where a Device Reset occurs during initialization, after mDC has already been created but before mBitmap is created. In this case IsValid and EnsureInitialized would previously return 'true' in subsequent calls, since they were only checking for the DC.

This patch makes us properly store the full result of initialization for checking with IsValid and re-runs of EnsureInitialized.

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

--HG--
extra : rebase_source : a20480486c094e14c3a2f67e5f39b1efbece5c69
2019-01-24 12:37:28 +01:00
Lee Salzman
c7d1539b15 Bug 1455848 - use paths for WR font handles on Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D16896
2019-01-17 15:45:07 -05:00
Razvan Maries
6161f7cc5b Backed out 4 changesets (bug 1455848) for windows wrench failures. CLOSED TREE
Backed out changeset d56504db04ea (bug 1455848)
Backed out changeset f2279ecacb81 (bug 1455848)
Backed out changeset 44a36f0fe512 (bug 1455848)
Backed out changeset b8444f241aca (bug 1455848)
2019-01-24 00:56:40 +02:00
Lee Salzman
bd0b2ed9f0 Bug 1455848 - use paths for WR font handles on Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D16896
2019-01-17 15:45:07 -05:00
Sebastian Hengst
2ecf173b14 Merge mozilla-central to autoland 2019-01-23 11:31:44 +02:00
Bas Schouten
587e039c49 Bug 1521368: Forego drawing if our drawtarget is invalid, this can happen on a devicereset. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D17224

--HG--
extra : moz-landing-system : lando
2019-01-22 23:09:28 +00:00
Sylvestre Ledru
0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

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

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
Sylvestre Ledru
d1a9a5751d Bug 1521391 - Use the old code path with gcc to fix a build issue with gcc-8 r=bas
Differential Revision: https://phabricator.services.mozilla.com/D17083

--HG--
extra : moz-landing-system : lando
2019-01-21 17:45:28 +00:00
Bas Schouten
78d819cda0 Bug 1521008: Defer OptimizeSourceSurface to the paint thread if possible. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D16943

--HG--
extra : rebase_source : 9a1899759f631e7ffd9db3cd9333540b550b3884
2019-01-18 06:45:17 +01:00
Bas Schouten
4caf3dff6a Bug 1520909: Properly support SupportsRegionClipping in DrawTargetDual. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16899

--HG--
extra : rebase_source : 03ad075eb41e13b64686dd9939fe5dbcbb6e107e
extra : amend_source : 3ded96951d4ad113cbd55ff96c8cfbf8a4f4273a
2019-01-17 21:54:00 +01:00
Bas Schouten
e146ae8233 Bug 1520877 - Part 3: Implement FillRoundedRect for DrawTargetCapture. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16894

--HG--
extra : rebase_source : becf1b41cd67e82053804e293486400162cadf28
2019-01-17 20:34:21 +01:00
Bas Schouten
940959abd0 Bug 1520877 - Part 2: Implement FillRoundedRect for D2D. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16893

--HG--
extra : rebase_source : 47ea1c3907578f27743a0f3543553062b76953c8
2019-01-17 20:29:43 +01:00
Bas Schouten
f511ca965c Bug 1520877 - Part 1: Add an API for filling rounded rects. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16892

--HG--
extra : rebase_source : feacd6a039d18c9483ad940b1e142efdd13b87ed
2019-01-17 20:16:34 +01:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bas Schouten
5c3778d6dd Bug 1519739: Attempt to create Direct2D paths on the paint thread. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D16433

--HG--
extra : rebase_source : 98c1a0461d7498d2658de54ded796025c7a0beb6
2019-01-14 01:16:17 +01:00
Bas Schouten
7cbaee9bbb Bug 1519760: Attempt to initialize D2D off the main thread as much as possible. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D16432

--HG--
extra : rebase_source : d42875e3e87c6fd756d5de192387a36a0ec2dafd
2019-01-13 23:14:33 +01:00
Botond Ballo
8a9ba2ba40 Bug 1518584 - Add WithinEpsilonOf() functions to RectTyped and MarginTyped. r=kats
Also make a const-correctness fix to PointTyped::WithinEpsilonOf().

Depends on D15974

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

--HG--
extra : moz-landing-system : lando
2019-01-09 15:37:52 +00:00
Sylvestre Ledru
cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Makoto Kato
2fe6d4569a Bug 1516062 - Turn on NEON when using gcc or clang on aarch64 r=jrmuizel
Since we don't define BUILD_ARM_NEON on aarch64 due to bug 1303952, aarch64
doesn't turn on neon for moz2d.

Also, msvc don't have arm_neon.h [*1], so we should turn on neon on aarch64
excepting msvc.

*1 https://developercommunity.visualstudio.com/content/problem/201662/arm-neonh-doenst-support-arm64-compiler.html

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

--HG--
extra : moz-landing-system : lando
2018-12-26 16:27:08 +00:00
Kartikaya Gupta
b184eedbf0 Bug 1496194 - Add a RectAbsolute implementation for MoveInsideAndClamp. r=botond
Depends on D15135

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

--HG--
extra : moz-landing-system : lando
2018-12-21 22:31:55 +00:00
Kartikaya Gupta
04689eb8ea Bug 1496194 - Fix the MoveBy(Point) implementation in RectAbsolute. r=botond
RectAbsolute contained a MoveBy(Point) function where Point was not a
template parameter but the actual gfx::Point type. This seems to be an
unintentional copy/paste error. This patch fixes it to be properly
templated.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 22:11:26 +00:00
Lee Salzman
15294b0cbc Bug 1455848 - let UnscaledFontDWrite::GetWRFontDescriptor continue even if retrieving file names fails. r=jrmuizel 2018-12-18 11:19:26 -05:00
Ryan Hunt
592c67b24a Bug 1440937 - Add redundancy to capture command list format. r=mattwoodrow
--HG--
extra : rebase_source : f66b1cd2d284d6b683111c14393fc0ce58259f2e
extra : histedit_source : 37686c28650f6600b34bcd09e36bc1fa4a0f3de3
2018-11-29 09:43:05 -06:00
Lee Salzman
a5a039fbe6 Bug 1455848 - fix typo in LogWStr. r=me 2018-12-11 17:53:44 -05:00
Lee Salzman
4d142c7a81 Bug 1455848 - fix logging of wchar strings on MinGW builds. r=me 2018-12-11 17:16:21 -05:00
Lee Salzman
f7066e0fb7 Bug 1455848 - validate access to DWrite font files in WR and output helpful log messages on failure. r=jrmuizel 2018-12-11 15:58:02 -05:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Lee Salzman
a5f6c68080 Bug 1490537 - init and shutdown Skia in the GPU process. r=mattwoodrow 2018-11-29 18:09:46 -05:00
Ehsan Akhgari
2febd96e7e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:54:56 +00:00
Cosmin Sabou
0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Ehsan Akhgari
7c937c2747 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 21:36:18 +00:00
Andreea Pavel
945463d394 Backed out changeset 11d6688b953f (bug 1508472) for build bustages on a CLOSED TREE 2018-11-27 18:28:30 +02:00
Ehsan Akhgari
d0a3a76106 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 15:18:32 +00:00
Andrew Osmond
01269d4189 Bug 1504699 - Part 4. Add method to SharedSurfacesChild to cast to a shared surface. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D10900
2018-11-21 06:47:11 -05:00
Kartikaya Gupta
17eea57296 Bug 1466613 - Robustify DrawTargetRecording codepaths that create new drawtargets. r=mstange
Badly-behaved consumers of DrawTargetRecording can trigger recording of
draw calls that will fail to allocate required draw targets when the
recording is replayed. This patch tries to guard against this by
detecting these situations at record-time rather than crashing at
replay-time. When such a situation is detected, it will crash (for
content processes, to catch such scenarios) or gracefully fail (for
other processes).

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

--HG--
extra : moz-landing-system : lando
2018-11-13 10:39:02 +00:00
Kartikaya Gupta
88030616a1 Bug 1466613 - Add a gfxCriticalNote to provide more details on replay failure. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D8257

--HG--
extra : moz-landing-system : lando
2018-11-13 10:38:24 +00:00
Lee Salzman
0be53a4c8c Bug 1490704 - check rect size in RectIsInt32Safe. r=mattwoodrow 2018-11-12 17:09:12 -05:00