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

30812 Коммитов

Автор SHA1 Сообщение Дата
Jeff Muizelaar 2475f58106 Bug 1485691. Update webrender to commit 93997662842b6d8bafbdb3dde79009c930db66ca 2018-08-23 15:47:39 -04:00
Lee Salzman 5285c599ca Bug 1485712 - set SkTypeface atomically in ScaledFonts. r=rhunt 2018-08-23 14:58:21 -04:00
Ryan Hunt a5cee657d8 Bug 1414389 - Remove use of RwAssert in CaptureCommandList. r=lsalzman
--HG--
extra : rebase_source : a657f30cd10bed422883c554f799ea4fc884f508
2018-08-21 17:54:20 -05:00
Gurzau Raul f9a81a3e5a Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-31 00:51:52 +03: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
Jeff Muizelaar 07e9250f5d Bug 1449634. Handle foreignobject better with blob invalidation. r=mstange
Turn off grouping and switch to regular WebRender building when
we encounter a foreignobject.

MozReview-Commit-ID: 6fHc4Ioi22N
2018-09-06 16:10:51 -04:00
Cosmin Sabou d141575366 Merge mozilla-central to mozilla-inbound. a=merge 2018-08-27 19:00:38 +03:00
Neil Deakin 5760447896 Bug 1478388, Remove now unused nsScriptableRegion.cpp and nsIScriptableRegion, r=mattwoodrow 2018-08-27 10:57:04 -04:00
Cosmin Sabou 164891642a Backed out changeset 1eb34707779f (bug 1482613) for causing android crashes in test_vrDisplay_canvas2d.
--HG--
extra : amend_source : f97559dc9494fbe0120035381d8903cfc62d2830
2018-08-24 00:10:57 +03:00
Nicolas Silva 4bc8a88453 Bug 1485593 - Avoid using isdigit. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D4066

--HG--
extra : moz-landing-system : lando
2018-08-23 11:50:55 +00:00
Brindusan Cristian d204b281a1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-23 06:45:33 +03:00
Jeff Muizelaar 92e5b037a8 Bug 1477448. Ensure ToDeviceSpace() preserves EmptyRects. r=mstange
MozReview-Commit-ID: 40qjwj3dpmp
2018-08-22 22:21:30 -04:00
Brindusan Cristian d2592042f8 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-23 01:02:39 +03:00
Brindusan Cristian d21b936680 Merge inbound to mozilla-central. a=merge 2018-08-23 01:00:10 +03:00
Jamie Nicol c0b13f02f6 Bug 1484101 - Ensure DrawTargetTiled::PadEdges is called with region in device space. r=rhunt
In MultiTiledContentClient we can create a DrawTargetTiled with a
different origin than the layer we are painting. We must therefore
ensure when edge-padding that we provide the valid region in the draw
target's device-space rather than layer-space. Not doing so was
causing us to pad out in incorrect directions, causing visible seams.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 16:29:52 +00:00
Noemi Erli e0e342c6ae Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-22 19:31:52 +03:00
Nicolas Silva 9bd631e865 Bug 1484624 - Don't create texture sources if the compositor doesn't have a GL context. r=sotaro 2018-08-22 13:59:15 +02:00
Nicolas Silva 808163871b Bug 1483459 - Avoid copying regions before converting them to rects throughout the gfx directory. r=sotaro
This patch was generated using a simple sed script:
sed -i 's/ToUnknownRegion().GetBounds()/GetBounds().ToUnknownRect()/g' gfx/**/*.cpp gfx/**/*.h

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

--HG--
extra : rebase_source : 4e9e7c9f2fb4ca60122712dd06632147cdec7195
2018-08-21 14:58:47 +02:00
Nicolas Silva 55a85b0bc0 Bug 1483459 - Don't needlessly copy regions in ContainerLayer::GetIntermediateSurfaceRect. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D3876

--HG--
extra : rebase_source : 3f615973f71fbaeed595663308e8ee34b77afd8b
2018-08-21 14:41:42 +02:00
Ryan VanderMeulen 63a5b2453c Bug 1483310 - Update HarfBuzz to version 1.8.8. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D3973

--HG--
extra : moz-landing-system : lando
2018-08-22 13:57:00 +00:00
Lee Salzman b457cc25bd Bug 1483120 - sum SkDashPath intervals instead of subtracting. r=rhunt 2018-08-22 15:19:33 -04:00
Andreea Pavel 883da574e8 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-22 06:35:14 +03:00
Daosheng Mu 90d9af9138 Bug 1485095 - Fix can't get VRSystemManagerExternal in Android. r=kip
MozReview-Commit-ID: F82UoWhVVWs

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

--HG--
extra : moz-landing-system : lando
2018-08-21 22:01:00 +00:00
Tiberius Oros 05b46cf200 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-22 00:59:19 +03:00
Dorel Luca b704584332 Merge mozilla-central to autoland 2018-08-21 19:03:25 +03:00
Ryan VanderMeulen 9966e32859 Bug 1483566 - Update Graphite2 to version 1.3.12. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D3426

--HG--
extra : moz-landing-system : lando
2018-08-21 13:58:42 +00:00
Andrew Osmond 7b5c6eb801 Bug 1452513 - Avoid issuing transactions with WebRender when the namespace has changed. r=kats
When the namespace changes (e.g. due to a tab move between windows), we
may get stale transaction requests that we need to ignore. In
WebRenderBridgeParent::RecvSetDisplayList, we would automatically send
any unsent transaction data when exiting the method, but this did not
take into account the staleness. This patch ensures we only flush the
data if we actually want it.

