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

1679 Коммитов

Автор SHA1 Сообщение Дата
Morris Tseng ce9b629335 Bug 1392200 - Add backface-visibility support for layers-free mode. r=kats
For layers-full mode, we set the backface-visibility to visible because
visibility would be handled by FLB and layers.

MozReview-Commit-ID: CUbeUabfC7K
2017-09-21 14:41:38 +08:00
Randall Barker f48938b5ee Bug 1392705 - part 2: Ensure LayerManagerComposite::RenderToPresentationSurface checks the compositor widget before using it r=kats
MozReview-Commit-ID: 6EP9Pp4h5cP

--HG--
extra : rebase_source : 878dac0056cb96a6206d39bd000425578503ec2b
2017-09-01 11:17:12 -07:00
David Keeler 9df1db2e87 Bug 1369560 - Avoid potentially unsafe snprintf usage in FPSCounter. r=mchang
snprintf returns the number of bytes it would have written when it runs out of
space. This patch makes sure we properly handle this unlikely event in
FPSCounter. This patch also makes sure we don't print out the contents of an
uninitialized buffer.

--HG--
extra : rebase_source : 3b0efdc90aeb1ee17e10a75493af51f2878bfcda
2017-06-02 14:39:15 -07:00
Nicolas Silva 38b33aa593 Bug 1393031 - Separate WebRenderAPI and ResourceUpdateQueue. r=sotaro 2017-09-04 13:59:42 +02:00
Nicolas Silva b067cea354 Bug 1393031 - Expose webrender resource updates in the C++ wrapper. r=sotaro 2017-09-04 13:59:12 +02:00
Matt Woodrow a3ffb3d06c Bug 1381753 - Recompute visible regions for ContainerLayers without intermediate surfaces when needed for invalidation. r=mstange 2017-08-25 15:41:29 +12:00
Sebastian Hengst 4814ba9f4f Backed out changeset 326d1e6cf7b1 (bug 1393031) for bustage at gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp:178: no member named 'AddExternalImage' in 'mozilla::wr::WebRenderAPI' on OS X and also bustage on Windows. r=backout on a CLOSED TREE 2017-08-25 12:42:01 +02:00
Nicolas Silva d415c1134b Bug 1393031 - Expose WebRender's ResourceUpdates to C++. r=sotaro 2017-08-25 11:58:00 +02:00
Sebastian Hengst 8066ec372a Backed out changeset 3b8bb2bc1ac0 (bug 1381753) for unexpectedly passing web-platform-reftest /css/css-transforms-2/transform3d-sorting-001.html. r=backout 2017-08-25 11:51:21 +02:00
Matt Woodrow 032751ce40 Bug 1381753 - Recompute visible regions for ContainerLayers without intermediate surfaces when needed for invalidation. r=mstange 2017-08-25 15:41:29 +12:00
Milan Sreckovic e3cd0a3157 Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in .cpp files in gfx/*. r=milan
MozReview-Commit-ID: 1jESowJKdyp

--HG--
extra : rebase_source : 3839cdea46729a9af05c777215cffcb9f42a2018
2017-08-14 08:29:28 -04:00
sotaro a773ee4276 Bug 1354411 - Rebuild CompositorSessions if WebRender is disabled r=kats
When WebRender creation is failed, WebRender is disabled in gecko. There is a case that WebRenderBridgeParents exist when WebRender is disabled. To handle this, gecko needs to rebuild all CompositorSessions.

There is also a problem related to gfxVars::UseWebRender on compositor thread. If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread tasks. If WebRender creation failure happens at 2nd WebRender creation, several WebRenderBridgeParents for 1st WebRender could exist. IPC messages from WebRenderLayerManager are normally async, then there is a chance that the WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. Further the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents, then content process does not have a way to stop sending PWebRenderBridge IPC until the change of gfxVars::UseWebRender is received. WebRenderBridgeParent related tasks handle the message, but some tasks are done based on gfxVars::UseWebRender. At this time, gfxVars::UseWebRender returned false on compositor thread, then it cause unexpected result for WebRenderBridgeParent and WebRender. To addres this inconsistent situation, WebRenderBridgeParent related tasks on compositor thread stop to use gfxVars::UseWebRender.
2017-08-04 14:36:41 +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
Morris Tseng f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Randall Barker 96a2116ce5 Bug 1370544 - Ensure EGLSurface is created with the same EGLConfig as the context r=jgilbert
MozReview-Commit-ID: 1cN7VzCa2lV
2017-08-02 17:09:37 -07:00
Kearwood Gilbert 21d51ec691 Bug 1310665 - macOS OpenVR Support r=daoshengmu,mattwoodrow
MozReview-Commit-ID: 9CDJpFOcFUB

--HG--
extra : rebase_source : ab1f13bd733a6f295570f58940191b333868a088
extra : source : d527620e9351a04bc70689af6a7369dd09ffeef0
2017-07-04 13:50:40 -07:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Ethan Lin a48f3ac6fe Bug 1378602 - Part2. Move animation data from layer to AnimationInfo. r=kats
MozReview-Commit-ID: 4gv8EfPgsii
2017-07-21 14:21:47 +08:00
Wes Kocher b5bcc4905e Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: CBL7SUEUGKV
2017-07-19 17:29:56 -07:00
Ryan Hunt 017d292cac Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE

--HG--
extra : rebase_source : 68185e949ddf2ae346a5d597d056a7f2d9ea7a28
2017-07-18 18:32:46 -04:00
Kartikaya Gupta 78a69a5578 Bug 1382200 - Eliminate LayerMetricsWrapper::IsScrollInfoLayer entirely by inlining it. r=botond
MozReview-Commit-ID: KX35cjOAQw7

--HG--
extra : rebase_source : 2e451ce0250ec17fc7f1a642e5a8a341c073105d
2017-07-19 09:24:28 -04:00
Kartikaya Gupta 1147b9727c Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r=botond
MozReview-Commit-ID: 1vMBMo5zOhK

--HG--
extra : rebase_source : c7f7e94c87c177cc244885912a916133a7cbfbd3
2017-07-19 09:24:22 -04:00
Ryan Hunt 3f3cb0a954 Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7

--HG--
extra : rebase_source : 0bea14d9e395cab260d2db5135b1f64e9f82b2e2
2017-06-27 19:20:36 -04:00
Randall Barker cead29b94a Bug 1379628 - Ensure pixels for Android dynamic toolbar snapshot get processed even if the toolbar is not visible so pending animations may run r=kats
MozReview-Commit-ID: 9iMFN2gdfKl
2017-07-12 18:53:51 -07:00
David Anderson 1b64928d17 Don't draw diagnostic overlays during drawWindow. (bug 1379828, r=mattwoodrow) 2017-07-10 19:09:34 -07:00
sotaro e79d584602 Bug 1379033 - Remove CompositorBridgeParentBase::GetAnimationStorage() r=kats
The patch removes CompositorBridgeParentBase::GetAnimationStorage and CrossProcessCompositorBridgeParent::GetAnimationStorage, and remove the "aId" parameter to CompositorBridgeParent::GetAnimationStorage, since it's only ever called with "0" as the argument.
2017-07-10 10:03:12 +09:00
Botond Ballo 8e4f219cfd Bug 1375949 - Repurpose AsyncPanZoomController::AsyncMode into a more general AsyncTransformConsumer enum. r=kats
The AsyncTransformConsumer enumeration captures the distinction between
the two main categories of consumers of async transforms: those using
it for hit-testing and related purposes, and those using it for
compositing.

MozReview-Commit-ID: 59CICcnPvY6

--HG--
extra : rebase_source : ba505e6b2b6f42592660074939a6d24aab7f73ff
2017-06-30 14:31:28 -04:00
Matt Woodrow 94247181df Bug 1377324 - Don't compute prepared data multiple times for ContainerLayers that are duplicated. r=miko 2017-07-07 14:14:19 +12:00
Matt Woodrow 4fd709b953 Bug 1377324 - Don't clear prepared data during rendering since we can visit Layers multiple times in the presence of plane splitting. r=miko 2017-07-07 14:14:11 +12:00
David Anderson 208baf0a94 Backed out changeset 8eb05f9fc699 for breaking Mac URL bars. (bug 1366618) 2017-07-06 12:13:46 -07:00
David Anderson 7b27fc5e03 Use greyscale instead of subpixel AA for complex intermediate surfaces. (bug 1366618, r=milan)
--HG--
extra : rebase_source : 95cb64f3b7de631411bc16d109d4b3cade1eea33
2017-07-05 15:43:58 -07:00
Nathan Froyd 6c8193aed4 Bug 1377962 - add more override declarations for Android-only methods; r=snorp
Trying to get the build running with clang again revealed a few more
missing override declarations.
2017-07-05 16:56:28 -04:00
Nicholas Nethercote 26f8199a36 Bug 1375776 (part 5) - Pass in a TimeStamp to LayerTranslationMarkerPayload(). r=mstange.
This makes it more like all the other payload classes.

--HG--
extra : rebase_source : dd30741f487158ace8f9c0427a5c4b00f051ff7b
2017-06-23 16:24:21 +10:00
Nicholas Nethercote 5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
sotaro ca474bba44 Bug 1376532 - Do crahs if CreateRenderTexture() is not implemented also on release build r=nical 2017-06-28 10:31:57 -07:00
Ryan Hunt cfc792bc4c Bug 1351783 part 1 - Add includes for unified build issues. r=kats
MozReview-Commit-ID: D57bbW4pmPZ

--HG--
extra : rebase_source : 9af2973a112c7ea641876c1f945797f2c7c945ce
2017-06-05 18:03:02 -05:00
Kartikaya Gupta 34903d0ba6 Bug 1376215 - Stop exposing the WrClipRegionToken in WebRenderAPI.h APIs. r=jrmuizel
No functional changes intended in this patch. It merely simplifies the
additional patch that we'll need to update gecko past WR cset 0bf6655,
and saves some potential manual rebasing work.

MozReview-Commit-ID: Km8dBotP3NQ

--HG--
extra : rebase_source : 77c34ec1cbbc1c0fe4d1971feb131d30c97f0d66
2017-06-26 07:49:52 -04:00
David Anderson 6376e2c6bb Initial import of Advanced Layers. (bug 1365879 part 20, r=bas) 2017-06-23 14:23:12 -07:00
Carsten "Tomcat" Book 88fff78f64 Merge mozilla-central to mozilla-inbound 2017-06-23 12:22:24 +02:00
Carsten "Tomcat" Book 4119f2f8fb Backed out changeset 8069471cda21 (bug 1365879) 2017-06-23 12:15:35 +02: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
David Anderson 8eb9963527 Initial import of Advanced Layers. (bug 1365879 part 20, r=bas)
--HG--
extra : rebase_source : 57032a3e3d383c27cfdc2f26841d387ca57d0011
2017-06-22 21:12:19 -07:00
Nicholas Nethercote 915a56fb41 Bug 1375299 (part 2) - Remove PROFILER_MARKER. r=mstange.
PROFILER_MARKER is now just a trivial wrapper for profiler_add_marker(). This
patch removes it.

--HG--
extra : rebase_source : 9858f34763bb343757896a91ab7ad8bd8e56b076
2017-06-22 13:40:21 +10:00
Nicholas Nethercote 4183270eec Bug 1375275 (part 3) - Remove profiler_log(). r=mstange.
It's a wafer thin wrapper around profiler_tracing() and it's only used three
times. Let's just remove it.

Note also that those three uses are the only places where TRACING_EVENT is
used. I wonder if they're really needed...

--HG--
extra : rebase_source : ac70b4c77c4592d96957a8e6249597eafc822fd4
2017-06-21 20:50:07 +10:00
Matt Woodrow eafc8e49e9 Bug 1373335 - Make sure we clip the opaque region in render target coordinate space, since complex transforms mean that we can't always have a rectangular representation of clips in layer space. r=mstange 2017-06-22 12:41:16 +12:00
David Anderson 9467c3d33c Don't require a Compositor for setting DiagnosticTypes. (bug 1365879 part 14, r=mattwoodrow) 2017-06-20 01:17:20 -07:00
David Anderson d1eec3b0e9 Don't require a Compositor to track async compositable ownership. (bug 1365879 part 13, r=mattwoodrow) 2017-06-20 01:17:20 -07:00
David Anderson 3a500a9070 Don't require a Compositor for texture backend checks. (bug 1365879 part 12, r=mattwoodrow) 2017-06-20 01:17:19 -07:00
David Anderson f23fbf5237 Add a way to extract TextureSources from a BigImageIterator. (bug 1365879 part 9, r=mattwoodrow) 2017-06-20 01:17:18 -07:00
David Anderson 737535e6d0 Refactor ImageHost to allow acquiring the current TextureSource without locking the underlying TextureHost. (bug 1365879 part 8, r=mattwoodrow) 2017-06-20 01:17:18 -07:00