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

137 Коммитов

Автор SHA1 Сообщение Дата
Ethan Lin 87408bd0b0 Bug 1422013 - Invalidate image items for webrender. r=mattwoodrow
MozReview-Commit-ID: 701MZhcrf4l

--HG--
extra : rebase_source : 8bed0e5f812570685cf04f5b371da885294513e0
2017-12-04 11:12:25 +08:00
Kartikaya Gupta 86ac46d3f7 Bug 1412112 - Cache the view id on the ASR to speed up the ViewIDForASR operation. r=mstange
This also moves the function from nsLayoutUtils to be a function on the
ASR itself, which seems more appropriate.

MozReview-Commit-ID: 88lUmYi80P0

--HG--
extra : rebase_source : 3f7e4f875c3267f9f4c5c67e720912ceedb25719
2017-11-23 12:22:22 -05:00
JerryShih 11cc44fa89 Bug 1416868 - make sure we could always get the specific userData from mask layer. r=mattwoodrow
The gecko have two types of mask layer: css mask layer and the regular mask layer.
The hash key of ContainerState::mRecycledMaskImageLayers doesn't contain mask type.
So, we might get a css mask layer when we try to get a regular mask layer. Then, we
will get a nullptr of userData.
This patch add a userData checking in ContainerState::CreateOrRecycleMaskImageLayerFor()
to avoid the problem.

MozReview-Commit-ID: EEUhkctqwR2
2017-11-16 19:15:00 +02:00
Kartikaya Gupta 92c112278f Bug 1416540 - Convert a bunch of scaling code to avoid unnecessary double conversion. r=mattwoodrow
The code in ComputeSuitableScaleForAnimation feeds its double-based
computation results into GetSuitableScale, which takes and returns
floats. Also the double-based computation that it's doing involves
calling UpdateMinMaxScale a bunch which explicitly uses the float
variant of std::min and std::max. And all of this is used from
ChooseScaleAndSetTransform which does other things like call a
"RoundToFloatPrecision" function, and casts the final values to
floats before setting the layer's prescale. So let's just use
floats all the way through.

MozReview-Commit-ID: BE3WC5hv89d

--HG--
extra : rebase_source : 987d9d69ec2a200ed68c59bae5fae1115713a94c
2017-11-12 18:37:33 -05:00
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Botond Ballo 6a7049b903 Bug 1382534 - Relax the requirement of having a clip with respect to an ASR for nsDisplayMask items. r=mstange
We allow an nsDisplayMask item to satisfy the requirement even it does not
itself have a clip, as long as its children have finite bounds with respect
to the ASR.

MozReview-Commit-ID: 8zKE0bguY38

--HG--
extra : rebase_source : 74baaea2647708d1cd024f9e6afd82508e95c74a
2017-09-25 19:15:23 -04:00
Botond Ballo 4a2d5338c5 Bug 1382534 - Layerize active masks even with HWA disabled. r=mstange
MozReview-Commit-ID: 6lvOE3fGFAy

--HG--
extra : rebase_source : 86e4c07873890e14d57708f202d7c611635bf070
2017-08-09 16:25:19 -04:00
Jeff Muizelaar 4250e26d21 Bug 1413629. Don't require a PresContext to apply a clip. r=mstange
The only thing we use the PresContext for is the app units. I'd rather not
worry about keeping around a PresContext for the webrender display item
grouping.
2017-11-01 14:37:59 -04:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Kartikaya Gupta bec5f23434 Bug 1411238 - Make APZ test logging work in layers-free WR mode. r=botond
Most of this change is just fiddling with function signatures so that they take
a LayerManager* instead of a Layer* (or in some cases, both). This allows
the WebRender codepaths to pass a WebRenderLayerManager* instead of having to
produce a Layer* which it doesn't have.

MozReview-Commit-ID: Fb0C8OUVDin

--HG--
extra : rebase_source : e4c3324cfa20c295db85d5c09df8d8d77865bb6a
2017-10-25 13:22:04 -04:00
Sebastian Hengst 18f1987735 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-23 11:46:34 +02:00
Nicholas Nethercote 3842370ed8 Bug 1405541 (attempt 2) - Split AUTO_PROFILER_LABEL_DYNAMIC into three macros. r=mstange.
It's easy to mess up the scoping so that (a) the label is pushed and then
immediately popped, and/or (b) the string doesn't live long enough. It's also
easy to do a utf16-to-utf8 conversion unnecessarily when the profiler is
inactive. This patch splits that macro into three new ones that are harder to
mess up.

- AUTO_PROFILER_LABEL_DYNAMIC_CSTR: same as current.
- AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING: for nsCStrings.
- AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING: for nsStrings.

