Commit Graph

7524 Commits

Author SHA1 Message Date
Zibi Braniecki
83ea94f5ba Bug 1491394 - Update callsites to use new mozILocaleService API. r=jfkthame
Depends on D5924

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

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:37 +00:00
Andrew Osmond
5f4c3fc4b2 Bug 1456558 - Part 2. Implement factor of 2 scaling support for SVGs in the surface cache. r=tnikkel
There is one main difference between raster images and vector images
with respect to factor of 2 scaling. Vector images may be scaled
infinitely and so we need to extend factor of 2 scaling to permit
growing instead of just shrinking. Also, we don't want to scale
infinitely, so we should configure a maximum size limit. This size limit
will apply even outside of factor of 2 scaling, and so the caller
(VectorImage) will need to be careful to take this into account.
2018-09-20 20:22:03 -04:00
Andreea Pavel
3805f6a285 Backed out 3 changesets (bug 1456558) for crashtest assertion failures on a CLOSED TREE
Backed out changeset 70d8f11cf6e8 (bug 1456558)
Backed out changeset af9fc3daf97c (bug 1456558)
Backed out changeset f209a9d848f4 (bug 1456558)
2018-09-21 02:13:41 +03:00
Andrew Osmond
f799e4bd72 Bug 1456558 - Part 2. Implement factor of 2 scaling support for SVGs in the surface cache. r=tnikkel
There is one main difference between raster images and vector images
with respect to factor of 2 scaling. Vector images may be scaled
infinitely and so we need to extend factor of 2 scaling to permit
growing instead of just shrinking. Also, we don't want to scale
infinitely, so we should configure a maximum size limit. This size limit
will apply even outside of factor of 2 scaling, and so the caller
(VectorImage) will need to be careful to take this into account.
2018-09-20 18:15:32 -04:00
Nathan Froyd
e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
Jonathan Kew
1b456cbb54 Bug 1492518 - Remove 16-bit version of GenerateFontListKey, no longer used anywhere. r=lsalzman 2018-09-20 14:23:26 +01:00
Jonathan Kew
aa3e389fe2 Bug 1492220 - Fix encoding-form mismatch in macOS impl of GetVariationAxes. r=lsalzman 2018-09-19 09:25:58 +01:00
Bas Schouten
3f601ce856 Bug 1479640: Restructure cleartype parameter code to run less frequently and only in the parent process. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D4784

--HG--
extra : moz-landing-system : lando
2018-09-13 18:59:27 +00:00
Jonathan Kew
ec73ee3318 Bug 1491860 - Use utf-8 rather than utf-16 strings to read/store font family names from preferences, as they're almost entirely ASCII. r=lsalzman 2018-09-18 09:34:24 +01:00
Jonathan Kew
0d4dbd1e37 Bug 1490997 - Use nsAtom instead of nsString for font family name in the FontFamilyName struct, and switch its methods from 16-bit to 8-bit strings. r=lsalzman 2018-09-18 09:34:21 +01:00
Andrew Osmond
8be55f0165 Bug 1337111 - Part 5. Add pref to force decoding of full frames, disabled by default. r=tnikkel 2018-09-17 15:06:29 -04:00
Coroiu Cristina
de5411772c Backed out 6 changesets (bug 1337111) for build bustages at builds/worker/workspace/build/src/image/SurfaceFilters.h on a CLOSED TREE
Backed out changeset ca0caa556dc9 (bug 1337111)
Backed out changeset d7d7fa868d0d (bug 1337111)
Backed out changeset 93e956e89a21 (bug 1337111)
Backed out changeset f36337c1309b (bug 1337111)
Backed out changeset 1b1e25b0b345 (bug 1337111)
Backed out changeset 3785cdebe6a3 (bug 1337111)
2018-09-17 20:42:30 +03:00
Andrew Osmond
f823b924c8 Bug 1337111 - Part 5. Add pref to force decoding of full frames, disabled by default. r=tnikkel 2018-09-17 13:21:38 -04:00
Dorel Luca
7a91966c10 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-15 12:46:59 +03:00
Bobby Holley
9942d41fd9 Bug 1491478 - Properly attribute the memory report when using the GPU process. r=mstange
MozReview-Commit-ID: Db9mz5jQKwG
2018-09-14 22:04:38 -07:00
Bobby Holley
45da216271 Bug 1491478 - Don't collect WR memory reports when it's not enabled. r=mstange
MozReview-Commit-ID: Ek2bgg2D3Bq
2018-09-14 22:04:23 -07:00
Bobby Holley
1909109298 Bug 1491478 - Move WebRender memory reporting back to gfxPlatform. r=me
This is how things looked when jrmuizel reviewed them.