The transaction in question that was observed and causing crashes was
UpdateImageBuffer.
2018-08-21 08:29:09 -04:00
Brian Hackett 050b328fd7 Bug 1483256 - Use mozilla::Atomic in MemoryTextureReadLock, r=nical.
--HG--
extra : rebase_source : f555c3b8493390a34fc722bf1ebde115b0cdaf56
2018-08-21 01:00:40 +00:00
Jeff Muizelaar b0d05aed0d Bug 1483303. Update bindings for color masking of images.
This makes us build after pr #2969
2018-08-20 22:32:54 -04:00
Jeff Muizelaar 3f1b0144a3 Bug 1483303. Update webrender to commit e70bae07664def86aefd11c86dac818ab7ea64ea 2018-08-20 22:32:50 -04:00
Kearwood Gilbert 8fc883c938 Bug 1481327 - Part 2: Handle VR process shared memory.,r=kip
--HG--
extra : rebase_source : 9cd9aee74783c0817d8825aff7e7b3cef881fdab
2018-08-20 14:59:56 -07:00
Kearwood Gilbert a642b0a38b Bug 1481327 - Part 1: Launch VR service in VR process., r=kip,r=mccr8
--HG--
extra : rebase_source : 1de178356f2c4550f01635763e80fbd05b7b0c05
2018-08-20 14:58:28 -07:00
Jean-Yves Avenard efd5ec6e7a Bug 1245400 - P5. Report frames dropped with WebRender. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D2182
2018-08-22 17:26:37 +02:00
Jean-Yves Avenard ea40a439ac Bug 1245400 - P4. Remove no longer used class member. r=nical
Also speed up compositing videos as there's no longer need to check every single frames twice to determine if they were composited or not.

Differential Revision: https://phabricator.services.mozilla.com/D2178
2018-08-22 17:26:37 +02:00
Jean-Yves Avenard 70040ff272 Bug 1245400 - P3. Report number of frames dropped by compositor back to VideoSink. r=nical
We report the number of frames dropped by the compositor because they were too late through:
ImageComposite -> ImageHost -> CompositableTransactionParent -> ImageBridgeParent -> IPDL -> ImageBridgeChild -> ImageContainerListener -> ImageContainer -> VideoSink

Differential Revision: https://phabricator.services.mozilla.com/D2177
2018-08-22 17:26:36 +02:00
Jean-Yves Avenard a0a2549c82 Bug 1245400 - P2. Keep track of frames that should have been painted but didn't. r=nical, r=mattwoodrow
We can't rely on the FrameID continuity to determine if a frame has been dropped due to timing or not.
The reason being that the VideoSink will not send to the compositor frames it knows as being late already (causing a discontinuity in the frames IDs), and count them as being dropped.
If we were to look at discontinuity on the compositor we would account for those frames twice.

FramesID will also increase non-linearly if a frame isn't painted because it's not visible (either out of the visible tree or in a hidden tab).

What we can measure however, is when a frame should have been painted but didn't because it was too late by looking at the value returned by ImageComposite::ChooseImageIndex() or when a new set of images is being received by the ImageComposite.
Any images found in the earlier array but never returned must have been dropped due to timing.

Looking at the index continuity greatly simplify the logic as we no longer need to worry if a video is hidden or not, or be part of a layer that is itself hidden as neither SetImages will be called then, nor ChooseImage

For now, we only account for those frames dropped, and do not report them yet.

Differential Revision: https://phabricator.services.mozilla.com/D2176
2018-08-22 17:26:36 +02:00
Jean-Yves Avenard f7be15f4f4 Bug 1245400 - P1. Make ImageComposite::mImages a private member. r=nical
We will use the characteristic of which TimedImage is returned to keep track on how many frames were dropped because they were too old. As such, we must make sure the retrieval of the current image is serialised.

This allows to reduce duplicated code between WebRenderImageHost and ImageHost classes.

Additionally, make RenderInfo::img member const as really, we never want to modify that one.

A future change will enforce that RenderInfo.img never survives longer than the ChooseImage()'s caller to clarify the lifetime of the TimedImage.

Differential Revision: https://phabricator.services.mozilla.com/D2175
2018-08-22 17:26:36 +02:00
Lee Salzman 5b4c63c8a1 Bug 1485358 - fix purging of missing glyph WebRender users. r=me 2018-08-22 11:12:33 -04:00
Cosmin Sabou 37fb58dac2 Bug 1430530 - Disable gfx/tests/mochitest/test_acceleration.html on windows for frequent failures. r=jmaher 2018-08-22 17:36:57 +03:00
Ryan Hunt 731b450e6f Bug 1483245 - Add telemetry probes for amount of time spent on paint thread and the amount of tasks. r=jrmuizel
--HG--
extra : rebase_source : d260f473549d559fdd8ad7a22ea5bb81e301b438
2018-08-17 15:22:34 -05:00
Ryan Hunt 781aabfe2e Bug 1483772 - Never have mAsyncTask be non-null when we cannot paint. r=nical
In bug 1482415 a special check was added for the case where we fail to allocate
a buffer and started an async task. This papered over one crash for another
as ClientPaintedLayer also assumes that if there is an async task there is
a capture. It'd be best to just null out mAsyncTask and keep those checks
as is.

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

--HG--
extra : rebase_source : 8cb2458f0a98795a6ece90b38a9c194c863bbd84
2018-08-16 10:33:14 -05: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
Imanol Fernandez 4ee978a82d Bug 1482613 - Make WebVR work with multiprocess enabled on Android r=kip,rbarker,kvark
MozReview-Commit-ID: G9aHbp0G7DK

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

--HG--
extra : moz-landing-system : lando
2018-08-23 18:35:15 +00: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 fc47ba869a Bug 1430038 - Part 2: launch VR process and communicate with GPU process; r=kip, jimm
Summary: MozReview-Commit-ID: IQZVIYVSCxe

Tags: #secure-revision

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

MozReview-Commit-ID: 4sT6fqk7MpT

--HG--
extra : rebase_source : dab038bdb214ec7e808a74ed5c76a11097c3ffcf
2018-08-07 11:20:34 -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
Kashav Madan 6c9e5b4504 Bug 1465616 - Add reftests for main-thread scroll behaviour. r=botond
MozReview-Commit-ID: IzSUQqvjrUp

--HG--
extra : rebase_source : 00879de80d883f65eaa8895a11802ab0e6d2486f
2018-08-14 13:34:36 -04:00
Kashav Madan be05765545 Bug 1465616 - Add a mochitest for fixed position hit-testing. r=botond
MozReview-Commit-ID: IC82JZoVgPs

--HG--
extra : rebase_source : 2b00dc8aa740ac8b628a50be303ddee60ae7a5cc
2018-07-04 16:17:31 -04:00
Kashav Madan 36384db656 Bug 1465616 - Use layout viewport transformations to async-adjust fixed position elements. r=botond
This results in fixed position elements being attached to the layout viewport
when being async-scrolled by APZ (when the layout viewport is larger than the
visual viewport).