--HG--
extra : rebase_source : 3e2bbec4737b696e1c86579ae54be4cb3186c100
2017-10-13 16:12:57 +11:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) f3e6b5eb98 Bug 1404181 - Part 26: Skip DLBI for reused items (since they must not be invalid). r=mstange
MozReview-Commit-ID: 3IooTF2064G

--HG--
extra : rebase_source : 2684c97d0f105301b9a30649dfde72659435f940
2017-09-29 10:58:54 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) 3fa03bb34e Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) eea0ea6471 Bug 1404181 - Part 13: Expose DisplayItemData better from FrameLayerBuilder so we can query the geometry (for sync decode invalidations). r=mstange
MozReview-Commit-ID: 43oxBMdRRTK

--HG--
extra : rebase_source : b80cb0ee46d2c2bcc17967c51bc6de65043b6be6
2017-09-28 13:43:11 +13:00
Matt Woodrow 8b1212fa67 Bug 1407815 - Allow merging of items that are in different wrap lists. r=miko 2017-10-17 15:16:28 +13:00
Phil Ringnalda 98bf044371 Backed out changeset 78f548e4f687 (bug 1407815) for QR reftest failures in 660682-1.html
MozReview-Commit-ID: C2iSNkCRItc
2017-10-16 21:08:32 -07:00
Matt Woodrow 158323e770 Bug 1407815 - Allow merging of items that are in different wrap lists. r=miko
--HG--
extra : rebase_source : 0e1e08b805a07ac1279757f810235d0bfe718714
2017-10-17 15:16:28 +13:00
Markus Stange 1200f014ad Bug 1406183 - Add a boolean aIsInactiveLayerManager to FrameLayerBuilder so that IsBuildingRetainedLayers can return false for inactive layer managers even if there is no containing PaintedLayerData. r=mattwoodrow
MozReview-Commit-ID: KkrEXLD85iP

--HG--
extra : rebase_source : a4a54a95900665476cd725a852ce0915cdfcf73f
2017-10-06 18:32:30 -04:00
Markus Stange c00d5ee6fa Bug 1401037 - Propagate nsDisplayList::mForceTransparentSurface to the parent list when recursing into flattened items. r=miko
MozReview-Commit-ID: 9iS9fwtUAaJ

--HG--
extra : rebase_source : 233e2b0b81597d63297d3a9c6be660a12b73c455
2017-09-19 15:52:20 -04:00
Matt Woodrow ac26c2873e Bug 1397060 - Don't call ComputeOpaqueRect unless we're going to make use of the result. r=mstange
MozReview-Commit-ID: 2yGybisiLcx
2017-09-12 14:14:27 -04:00
Markus Stange b5fdbfc62c Bug 1387594 - Stop getting the font smoothing background color from the theme. r=mattwoodrow
MozReview-Commit-ID: 2r1B8SvEkEl
2017-09-14 23:09:47 +02:00
Sebastian Hengst b31bbc7d9a Backed out changeset b507473b9b75 (bug 1397060) for almost permafailing reftest box-decoration-break-with-outset-box-shadow-1.html on stylo. r=backout a=backout
MozReview-Commit-ID: FOAcq7soe89
2017-09-14 10:44:03 +02:00
Miko Mynttinen d664d5ff7f Bug 1359584 - Part 5: Change nsDisplayItem merging logic to non-destructive r=mstange
MozReview-Commit-ID: CiN2yUOyaMX

--HG--
extra : rebase_source : 6b23658b5d3b2ed6f7b59107ca0de7ddfc0efb19
2017-08-23 21:01:28 +02:00
Miko Mynttinen aaa0b1d502 Bug 1359584 - Part 4: Refactor FrameLayerBuilder::ProcessDisplayItems() to be recursive r=mstange
MozReview-Commit-ID: JaC3SFGcpzK

--HG--
extra : rebase_source : 4893732967930158054cfe04fb0670bb3605ef84
2017-08-25 12:34:40 +02:00
Jeff Muizelaar d5f9b84940 Bug 1392523. Remove duplicated gfxContext* parameter. r=mattwoodrow
All of the callers are passing in the same value for
both gfxContexts.
2017-09-12 22:17:43 -04:00
Matt Woodrow 8f960a70fc Bug 1397060 - Don't call ComputeOpaqueRect unless we're going to make use of the result. r=mstange
MozReview-Commit-ID: 2yGybisiLcx

