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

2371 Коммитов

Автор SHA1 Сообщение Дата
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
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
Lee Salzman bf12f26ad9 Bug 1479196 - draw missing glyphs from an atlas instead of rectangles. r=jfkthame 2018-08-21 12:40:36 -04: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 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
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
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
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
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
Lee Salzman 864930c221 Bug 1479010 - don't populate a ScaledFont's cairo scaled font unless targeting cairo. r=jrmuizel 2018-08-03 00:56:06 -04:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
David Major a9e8069a9b Bug 1479456: Fix some non-unified bustage in gfx/thebes. r=jrmuizel 2018-08-01 13:02:18 -04:00
Nicolas Silva 514e74387d Bug 1474722 - Prevent large rect integer overflows without forbidding large nine-patches. r=Bas 2018-08-01 17:13:12 +02:00
Jamie Nicol 35e92591dd Bug 1474883 - Ensure D2D glyph cache is pruned after rendering 1000 transformed glyphs. r=bas
Rendering glyphs at many different rotations was causing the D2D glyph
cache to grow very large. Calling EndDraw/BeginDraw will prune the
cache, but is costly, so only do it for every 1000 glyphs.

MozReview-Commit-ID: HUFpxDvYAzQ

--HG--
extra : rebase_source : de283c5e687da07e5417e0d221d7f45b992080d5
2018-07-26 15:23:19 +01:00
Lee Salzman 79d6db9a30 Bug 1478084 - make cairo_font_face_set_user_data thread-safe. r=jrmuizel 2018-07-26 15:23:25 -04:00
Kartikaya Gupta dfc93a4506 Bug 1477471 - Add missing pop_back call. r=jrmuizel 2018-07-24 14:06:30 -04:00
Kartikaya Gupta 3dfe60b882 Bug 1477471 - Implement PushLayerWithBlend for DrawTargetTiled. r=jrmuizel 2018-07-24 14:06:23 -04:00
Robert Longson da1ac338dc Bug 1474284 - cope with degenerate bezier curves r=baz 2018-07-23 18:36:09 +01:00
Miko Mynttinen c9202e2933 Bug 1477260 - Clip the rect in Matrix4x4TypedFlagged::TransformAndClipBounds, when transform is an identity matrix r=bas
MozReview-Commit-ID: 3a8vnl3K87n