MozReview-Commit-ID: 2YYIDnTWgVn

--HG--
extra : rebase_source : 58b77b2e9c8ed35bdc2d24dd8ca9494e8d23a391
2018-07-20 17:45:48 -04:00
Kashav Madan 2a9fbaf66d Bug 1465616 - Temporarily apply async test attributes when compositing. r=botond,kats
Includes a new RAII class: AutoApplyAsyncTestAttributes, which, for the
duration of its lifetime, applies mTestAsyncScrollOffset and mTestAsyncZoom to
the APZC's FrameMetrics. We need this to ensure that the
AsyncPanZoomController::GetCurrentAsync* methods consider test scroll and zoom
attributes when doing their respective computations.

MozReview-Commit-ID: 9owJcdIegNH

--HG--
extra : rebase_source : 35273faf10b8db13e3b5485278262f93d4adc579
2018-07-20 17:37:36 -04:00
Jeff Gilbert 2ab455c28d Bug 1482974 - Prefer to initialize members at declaration in gfx/gl. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D3240

--HG--
extra : moz-landing-system : lando
2018-08-17 22:21:26 +00:00
Masatoshi Kimura b190c1c0b3 Bug 1482583 - Suppress clang-cl warnings in some third-party directories. r=mshal
--HG--
extra : rebase_source : 68621ca3ad2565e173f3350744125993f85f49f3
2018-08-11 06:05:19 +09:00
sotaro 4c0aee518b Bug 1482032 part 2 - Only register a value for CONTENT_FRAME_TIME if we actually drew something r=mattwoodrow 2018-08-15 14:13:49 +09:00
sotaro 8f19f46520 Bug 1482032 part 1 - A bit clean up of FlushTransactionIdsForEpoch() r=mattwoodrow 2018-08-15 14:13:24 +09:00
Ryan Hunt f7b6e05792 Bug 1482415 - Handle case where we failed to allocate a buffer and are async painting. r=nical
--HG--
extra : amend_source : 9908bb8454f4aa94b453fa1d7bc880e73b588383
2018-08-13 23:15:09 -05:00
Ryan Hunt b2e21ec958 Bug 1482956 - Standardize method names and add comments to PaintThread. r=nical
These method names and ordering have gotten out of sync because of
the recent churn.

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

--HG--
extra : rebase_source : 42bceaeb66a0df4808981b8c9cb0ed70b23f5a30
extra : histedit_source : 228024efe8de4e149f7e7ca66a2bb078bba820ce
2018-08-13 12:58:25 -05:00
Ryan Hunt a3a666772d Bug 1482956 - Don't dispatch extra runnable for ending layer transaction. r=nical
This may have been needed at some point, but all the important code for
EndLayerTransaction is in CompositorBridgeChild behind a lock, so this
should be safe.

--HG--
extra : rebase_source : bda4080bc04afa95954732050df7bd25c8177752
extra : histedit_source : 9386583dd923bf0ae44ff783d3ef1c6692944c77
2018-08-13 12:57:15 -05:00
Ryan Hunt 92823fa25e Bug 1482956 - Use an AutoTArray in PaintTask to reduce heap allocations. r=nical
There should only ever be at most four TextureClients here, so
allocated a vector seems wasteful.

--HG--
extra : rebase_source : 6b0f9f7749461eb39cd3c6c6bf7917152ffc9aab
extra : histedit_source : b5539d02c294596a5147dc55b417ef7970f8c0cd
2018-08-13 12:22:18 -05:00
Ryan Hunt 2c62e46a50 Bug 1482956 - Remove templates for FinishedAsyncPaint methods in CompositorBridgeChild. r=nical
This was needed when there were multiple types of CapturedPaintStates but
is not anymore.