MozReview-Commit-ID: Gqp1tcNzsjC
2018-09-14 22:03:49 -07:00
Jeff Muizelaar
3a0d8a821d Bug 1491141. Don't include old Tesla devices in webrender.qualified r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D5805

--HG--
extra : moz-landing-system : lando
2018-09-14 22:35:34 +00:00
David Major
2292c52f8f Bug 1491279: Backed out clang-cl workaround from bug 1479842 that is no longer needed. r=me 2018-09-14 08:30:56 -04:00
Jeff Muizelaar
9bcfb295a7 Bug 1490891. Support toggling paint flashing in blob images r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D5730

--HG--
extra : moz-landing-system : lando
2018-09-13 20:34:38 +00:00
Cosmin Sabou
5b41e41329 Backed out changeset 2f15d5f434d8 (bug 1490891) for reftests and crashtest failures. CLOSED TREE 2018-09-13 22:29:45 +03:00
Jeff Muizelaar
66aa4d36c4 Bug 1490891. Support toggling paint flashing in blob images r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D5730

--HG--
extra : moz-landing-system : lando
2018-09-13 17:08:43 +00:00
sotaro
76aef326b1 Bug 1490528 - do not preload attachments for D3D11 Non-WR compositor when WR is used r=mattwoodrow 2018-09-13 13:23:38 +09:00
Daniel Varga
296d94715f Merge mozilla-inbound to mozilla-central. a=merge 2018-09-13 05:30:59 +03:00
Jeff Muizelaar
1316d86812 Bug 1490742. Enable gfx.webrender.qualified.all on Nightly r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D5701

--HG--
extra : moz-landing-system : lando
2018-09-12 19:40:32 +00:00
Cameron McCormack
fe196275ba Bug 1489529 - Update comments to no longer point to nsRuleNode. r=emilio
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-12 17:37:37 +10:00
Lee Salzman
907071413e Bug 1486810 - round sizes in blur assertion. r=rhunt 2018-09-11 14:33:45 -04:00
Gerald Squelart
b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

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

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Mike Hommey
117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Gurzau Raul
d4d9bd916d Backed out changeset 9762d76da9b3 (bug 1480293) for failing at aboutmemory/tests/test_memoryReporters.xul 2018-09-14 22:32:18 +03:00
Bobby Holley
42a527b3d1 Bug 1480293 - Basic Memory Reporting for WebRender. r=jrmuizel
Reviewers: jrmuizel, gw

Tags: #secure-revision

Bug #: 1480293

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

MozReview-Commit-ID: 1vGl3890CjR
2018-09-14 10:59:00 -07:00
Jonathan Kew
6f42f167fb Bug 1490402 - Use UTF-8 strings (in place of UTF-16) for font family/face names in the system font list, to reduce memory footprint. r=lsalzman 2018-09-12 20:34:57 +01:00
Jonathan Kew
6428deabb4 Bug 1487553 - Use a more compact representation for gfxSparseBitSet. r=lsalzman 2018-09-06 00:04:30 +02:00
Bas Schouten
d9c0061198 Bug 1486875: Make it possible to skip composition or painting using environment variables. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D4526

