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

16 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 3faf29b5c5 Bug 1592150 - Remove CurrentSurfaceInvalidRegion(). Callers now always just repaint the update region that they supplied. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D51761

--HG--
extra : moz-landing-system : lando
2019-11-19 03:11:26 +00:00
Markus Stange ba013d0f42 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-13 18:55:18 +00:00
Markus Stange 80c235777f Bug 1594950 - Bake the layer size and its opaqueness into the layer, don't allow mutating it. r=jrmuizel
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 18:46:02 +00:00
Cosmin Sabou 1d71e9f510 Backed out 4 changesets (bug 1594950) for turning bug 1405083 into permafail.
Backed out changeset 684a87e91d94 (bug 1594950)
Backed out changeset adea6912c3a3 (bug 1594950)
Backed out changeset aea7108204e9 (bug 1594950)
Backed out changeset 15baea8520de (bug 1594950)
2019-11-13 06:44:24 +02:00
Markus Stange 2db4b324b7 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-12 19:50:26 +00:00
Markus Stange 82452d888a Bug 1594950 - Bake the layer size and its opaqueness into the layer, don't allow mutating it. r=jrmuizel
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 19:50:25 +00:00
Markus Stange e2f8c029aa Bug 1591523 - Add NativeLayerRoot::SetLayers. r=jrmuizel
This allows us to somewhat cheaply swap out the entire set of layers.
It also means that clearing the array of layers no longer has quadratic complexity;
in the past, you would do this by calling RemoveLayer once per layer, and RemoveLayer
does a linear scan through the array.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 20:31:44 +00:00
Bogdan Tara f866fef3ad Backed out 3 changesets (bug 1591523) for bustages complaining about RenderCompositorOGL.cpp CLOSED TREE
Backed out changeset 407f051e14db (bug 1591523)
Backed out changeset b4c8080dae86 (bug 1591523)
Backed out changeset abb627bc4f75 (bug 1591523)
2019-10-29 22:00:05 +02:00
Markus Stange eb84b69274 Bug 1591523 - Add NativeLayerRoot::SetLayers. r=jrmuizel
This allows us to somewhat cheaply swap out the entire set of layers.
It also means that clearing the array of layers no longer has quadratic complexity;
in the past, you would do this by calling RemoveLayer once per layer, and RemoveLayer
does a linear scan through the array.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 19:25:36 +00:00
Markus Stange 98f1e26c4e Bug 1587940 - Add NativeLayer::SetClipRect and implement it for Core Animation with a parent layer that has masksToBounds=YES. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50723

--HG--
extra : moz-landing-system : lando
2019-10-29 19:25:27 +00:00
Markus Stange 64c13fc106 Bug 1587940 - Remove capability for opaque regions from NativeLayer interface. r=jrmuizel
This change makes opaqueness a boolean per layer again. The opaque region is
currently only used by the temporary WebRender code; the future WebRender code
won't use it. Removing this support simplifies the code and makes it easier to
implement clipping.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 19:24:24 +00:00
Markus Stange c6660314f0 Bug 1578099 - Add NativeLayer::NextSurfaceAsFramebuffer. r=mattwoodrow
This returns the raw framebuffer GLuint and lets the caller bind it.
Initially I wanted to return a RefPtr<MozFramebuffer>, but then I discovered
that MozFramebuffer is not a refcounted class and prefers UniquePtrs.

Depends on D44324

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:35:56 +00:00
Markus Stange e6da884bfd Bug 1578099 - Add NativeLayer::NextSurfaceAsDrawTarget. r=mattwoodrow
This uses MacIOSurface internally. NextSurfaceAsDrawTarget locks the MacIOSurface,
and NotifySurfaceReady unlocks it if necessary.

Depends on D44321

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

--HG--
extra : moz-landing-system : lando
2019-09-01 23:22:04 +00:00
Markus Stange 975773c0ae Bug 1578099 - Make more NativeLayerCA methods available on NativeLayerCA. r=mattwoodrow
The comments above these methods refer to NextSurface* methods which will be
added in later patches.

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

--HG--
extra : moz-landing-system : lando
2019-09-01 20:54:07 +00:00
Markus Stange 32ec0f3341 Bug 1491448 - Add NativeLayer::SetOpaqueRegion and implement it for NativeLayerCA by assembling opaque and transparent sublayers to cover the regions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D40553

--HG--
extra : moz-landing-system : lando
2019-08-19 22:54:26 +00:00
Markus Stange 3cfb0f5ea9 Bug 1491442 - Add interfaces mozilla::layers::NativeLayerRoot and NativeLayer, and add CoreAnimation implementations NativeLayerRootCA and NativeLayerCA. r=jrmuizel
NativeLayerRoot and NativeLayer allow building up a flat layer "tree" of sibling
layers. They're created and manipulated with a synchronous-looking API, but any
changes will only be applied to the underlying native layers when ApplyChanges()
is called. This ensures that the modifications can be limited to run within a
CoreAnimation transaction, and on a thread of the caller's choosing.
In the near future I'm planning to have LayerManagerComposite create these
layers. That's the reason for the pseudo-abstracted cross-platform C++ API:
LayerManagerComposite can create and place the layers, and any painting into the
layer surfaces will happen in the compositor implementations with platform-specific
code.
For now, the CoreAnimation implementation is the only implementation. I think
the current API will let us use the same infrastructure for DirectComposite
layers on Windows, but we'll likely need to make some API modifications once we
attempt that.
The classes are threadsafe; their methods can be called on any thread and the
caller is responsible for sufficient synchronization. In reality, there are only
two threads that would have a reason to use these layers: The compositor thread
and the main thread. The main thread creates and destroys the NativeLayerRootCA,
and sometimes it calls ApplyChanges, e.g. during window resizes. It also calls
SetBackingScale. All other methods are usually only called on the compositor
thread.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:30:02 +00:00