--HG--
extra : rebase_source : 3648edccca7c73e3e3aa7a5c3e0d48d12d6324c5
extra : histedit_source : 021814c10b6578970c3a6d234c1e6641ad26b095
2018-08-13 12:10:14 -05:00
Nicolas Silva 43aaf84a4c Bug 1482795 - Fix the gfx memory pressure observer. r=sotaro 2018-08-14 21:10:11 +02:00
Jeff Muizelaar 7d840d7840 Bug 1481570. Update webrender to commit 890f3746b798538d201e54b66d2711a70447b781 2018-08-14 09:47:58 -04: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 a1ed764131 Bug 1482665 Part 5 - Remove nsDeviceContext::AppUnitsPerCSSInch() and replace it with mozilla::AppUnitsPerCSSInch(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3158
2018-08-13 14:29:30 -07: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
Ting-Yu Lin 48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
Ting-Yu Lin 16aeb5581f Bug 1482665 Part 1 - Add constexpr to mozilla::AppUnitsPerCSSPixel() and mozilla::AppUnitsPerCSSInch(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3154
2018-08-13 14:29:28 -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
Bogdan Tara dfe849c923 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-11 06:46:31 +03:00
Nicolas Silva 0dbafc5576 Bug 1482109 - Fix unified build related issues. r=rhunt 2018-08-10 17:15:23 +02:00
Nicolas Silva 33f0e6077e Bug 1482109 - Use the generic memory pressure observer in gfxPlatfrom. r=sotaro 2018-08-10 17:15:12 +02:00
Nicolas Silva 448ed62883 Bug 1482109 - Use the generic memory pressure observer in ClientLayerManager. r=sotaro 2018-08-10 17:15:08 +02:00
Nicolas Silva 1d263cc139 Bug 1482109 - Add a generic MemoryPressureObserver. r=sotaro 2018-08-10 17:15:02 +02:00
Nicolas Silva 3cea37c9c2 Bug 1469496 - Handle video memory purge with WebRender. r=sotaro 2018-08-10 17:14:57 +02:00
Andrew Osmond 085c930700 Bug 1481933 - Store a shared surface's dirty rect update if we cannot process it immediately. r=nical
Multiple tabs in the same process could be viewing the same image. If it
is an image we are taking some time to download from the network, it may
not be displayed all at once. As a result, it could generate several
dirty rects for the newly decoded lines each time we paint. Since we
only apply the dirty rect to the active tab, and forget it afterwards,
then when one returns to the other tab(s), it may not reupload all of
the modified image data. Now we save the dirty rect and accumulate it
for the handles which weren't able to be updated immediately.
2018-08-10 10:48:23 -04:00
Jeff Gilbert 8042ec3150 Bug 1482301 - Remove webgl.webgl2-compat-mode. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D3070

--HG--
extra : moz-landing-system : lando
2018-08-10 12:51:22 +00:00
Margareta Eliza Balazs f617807241 Merge inbound to mozilla-central. a=merge 2018-08-10 12:17:09 +03:00
L. David Baron 09f62c0e05 Bug 1481866: Swap order of values in 'overflow' shorthand property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3069

--HG--
extra : moz-landing-system : lando
2018-08-10 02:20:53 +00:00
Mike Conley f5158dd297 Bug 1481913 - Allow texture direct mapping by default on macOS. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D2960

--HG--
extra : moz-landing-system : lando
2018-08-09 21:27:55 +00:00
Noemi Erli 125e35c2c4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-10 00:35:08 +03:00
Noemi Erli de9e45a850 Merge inbound to mozilla-central. a=merge 2018-08-10 00:31:09 +03:00
Ryan VanderMeulen 783ccf6975 Bug 1476334 - Update HarfBuzz to version 1.8.7. r=jfkthame
--HG--
extra : rebase_source : 48d8469644e5fbb52757f3dcf3e9c3bd4c212142
2018-08-09 09:07:27 -04:00
Tiberius Oros aff5d4ad5d Merge inbound to mozilla-central. a=merge 2018-08-09 13:02:05 +03:00
Jeff Gilbert e97241ae22 Bug 1481983 - Don't mix && and ||. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D2982

--HG--
extra : moz-landing-system : lando
2018-08-09 01:34:12 +00:00
Daniel Varga 31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Nazım Can Altınova 2ee5623032 Bug 1480499 - Add profiler label frame to gfxUserFontEntry::LoadPlatformFont with the OTHER category r=mstange
MozReview-Commit-ID: 49eCKAMxy3I

--HG--
extra : rebase_source : ee17aaded12943d7a150bf3f8d15d58d246c2ce5
2018-08-03 15:15:24 +02:00
Csoregi Natalia 0f4d50ff52 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
sotaro 4709864388 Bug 1476846 - Fix UpdateEpoch() handling r=nical 2018-08-08 14:14:00 +09:00
Jeff Muizelaar 955d35ed01 Bug 1480608. Skip over items that aren't in DrawTarget/DirtyRect. r=mstange
MozReview-Commit-ID: Kc9E1SUVUh3

--HG--
extra : rebase_source : d3ee33154622915bd444139bce639e4372fe8f43
2018-08-02 18:09:17 -04:00
Jeff Muizelaar a61a3dece7 Bug 1480620. Replace WebRender's use of DrawTargetTiled.
This replaces WebRender's use of DrawTargetTiled which was just trying to
apply offset.

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

--HG--
extra : moz-landing-system : lando
2018-08-08 02:55:23 +00:00
Xidorn Quan 346661e6fd Bug 1481125 - Put overflow: -moz-scrollbar-* behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2845

--HG--
extra : moz-landing-system : lando
2018-08-07 13:57:45 +00:00
Narcis Beleuzu 5200364866 Backed out changeset 00ff83d23238 (bug 1480608) for build bustages on Moz2DImageRenderer.cpp. CLOSED TREE 2018-08-08 01:48:46 +03:00
Jeff Muizelaar 75d7e45d83 Bug 1480608. Skip over items that aren't in DrawTarget/DirtyRect. r=mstange
MozReview-Commit-ID: Kc9E1SUVUh3

--HG--
extra : rebase_source : aa6561d103b3ab40f9d6033008bdc2fef3d395f8
2018-08-02 18:09:17 -04:00
Jeff Muizelaar 76eeb03deb Bug 1480620. Clip the filter source rect to the transformed DrawTarget bounds. r=mstange
This lets us avoid filtering the entire source image when we only need a small portion of it.
This makes a big performance difference with tiled blob images with WebRender.

MozReview-Commit-ID: EbMZ7ZJEeCe

--HG--
extra : rebase_source : 3f507ca5776e4ad63ac2ea71f20376519953274c
2018-08-01 21:26:40 -04:00
Jeff Muizelaar 8715d55e01 Bug 1480620. Add DrawTargetOffset. r=bas
This adds a DrawTargetOffset which is basically a simplified
DrawTargetTiled that only supports one tile. It useful for situations
where Cairo's device offset was used previously.

This also replaces WebRender's use of DrawTargetTiled which was just trying to
apply offset.

MozReview-Commit-ID: I33PB6CnHh0

--HG--
extra : rebase_source : 9fa51a0180343231cfca41daa0e3fa53f1b7befe
2018-08-03 10:48:37 -04:00
Narcis Beleuzu 6480962188 Backed out changeset e64cbe967b63 (bug 1480866) for GTest failure. CLOSED TREE 2018-08-07 21:21:27 +03:00
Botond Ballo 168027fec9 Bug 1480866 - Avoid creating a fling animation with zero velocity. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D2743

--HG--
extra : moz-landing-system : lando
2018-08-07 13:39:34 +00:00
sotaro 92f8dea8a0 Bug 1476846 - Reduce latency of applying async images of video r=nical 2018-08-07 19:12:06 +09:00
sotaro ebf0ddf6be Bug 1479181 part 2 - Remove glXChooseVisual() usage r=jgilbert 2018-08-07 14:13:37 +09:00
sotaro f4af09856a Bug 1479181 part 1 - Expose glxGetConfig() in GLXLibrary r=jgilbert 2018-08-07 14:13:17 +09:00
Ryan VanderMeulen ae8b50b2bc Bug 1478153 - Update OTS to version 7.1.7. r=jfkthame
--HG--
extra : rebase_source : 6dbc63989bb3d88e0b9c813210370fe70051578d
2018-07-24 16:09:00 -04:00
Daniel Varga edef4f17d4 Backed out changeset 08fa47a24e89 (bug 1445451) for failing Btup 2018-08-09 02:20:25 +03:00
Myk Melez 2d46903ee1 Bug 1445451 - vendor rkv r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D2246

--HG--
rename : third_party/rust/synstructure/.cargo-checksum.json => third_party/rust/synstructure-0.8.1/.cargo-checksum.json
rename : third_party/rust/synstructure/Cargo.toml => third_party/rust/synstructure-0.8.1/Cargo.toml
rename : third_party/rust/synstructure/README.md => third_party/rust/synstructure-0.8.1/README.md
rename : third_party/rust/synstructure/src/lib.rs => third_party/rust/synstructure-0.8.1/src/lib.rs
rename : third_party/rust/synstructure/src/macros.rs => third_party/rust/synstructure-0.8.1/src/macros.rs
extra : moz-landing-system : lando
2018-08-08 20:59:21 +00:00
Jeff Muizelaar da9d4bb3c0 Bug 1481655. Don't add recordings of the hit test info to blob images. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D2938

--HG--
extra : moz-landing-system : lando
2018-08-08 18:15:00 +00:00
dvarga de4435eec5 Backed out changeset 37ac6d023498 (bug 1481655) for bustage at build/src/gfx/layers/wr/WebRenderCommandBuilder.cpp on a CLOSED TREE 2018-08-08 21:00:23 +03:00
Jeff Muizelaar f0b0ce30f2 Bug 1481655. Don't add recordings of the hit test info to blob images. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D2938

--HG--
extra : moz-landing-system : lando
2018-08-08 17:32:52 +00:00
Imanol Fernandez 5424767924 Bug 1481393 - Implement a listener for WebVR PresentationGenerationContext changes; r=kip,rbarker,nika
MozReview-Commit-ID: FAR1fYnNM0U

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

--HG--
extra : moz-landing-system : lando
2018-08-07 23:09:42 +00:00
L. David Baron 1e88f0f003 Bug 1369941: Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. r=dholbert
This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

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

--HG--
extra : moz-landing-system : lando
2018-08-09 20:10:21 +00:00
Myk Melez 2c2b6eebf9 Bug 1445451 - vendor rkv; r=froydnj
MozReview-Commit-ID: KbcADpNltYq

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

--HG--
rename : third_party/rust/synstructure/.cargo-checksum.json => third_party/rust/synstructure-0.8.1/.cargo-checksum.json
rename : third_party/rust/synstructure/Cargo.toml => third_party/rust/synstructure-0.8.1/Cargo.toml
rename : third_party/rust/synstructure/README.md => third_party/rust/synstructure-0.8.1/README.md
rename : third_party/rust/synstructure/src/lib.rs => third_party/rust/synstructure-0.8.1/src/lib.rs
rename : third_party/rust/synstructure/src/macros.rs => third_party/rust/synstructure-0.8.1/src/macros.rs
extra : moz-landing-system : lando
2018-08-09 19:42:17 +00:00
Botond Ballo d51598b4d9 Bug 1480866 - Avoid creating a fling animation with zero velocity. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D2743

--HG--
extra : moz-landing-system : lando
2018-08-07 20:48:23 +00:00
Tiberius Oros 4199099335 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-09 13:04:39 +03:00
Martin Stransky 8b68257be5 Bug 1478454 - [Linux/WebRender] Create glxContext with GLX visual chosen at nsWindow::Create(), r=jgilbert
We need to use the same visual for X drawable and glxContext,
otherwise we get BadMatch when we try to make the glxContext current.

The correct glx visual is already configured at nsWindow::Create()
so just use it if it also matches the frame buffer config.

MozReview-Commit-ID: 78IIfiwOnsf

--HG--
extra : rebase_source : 5ddfc0f94abafc7a1441eea095e546568bc31596
2018-08-03 16:20:09 +02:00
Jonathan Kew a7dc2e2bd2 Bug 1481842 - Apply 50% opacity as intended to the border (or filled box on mobile) used for missing-glyph rendering. r=lsalzman 2018-08-08 17:15:42 +01:00
Bas Schouten 4e20187f58 Bug 1480832: Convert nsRegion's internal bounds representation to nsRectAbsolute, and define overflow behaviors. r=mattwoodrow 2018-08-07 15:54:32 +00:00
Nathan Froyd 6ce3ba74db Bug 1481534 - avoid compiling nsRect SSE code on non-x86-ish architectures; r=Bas 2018-08-08 09:24:08 -04:00
Kartikaya Gupta 7879461f7f Bug 1480433 - Update for API changes in WR PR 2948. r=jrmuizel
MozReview-Commit-ID: Linx9qsVeAb
2018-08-07 14:46:56 -04:00
Kartikaya Gupta 56cfeb9660 Bug 1480433 - Update webrender to commit c939a61b83bcc9dc10742977704793e9a85b3858. r=jrmuizel
MozReview-Commit-ID: 8msYpcE1tCx
2018-08-07 14:44:43 -04:00
Jeff Gilbert 6a1d75ae7a Bug 1477817 - Try to get RBAB even with EXT_create_context_robustness. - r=kvark 2018-08-07 12:24:53 -07:00
Brindusan Cristian 181d4f159b Backed out 10 changesets (bug 1478815) for reftest failures on /reftests/layers/forced-bg-color-outside-visible-region.html. CLOSED TREE
Backed out changeset 7ae4c893867a (bug 1478815)
Backed out changeset b865a866fe5a (bug 1478815)
Backed out changeset 405ad3518218 (bug 1478815)
Backed out changeset 64cb50b227e0 (bug 1478815)
Backed out changeset 392a724d5acd (bug 1478815)
Backed out changeset 01110727f2e9 (bug 1478815)
Backed out changeset 56d967e03ee2 (bug 1478815)
Backed out changeset 082638a5c643 (bug 1478815)
Backed out changeset 3dc47f17fa44 (bug 1478815)
Backed out changeset 699c954992f8 (bug 1478815)

--HG--
rename : gfx/2d/BufferEdgePad.cpp => gfx/layers/BufferEdgePad.cpp
rename : gfx/2d/BufferEdgePad.h => gfx/layers/BufferEdgePad.h
rename : gfx/2d/BufferUnrotate.cpp => gfx/layers/BufferUnrotate.cpp
rename : gfx/2d/BufferUnrotate.h => gfx/layers/BufferUnrotate.h
2018-08-07 20:57:27 +03:00
Ryan Hunt d8c8b51305 Bug 1478815 part 10 - Don't submit PaintTask's if the DrawTargetCapture is empty. r=bas
This commit exposes a method on DrawTargetCapture to see if it has
captured any drawing commands. This allows us to not dispatch
paint tasks if they will do nothing.

Ideally these tasks would execute instantly on the PaintThread, and
we would never delay sending the layer transaction or block on the
next paint, but with thread starvation and context switches it's
best to just not send them.

MozReview-Commit-ID: 7ywkEDBw6EX

--HG--
extra : rebase_source : c8f628180a3d908c8851e5c576296f903b9b255d
2018-07-31 17:47:51 -05:00
Ryan Hunt 8b6aa26413 Bug 1478815 part 9 - Add ability to create a DrawTargetCapture that can flush to its destination draw target. r=bas
This commit adds the ability to create a different kind of DrawTargetCapture which
has a limit on the size of which its CaptureCommandList can grow before it is
synchronously flushed to its destination DrawTarget.

Special care is taken to not do a sync flush until we would need to resize
the backing store of the CaptureCommandList. This allows us to not waste
memory we've already allocated.

The async painting content clients are updated to use it, and get a default
value from a new preference.

MozReview-Commit-ID: CJL7ffvaRzR

--HG--
extra : rebase_source : 546d9838808320c51d9ceef0ed0ffcbb88a16269
2018-07-26 16:33:07 -05:00
Ryan Hunt af49011c30 Bug 1478815 part 8 - Remove buffer operations for ContentClient. r=nical
This commit moves ContentClient from creating a CapturedBufferState for
buffer operations, to performing all of those operations on the
DrawTarget(Capture). Creating a DrawTargetCapture is now performed
by the RotatedBuffer when we BeginPaint, all operations are performed
on this capture, and then it's returned to the ClientPaintedLayer
as a PaintTask.

This commit is an involved refactoring of ContentClient and RotatedBuffer
to get this all to work. Here are the major parts:

1. RotatedBuffer is refactored to always perform operations on a single
   DrawTarget, which may be a single DT, dual DT, or capture.
2. RotatedBuffer adds BeginCapture and EndCapture methods to switch
   which DT is used in operations
3. ContentClient uses the RB capture methods when we are async painting
4. CC::BeginPaint is refactored to only perform capturing on a single
   RotatedBuffer. This is because we can't have the output of one
   PaintTask be the input of a different PaintTask due to the design
   of the Snapshot API.
      a. This can occur, today, by doing a FinalizeFrame only to later
         fail to Unrotate the buffer, causing a new RB to be created
         and painted into
      b. The previous PaintThread code worked because it used the
         buffer operations which didn't use Snapshot's
      c. This is fixed by not doing FinalizeFrame on a buffer if we
         realize we cannot unrotate it, and switching to initializing
         a buffer using the front buffer which should be up to date.
      d. I don't like touching this code, but it passes reftests,
         might be a performance improvement, and I've tested it on
         known regressions from the last time I messed up this code.
5. CC::PrepareForPaint is inlined into BeginPaint because dual draw
   targets can be cleared correctly from a previous commit
6. The code paths in ClientPaintedLayer are unified because we no
   longer need to special case this beyond setting the correct
   ContentClient flag.
7. CapturedPaintState and CapturedBufferState are removed in favor
   of PaintTask. Additionally EndLayer is no longer needed as all
   quadrants of a rotated buffer are in the same capture, so we
   don't need special case flushing code.

MozReview-Commit-ID: 9UI40dwran

--HG--
extra : rebase_source : 2f63464c1f8ca03992700b33838c4aa56608f872
2018-07-26 11:23:26 -05:00
Ryan Hunt 6c76c39c97 Bug 1478815 part 7 - Add a buffer unrotate operation to DrawTarget. r=bas
This commit adds a buffer unrotate operation to DrawTarget. It's
initially implemented with LockBits in DrawTarget. DrawTargetDual
overrides the implementation to pass on the operation to it's
DrawTargets.

No override is given for DrawTargetCapture as we intentionally
avoid this code path when async painting as it can fail.

This is needed so that RotatedBuffer can expose a single DrawTarget,
which can be a DrawTarget (for normal alpha), DrawTargetDual (for
component alpha), or DrawTargetCapture (when async painting).

MozReview-Commit-ID: csjjZ733hl

--HG--
rename : gfx/layers/BufferUnrotate.cpp => gfx/2d/BufferUnrotate.cpp
rename : gfx/layers/BufferUnrotate.h => gfx/2d/BufferUnrotate.h
extra : rebase_source : efc838a3a4b196f78eda79ff3304c15d386bdc63
2018-08-01 12:50:32 -05:00
Ryan Hunt 90b1c71102 Bug 1478815 part 6 - Add ability to create a SourceSurfaceDual directly. r=bas
This commit adds the ability to create a SourceSurfaceDual directly,
instead of only from a DrawTargetDual. This allows SourceRotatedBuffer
to expose itself as a single SourceSurface for a later commit.

MozReview-Commit-ID: K21K42cGDy1

--HG--
extra : rebase_source : 33a523e45f7102343ebd5b3aa1faf2ff1f3d6f87
2018-08-01 12:49:19 -05:00
Ryan Hunt dfb4539ae9 Bug 1478815 part 5 - Rename CapturedTiledPaintState to PaintTask. r=nical
This commit renames CapturedTiledPaintState to PaintTask as in a future
commit I will fold CapturedPaintState into it.

MozReview-Commit-ID: 8py7SrK4s29

--HG--
extra : rebase_source : 1b5259cca6520761ae99e64157d047441b90b563
2018-07-24 15:39:35 -05:00
Ryan Hunt af1087297b Bug 1478815 part 4 - Remove buffer operations for TiledContentClient. r=nical
This commit refactors TiledContentClient to not create PaintThread
buffer operations, but to instead perform all of these operations
on the DrawTarget(Capture). This simplifies the code dramatically
and allows us to add flushing behavior to DrawTargetCapture in a
future commit.

With this change, CapturedTiledPaintState is simply a container
for a DrawTarget, DrawTargetCapture, and keep-alive TextureClients.

Part of this commit is moving the logic of locking the texture
clients, constructing a dual draw target, and constructing a capture
into TiledContentClient so it can be shared.

MozReview-Commit-ID: 2rwz9aDI737

--HG--
extra : rebase_source : 16a4b87263f28b32f5bcb5fd6d9756548f137e11
2018-07-24 14:29:44 -05:00
Ryan Hunt a5f58a4250 Bug 1478815 part 3 - Add a DualTextureClientLock for texture clients used for component alpha. r=nical
This commit adds a RAII class for the common operation of attempting
to lock one or two TextureClients and then maybe constructing a
DrawTargetDual from them.

MozReview-Commit-ID: ECQkDSgpyuL

--HG--
extra : rebase_source : abad14bfee32ea2fd1626069f8229487d1f05015
2018-08-01 12:46:35 -05:00
Ryan Hunt 74645824fc Bug 1478815 part 2 - Make DrawTargetDual aware of component alpha clearing. r=bas
This commit changes the behavior of DrawTargetDual::Clear to be aware that
it has on-white and on-black buffers, and perform clearing appropriately.

This is slightly against what the DrawTarget documentation says the method
should do, but it allows us to move another paint thread operation into
DrawTargetCapture and simplify our ContentClient implementations.

I haven't seen any obvious breakage with this, and reftests are green.

An alternative would be to add a separate Clear method with documented
difference here.

MozReview-Commit-ID: 65CzcxlRqv7

--HG--
extra : rebase_source : 47403847e56521be90190eb6b70ec333f6daf5c0
2018-08-01 12:45:35 -05:00
Ryan Hunt 748ab5ad0f Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : ab850358a763853d50d1f374f28e67a197740443
2018-08-01 12:44:33 -05:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
sotaro bf2bee5c8e Bug 1481995 - Remove WebRenderBridgeParent::mForceRendering r=nical 2018-08-10 08:10:11 +09:00
Noemi Erli be6ab34c54 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
extra : rebase_source : 691b5b30b6c3b2ddece605c045ad913e466fdbab
2018-08-10 00:35:58 +03:00
Ryan Hunt 8091824d19 Bug 1478815 part 10 - Don't submit PaintTask's if the DrawTargetCapture is empty. r=bas
This commit exposes a method on DrawTargetCapture to see if it has
captured any drawing commands. This allows us to not dispatch
paint tasks if they will do nothing.

Ideally these tasks would execute instantly on the PaintThread, and
we would never delay sending the layer transaction or block on the
next paint, but with thread starvation and context switches it's
best to just not send them.

MozReview-Commit-ID: 7ywkEDBw6EX

--HG--
extra : rebase_source : c60c1c25d551e4a7c14c529137f8e0babc888466
extra : source : 7ae4c893867a5f7df81e0757d4b4a6a21cbc6986
2018-07-31 17:47:51 -05:00
Ryan Hunt 16e8c5d426 Bug 1478815 part 9 - Add ability to create a DrawTargetCapture that can flush to its destination draw target. r=bas
This commit adds the ability to create a different kind of DrawTargetCapture which
has a limit on the size of which its CaptureCommandList can grow before it is
synchronously flushed to its destination DrawTarget.

Special care is taken to not do a sync flush until we would need to resize
the backing store of the CaptureCommandList. This allows us to not waste
memory we've already allocated.

The async painting content clients are updated to use it, and get a default
value from a new preference.

MozReview-Commit-ID: CJL7ffvaRzR

--HG--
extra : rebase_source : f646862dcef7a480b21dfb7ddb1fa165338ba506
extra : source : b865a866fe5a3257615cb54b7e5e790cc9331988
2018-07-26 16:33:07 -05:00
Ryan Hunt 2dd7814423 Bug 1478815 part 8 - Remove buffer operations for ContentClient. r=nical
This commit moves ContentClient from creating a CapturedBufferState for
buffer operations, to performing all of those operations on the
DrawTarget(Capture). Creating a DrawTargetCapture is now performed
by the RotatedBuffer when we BeginPaint, all operations are performed
on this capture, and then it's returned to the ClientPaintedLayer
as a PaintTask.

This commit is an involved refactoring of ContentClient and RotatedBuffer
to get this all to work. Here are the major parts:

1. RotatedBuffer is refactored to always perform operations on a single
   DrawTarget, which may be a single DT, dual DT, or capture.
2. RotatedBuffer adds BeginCapture and EndCapture methods to switch
   which DT is used in operations
3. ContentClient uses the RB capture methods when we are async painting
4. CC::BeginPaint is refactored to only perform capturing on a single
   RotatedBuffer. This is because we can't have the output of one
   PaintTask be the input of a different PaintTask due to the design
   of the Snapshot API.
      a. This can occur, today, by doing a FinalizeFrame only to later
         fail to Unrotate the buffer, causing a new RB to be created
         and painted into
      b. The previous PaintThread code worked because it used the
         buffer operations which didn't use Snapshot's
      c. This is fixed by not doing FinalizeFrame on a buffer if we
         realize we cannot unrotate it, and switching to initializing
         a buffer using the front buffer which should be up to date.
      d. I don't like touching this code, but it passes reftests,
         might be a performance improvement, and I've tested it on
         known regressions from the last time I messed up this code.
5. CC::PrepareForPaint is inlined into BeginPaint because dual draw
   targets can be cleared correctly from a previous commit
6. The code paths in ClientPaintedLayer are unified because we no
   longer need to special case this beyond setting the correct
   ContentClient flag.
7. CapturedPaintState and CapturedBufferState are removed in favor
   of PaintTask. Additionally EndLayer is no longer needed as all
   quadrants of a rotated buffer are in the same capture, so we
   don't need special case flushing code.

MozReview-Commit-ID: 9UI40dwran

--HG--
extra : rebase_source : 809d9816970648468de972c30b0c230c2f21e27b
extra : source : 405ad351821813333c0e989b93e2aeb49ba8552c
2018-07-26 11:23:26 -05:00
Ryan Hunt a71d0035ad Bug 1478815 part 7 - Add a buffer unrotate operation to DrawTarget. r=bas
This commit adds a buffer unrotate operation to DrawTarget. It's
initially implemented with LockBits in DrawTarget. DrawTargetDual
overrides the implementation to pass on the operation to it's
DrawTargets.

No override is given for DrawTargetCapture as we intentionally
avoid this code path when async painting as it can fail.

This is needed so that RotatedBuffer can expose a single DrawTarget,
which can be a DrawTarget (for normal alpha), DrawTargetDual (for
component alpha), or DrawTargetCapture (when async painting).

MozReview-Commit-ID: csjjZ733hl

--HG--
rename : gfx/layers/BufferUnrotate.cpp => gfx/2d/BufferUnrotate.cpp
rename : gfx/layers/BufferUnrotate.h => gfx/2d/BufferUnrotate.h
extra : rebase_source : 5d96e2a5d36a01f2f9992adb37830e56436c7c35
extra : source : 64cb50b227e0ae604653f03ce2e892493126392e
2018-08-01 12:50:32 -05:00
Ryan Hunt e3b25e9b10 Bug 1478815 part 6 - Add ability to create a SourceSurfaceDual directly. r=bas
This commit adds the ability to create a SourceSurfaceDual directly,
instead of only from a DrawTargetDual. This allows SourceRotatedBuffer
to expose itself as a single SourceSurface for a later commit.

MozReview-Commit-ID: K21K42cGDy1

--HG--
extra : rebase_source : d3fe48ac711f9cd28799bfd8d36b74750cb15554
extra : source : 392a724d5acd25854e871fa47335c4b938fe9ae1
2018-08-01 12:49:19 -05:00
Ryan Hunt ce8baf18ae Bug 1478815 part 5 - Rename CapturedTiledPaintState to PaintTask. r=nical
This commit renames CapturedTiledPaintState to PaintTask as in a future
commit I will fold CapturedPaintState into it.

MozReview-Commit-ID: 8py7SrK4s29

--HG--
extra : rebase_source : 7abdf127351cdc82ee4c40112dce7150bdb67243
extra : source : 01110727f2e9e0846fc06997653e04860efb23dc
2018-07-24 15:39:35 -05:00
Ryan Hunt 7e8f465799 Bug 1478815 part 4 - Remove buffer operations for TiledContentClient. r=nical
This commit refactors TiledContentClient to not create PaintThread
buffer operations, but to instead perform all of these operations
on the DrawTarget(Capture). This simplifies the code dramatically
and allows us to add flushing behavior to DrawTargetCapture in a
future commit.

With this change, CapturedTiledPaintState is simply a container
for a DrawTarget, DrawTargetCapture, and keep-alive TextureClients.

Part of this commit is moving the logic of locking the texture
clients, constructing a dual draw target, and constructing a capture
into TiledContentClient so it can be shared.

MozReview-Commit-ID: 2rwz9aDI737

--HG--
extra : rebase_source : 4ac317f632c0a2c21480bc88e6246f4dc0daf0be
extra : source : 56d967e03ee225e032034ffd193b6f42b343226b
2018-07-24 14:29:44 -05:00
Ryan Hunt b3f614693b Bug 1478815 part 3 - Add a DualTextureClientLock for texture clients used for component alpha. r=nical
This commit adds a RAII class for the common operation of attempting
to lock one or two TextureClients and then maybe constructing a
DrawTargetDual from them.

MozReview-Commit-ID: ECQkDSgpyuL

--HG--
extra : rebase_source : 6debecb9d4ca33895daa78de3a52a1ed575706e1
extra : source : 082638a5c6432e0ca6ce377986d84ed130b32ad3
2018-08-01 12:46:35 -05:00
Ryan Hunt 9c419c4c91 Bug 1478815 part 2 - Make DrawTargetDual aware of component alpha clearing. r=bas
This commit changes the behavior of DrawTargetDual::Clear to be aware that
it has on-white and on-black buffers, and perform clearing appropriately.

This is slightly against what the DrawTarget documentation says the method
should do, but it allows us to move another paint thread operation into
DrawTargetCapture and simplify our ContentClient implementations.

I haven't seen any obvious breakage with this, and reftests are green.

An alternative would be to add a separate Clear method with documented
difference here.

MozReview-Commit-ID: 65CzcxlRqv7

--HG--
extra : rebase_source : 299adbb02e79f66f7d6860c5fe86784bad8332f8
extra : source : 3dc47f17fa446bb7f2b5876753f8271a93c0e0c8
2018-08-01 12:45:35 -05:00
Ryan Hunt 53537230f9 Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : a3315644fe31f2a432935dcbfdb9969c58b691e1
extra : source : 699c954992f87db7fc792f5562090de42a8162cb
2018-08-01 12:44:33 -05:00
Jan Beich 5677cde33a Bug 1473732 - Base default number of OMTP workers on the number of logical CPU cores. r=rhunt
system-info is a stub on Tier3 platforms while physical vs. logical
difference only matters for hyper-threading. As hyper-threading
is usually available on CPUs with more than 2 physical cores this
change has no impact there as the default is clamped to [1, 4].
However, on Intel i3-* CPUs with 2 physical and 4 logical cores this
bumps the default from 1 to 3.

MozReview-Commit-ID: 1Yh8rJL2JcN

--HG--
extra : rebase_source : 5c563ec8e388a3fd05a0650e8d4c330d48675332
2018-06-30 22:41:59 +00:00
Andi-Bogdan Postelnicu b2d4c86823 Bug 1453795 - GFX - Initialize member fields in classes/ structures. r=nical
--HG--
extra : rebase_source : 56f2cc017632bf27115490ae05254019108c6179
extra : amend_source : 98ea6c3c02a9f7650d2cf65deaf5085cf9a2efa4
2018-06-16 17:42:33 +03:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrew Osmond b30de56ba9 Backed out changeset 3f41992ab77e (bug 1446309) because wrong bug number. r=backout 2018-08-10 09:33:31 -04:00
Andrew Osmond cf006cd593 Bug 1446309 - Store a shared surface's dirty rect update if we cannot process it immediately. r=nical
Multiple tabs in the same process could be viewing the same image. If it
is an image we are taking some time to download from the network, it may
not be displayed all at once. As a result, it could generate several
dirty rects for the newly decoded lines each time we paint. Since we
only apply the dirty rect to the active tab, and forget it afterwards,
then when one returns to the other tab(s), it may not reupload all of
the modified image data. Now we save the dirty rect and accumulate it
for the handles which weren't able to be updated immediately.
2018-08-10 09:30:24 -04: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
Lee Salzman daa9f58360 Bug 1479196 - add support to TextDrawTarget for defining and pushing WR images. r=nical 2018-08-21 12:36:48 -04:00