--HG--
extra : moz-landing-system : lando
2018-09-04 00:18:11 +00:00
Tom Ritter
e34e47cde5 Bug 1480457 Don't pass 'false' into a pointer field; pass nullptr r=aklotz
MozReview-Commit-ID: FUA6jMwCV1d

Depends on D4571

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

--HG--
extra : moz-landing-system : lando
2018-08-30 12:08:27 +00:00
aceman
77d5a7fd81 Bug 1486311 - convert remaining nsIFile::GetDirectoryEntries() callers to pass in a nsIDirectoryEnumerator. r=kmag 2018-08-26 14:15:00 +03:00
Kris Maglione
d040edd44f Bug 1484496: Follow-up: Fix NoQueryNeeded assertion on Windows debug. r=bustage CLOSED TREE 2018-08-23 16:05:29 -07:00
Patrick Walton
b8b76ab4fe Bug 1485538 - Expose WebRender's "show overdraw" debug mode behind a pref. r=jrmuizel 2018-08-10 20:17:01 -07:00
Landry Breuil
984eaf80dd Bug 1457092 - Content sandbox codepaths are Linux only. r=gcp
--HG--
extra : rebase_source : e8c79bc0dfb1b8f03d2ceec98835f9f6ac7a4612
2018-08-22 05:27:00 -04:00
Brindusan Cristian
d21b936680 Merge inbound to mozilla-central. a=merge 2018-08-23 01:00:10 +03:00
Lee Salzman
5b4c63c8a1 Bug 1485358 - fix purging of missing glyph WebRender users. r=me 2018-08-22 11:12:33 -04:00
Daniel Holbert
5584dee150 Bug 1485161: Make gfxPlatform::GetDefaultFontName() return nsAutoString, to enable possibility of Return Value Optimization & to address build warning. r=jfkthame
This function uses a nsAutoString internally, and its caller stores its
returned value in a nsAutoString. So it's silly for us to have it return a
different type (nsString). With this change, the compiler should be able to
perform return value optimization and avoid the need for any
copying/reallocation of this function's return value.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 13:34:16 +00:00
Lee Salzman
bf12f26ad9 Bug 1479196 - draw missing glyphs from an atlas instead of rectangles. r=jfkthame 2018-08-21 12:40:36 -04:00
Tanushree Podder
efd8c4f4fb Bug 1357785 - Expose the Visual Viewport API to web content. r=botond, r=nika
--HG--
extra : amend_source : 8e5fe3e3195dd82aef19a4c79df31e2048024c99
2018-08-20 16:28:42 -04:00
Daosheng Mu
a0fe81c1da Bug 1430038 - Part 3: Construct IPC connection for VR/GPU process; r=kip, jimm, jgilbert
Summary: MozReview-Commit-ID: 2kOyfC4TFZP

Tags: #secure-revision

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

MozReview-Commit-ID: 17O2xbRMOFJ

--HG--
extra : rebase_source : fdf55e8542dd5487868cfe36fc27f447d95528de
2018-08-06 22:47:18 -07:00
Daosheng Mu
8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

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

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Nicolas Silva
0805d95b99 Bug 1482109 - Hook the memory pressure observer up with WebRender. r=sotaro
--HG--
extra : rebase_source : e23d9db4ffff5d1994f476e660f7f6cbe52e6ad6
2018-08-20 15:23:54 +02:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Ting-Yu Lin
316a8e0c1d Bug 1482665 Part 4 - Remove nsDeviceContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3157
2018-08-13 14:29:30 -07:00
Emilio Cobos Álvarez
f75cc9db05 Bug 1481905 - When canceling a user font load, make sure to not leave mUserFontLoadState as LOADING. r=jfkthame
Since that's what we use to kick off new loads, should they be needed.

Differential Revision: https://phabricator.services.mozilla.com/D3111
2018-08-12 15:30:45 +02:00