--HG--
extra : rebase_source : b4bdd2b14e10becee20007e453497e9d7a204097
2018-07-20 17:28:37 +02:00
Robert Bartlensky dbbe5d1893 Bug 1476645: Fix DEAD_STORE errors in gfx/*. r=lsalzman
MozReview-Commit-ID: GYAWaLcpfsz

--HG--
extra : rebase_source : 30b9bdfda57e2773d5311dad83fa7ea468865c70
2018-07-18 16:54:00 +01:00
Lee Salzman 778675de84 Bug 1474968 - pass DWrite font gamma and contrast to WebRender. r=jrmuizel 2018-07-18 22:16:50 -04:00
arthur.iakab ecc4a026dc Backed out 2 changesets (bug 1474722)For freqvently failing test verify on gfx/tests/reftest/1474722.html CLOSED TREE
Backed out changeset 53d0bbb455cb (bug 1474722)
Backed out changeset 315d75c42ef0 (bug 1474722)
2018-07-18 19:48:21 +03:00
Nicolas Silva 76b07b62c3 Bug 1474722 - Prevent large rect integer overflows without forbidding large nine-patches. r=Bas 2018-07-13 14:40:58 +02:00
Bas Schouten 2ffa4da191 Bug 1476506: Move RoundedRect into Moz2D and convert all callers. r=mattwoodrow 2018-07-18 08:55:43 +02:00
Bas Schouten ab9f118366 Bug 1473937 - Part 2: Add Opacity filter D2D implementation. r=mstange 2018-07-17 21:11:14 +02:00
Bas Schouten 7e185acb09 Bug 1473937 - Part 1: Add Opacity filter and software implementation. r=mstange 2018-07-17 21:11:13 +02:00
Matt Woodrow 9171c79a67 Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface. r=bas,mstange
MozReview-Commit-ID: GOBTUhN7fcC

--HG--
extra : rebase_source : 8355d2001dcc8fba5e43d4ace6483896a9d9cd31
2018-07-14 15:25:49 +12:00
Andrew Osmond a52fbf8ab5 Bug 1469964 - Part 2. Make shared surfaces use external image update mechanism. r=nical 2018-07-12 11:43:12 -04:00
Boris Chiou ffa1da7545 Bug 1467277 - Avoid getting zero normalized vector of rotate3d when setting a rotate matrix. r=nical
For example, if we set a transform to rotate3d(0, 0, 1e50, 45deg), the
expected normalized rotate axis is (0, 0, 1).
However, the length is larger than the maximum of float, so the actual value is
(0/inf, 0/inf, 1e50/inf) == (0, 0, 0). Therefore, we scale the vector before
doing normalization to avoid getting a zero vector.

MozReview-Commit-ID: 5LUDWD4RuNj

--HG--
extra : rebase_source : eb82f0b3979bf6ea3cd11b643ebb30a49edc24f8
2018-07-05 15:40:39 -07:00
Lee Salzman 23c3cc8f6b Bug 1467847 - avoid taking inverse in Polygon::TransformToScreenSpace when possible. r=miko 2018-07-09 15:52:42 -04:00
Bas Schouten d1d1555fb6 Bug 1474027: Rename RectAbsolute members and make them easier to access. r=botond 2018-07-09 16:39:50 +00:00
Lee Salzman e251ecb952 Bug 1460259 - Send synthetic oblique angle to WR. r=jfkthame 2018-07-04 10:56:40 -04:00
Ryan Hunt 0401ad902b Bug 1414389 - Add thread safety assertions in capture command list. r=bas
--HG--
extra : rebase_source : 0def858a2cce7ac6ef73fd8caa1e0e0b64b03ef6
2018-06-29 15:45:17 -05:00
Ryan Hunt ab5640b5e6 Bug 1471761 - Virtualize mType to reduce DrawingCommand size. r=bas
MozReview-Commit-ID: EFcVLZ6amNr

--HG--
extra : rebase_source : 0111dea6e377dff75b70a8b0e6d25f670e57d297
extra : histedit_source : 5bc07620340f71731918a99dcd95dcb3ee3b99c9
2018-06-27 18:26:38 -05:00
Ryan Hunt 5233d2ccc5 Bug 1471761 - Drop unused GetAffectedRect and fix virtual styling. r=bas
MozReview-Commit-ID: 9Gra35FVeQY

--HG--
extra : rebase_source : bf45336df86147657d2e851fadff6c25672d6288
extra : histedit_source : 517be1662712adb718f459f6f2c3a3fe6972e67b
2018-06-27 18:11:38 -05:00
Ryan Hunt 533d5ab90b Bug 1471761 - Remove unused ContainsOnlyColoredGlyphs. r=mattwoodrow
MozReview-Commit-ID: JQlkVnV2sz8

--HG--
extra : rebase_source : 1b424f810c19b68f7552032614bce57ed329daf0
extra : histedit_source : d15bde33953b20469fd205f3a0c720f8cae0c08d
2018-06-27 18:11:06 -05:00
Ryan Hunt 6497093aa2 Bug 1471261 - Add global locking around FT_Load_Glyph to work around postscript hinter global data. r=lsalzman
MozReview-Commit-ID: 9ohfqUnPxMc

--HG--
extra : rebase_source : b4a0e02cd0685a1623cc2bd0ffdc34429f3b8729
2018-06-26 11:30:13 -04:00
Lee Salzman 9e14da3f5a Bug 1470515 - refactor ScaledFontFreeType for Android WR. r=rhunt
--HG--
rename : gfx/2d/NativeFontResourceFontconfig.cpp => gfx/2d/NativeFontResourceFreeType.cpp
rename : gfx/2d/NativeFontResourceFontconfig.h => gfx/2d/NativeFontResourceFreeType.h
rename : gfx/2d/ScaledFontCairo.cpp => gfx/2d/ScaledFontFreeType.cpp
rename : gfx/2d/ScaledFontCairo.h => gfx/2d/ScaledFontFreeType.h
2018-06-14 16:42:56 -07:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00