--HG--
extra : rebase_source : 98c7905f621d1f225f8f6738ccb736f56fbdf9c3
2017-09-12 14:14:27 -04:00
Bas Schouten 64bb6354b5 Bug 1363922 - Part 2: Estimate scale of frames using their transformation relative to the root frame. r=mstange
MozReview-Commit-ID: HTDaOz7sz5c
2017-08-25 00:21:55 +02:00
Wes Kocher c043502159 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7sFZmPUXSx6
2017-08-18 17:21:29 -07:00
Nicholas Nethercote 784f2b42d4 Bug 1386103 (part 0) - Don't pass lambdas to CreateOrRecycledMaskImageLayerFor. r=kats.
They cause inexplicable and monstrously complex compile errors in Android NDK
code in combination with the (entirely unrelated) changes in the next patch.
2017-08-10 16:02:01 +10:00
Sebastian Hengst fb32ca19c4 Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
Bas Schouten 9207223d59 Bug 1363922 - Part 2: Estimate scale of frames based on their PresShell resolution. r=mstange
MozReview-Commit-ID: 8f6T3PiPkF8
2017-08-17 15:45:31 +02:00
Kartikaya Gupta 975c4c2802 Bug 1389143 - Refactor to extract helper method. r=jrmuizel
MozReview-Commit-ID: 5FxrP280i5m

--HG--
extra : rebase_source : 5ca1f3f42d013b1b5adfa64caf061b170e700092
2017-08-18 13:06:30 -04:00
Matt Woodrow 781ec6ffa1 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange
* * *
[mq]: fix

MozReview-Commit-ID: LUXZAIL73BJ
2017-08-07 16:07:43 +12:00
Sebastian Hengst 7f85daeb2a Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Matt Woodrow 95f2e31f88 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12:00
sotaro 276b8889d3 Bug 1388639 - Use KnowsCompositor instead of ShadowForwarder in MaskImageData and MaskLayerImageCache r=nical 2017-08-10 11:43:11 +09:00
David Anderson bb8c6e5f61 Handle bounds overflow in consumers of LayerTreeInvalidation. (bug 1345891 part 2, r=mattwoodrow) 2017-08-03 21:22:48 -07:00
Jamie Nicol ff2a920fd4 Bug 1360306 - Clamp layer scale if it has recently been animated. r=mstange
When a container layer's transform has an animated scale, we clamp it
to a near power of two so that descendent layers' resolutions do not
keep changing and we minimize repainting. The current behaviour only
clamps the scale when it has not changed with respect to the previous
transaction. In animations where the scale usually changes, but
happens to remain constant between two consecutive transactions, this
is bad.

Rather than only checking against the previous scale value, use
ActiveLayerTracker::IsScaleSubjectToAnimation() to determine whether
to clamp, as it takes into account a longer period.

--HG--
extra : rebase_source : 6bc773e387c5750746722d4a0cc5864ebf7757e2
2017-07-27 11:52:27 +01:00
Matt Woodrow 3f444dd59f Bug 1378455 - Don't minimize the visible region for the scrollbar thumb in FrameLayerBuilder since it can move asynchronously. r=mstange 2017-08-01 11:09:53 +12:00
Lee Salzman 93a171958a Bug 1383825 - limit the growth of scaling for animated nsDisplayTransform in fallback case. r=mattwoodrow
MozReview-Commit-ID: 25NNa1CKMEM
2017-07-26 00:55:11 -04:00
Kartikaya Gupta 23c0f3a60b Bug 1382682 - Move ViewIDForASR into nsLayoutUtils for reuse. r=mstange
MozReview-Commit-ID: IcYqDO1D2SB

--HG--
extra : rebase_source : b1aa811facf533f4f30ae4e432f73737e1a4528b
2017-07-20 12:33:09 -04:00
Nicolas Silva a9bf06994d Bug 1377595 - Mark display items that should be painted on the content side. r=jnicol 2017-07-20 11:34:15 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Jeff Muizelaar a122237414 Bug 1375972 - Avoid copying the visible region. r=mstange 2017-06-23 16:03:59 -04:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Matt Woodrow 171f11740d Bug 1373479 - Don't intersect with the visible rect for async animations, since we want to keep the prerendered area as visible too. r=mstange 2017-06-22 12:41:36 +12:00
Sebastian Hengst 3654d560d6 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: DPQl41S3ZkU
2017-06-17 22:26:03 +02:00
Mats Palmgren 5ef66d5e7d Bug 1371958 part 2 - Move a mPaintedLayerItems.GetEntry() call into the else-branch where its result is actually used to avoid an unnecessary hashtable lookup when we don't take the else-branch. r=froydnj
MozReview-Commit-ID: sOwNzB8mxj
2017-06-17 00:06:04 +02:00