Commit Graph

309 Commits

Author SHA1 Message Date
sotaro
e29e7918c2 Bug 1649122 - Add basic AHardwareBuffer support to WebRender on android r=jrmuizel
android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D82317
2020-07-10 18:50:56 +00:00
Miko Mynttinen
37ad979d86 Bug 1536515 - Part 2: Add constructors that take GLContext to GLTextureSource and DirectMapTextureSource r=nical
Differential Revision: https://phabricator.services.mozilla.com/D80505
2020-07-07 17:56:59 +00:00
sotaro
c10fefca07 Bug 1648411 - Add AHardwareBuffer layer buffer support on android r=jnicol
AHardwareBuffer is supported since Android O(APIVersion 26). Implementation of AndroidHardwareBufferTextureData referred AndroidNativeWindowTextureData. Implementation of AndroidHardwareBufferTextureHost referred obsoleted GrallocTextureHost.

android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D81808
2020-07-02 13:43:19 +00:00
sotaro
8d9c9eb55d Bug 1648076 - Use AndroidSurfaceTexture related files only on Android r=jgilbert
No functional change. AndroidSurfaceTexture related files are used on all platforms. They are needed only on Android.

Differential Revision: https://phabricator.services.mozilla.com/D80869
2020-06-24 18:59:14 +00:00
Martin Stransky
6f3e3bc7bf Bug 1645704 [Wayland] Rename WaylandDMABufSurface to DMABufSurface at gxf, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D79637
2020-06-21 13:59:17 +00:00
sotaro
b00fb477aa Bug 1621836 - Make SurfaceTextureHost::NumSubTextures() returns 0 when SurfaceTexture does not exist r=nical
When NumSubTextures() returns 0, SurfaceTextureHost is not rendered to WebRebder by a check of AsyncImagePipelineManager::UpdateImageKeys().

Differential Revision: https://phabricator.services.mozilla.com/D66514
2020-03-13 14:42:24 +00:00
sotaro
4225d45349 Bug 1617808 - Re-deliver PREFER_COMPOSITOR_SURFACE flag to WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D64007
2020-03-10 03:52:08 +00:00
Narcis Beleuzu
019e5b6cbc Backed out changeset 0cb5cf87cb27 (bug 1617808) for bustages on bindings.rs . CLOSED TREE 2020-03-10 02:16:24 +02:00
sotaro
610ea8b21e Bug 1617808 - Re-deliver PREFER_COMPOSITOR_SURFACE flag to WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D64007
2020-03-01 22:06:11 +00:00
Simon Giesecke
83e48517da Bug 1613985 - Use default for equivalent-to-default constructors/destructors in gfx. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65288
2020-03-04 15:39:20 +00:00
sotaro
bb2ccb6d86 Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55922
2019-12-06 06:53:57 +00:00
Martin Stransky
4090a11278 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

Differential Revision: https://phabricator.services.mozilla.com/D46841
2019-09-24 11:06:39 +00:00
Oana Pop Rus
bce3eb1310 Backed out 8 changesets (bug 1578380) for causing build bustages in ContentClient.cpp on a CLOSED TREE
Backed out changeset 28c2e884d20a (bug 1578380)
Backed out changeset 373c4563e9fd (bug 1578380)
Backed out changeset 3fdbc241d63a (bug 1578380)
Backed out changeset 754865b2810f (bug 1578380)
Backed out changeset b80b7e186f02 (bug 1578380)
Backed out changeset 3a8abb5d7a43 (bug 1578380)
Backed out changeset 2b52c3d15b7b (bug 1578380)
Backed out changeset ca57727c3aad (bug 1578380)
2019-09-24 13:06:55 +03:00
Martin Stransky
75ae52f943 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

Differential Revision: https://phabricator.services.mozilla.com/D46841
2019-09-24 09:10:11 +00:00
Imanol Fernandez
a0ed1f5313 Bug 1561667 - Ensure that SurfaceTexture is attached before calling ReleaseTexImage. r=jgilbert,rbarker
Ensure that SurfaceTexture is attached before calling ReleaseTexImage.

Differential Revision: https://phabricator.services.mozilla.com/D38679
2019-07-22 21:16:11 +00:00
Sylvestre Ledru
90f14f282a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35622
2019-07-06 08:18:28 +00:00
Jeff Gilbert
640926e19b Bug 1560157 - Remove EGLUtils.h. r=lsalzman
EGLImageWrapper was completely unused.

Differential Revision: https://phabricator.services.mozilla.com/D35349
2019-06-21 16:53:09 +00:00
Noemi Erli
d76b4d3a01 Backed out changeset d909b10d7a39 (bug 1560157) for causing build bustages in TextureHostOGL.cpp CLOSED TREE 2019-06-21 02:48:27 +03:00
Jeff Gilbert
636b91dce6 Bug 1560157 - Remove EGLUtils.h. r=lsalzman
EGLImageWrapper was completely unused.

Differential Revision: https://phabricator.services.mozilla.com/D35349
2019-06-20 23:13:56 +00:00
Jeff Gilbert
225c7e74c6 Bug 1559524 - Remove EGL_DISPLAY macro. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D35102
2019-06-15 05:14:53 +00:00
sotaro
199f5925ec Bug 1554091 - Remove WrExternalImageBufferType r=jrmuizel
If ExternalImageType is just passed from C to rust, it caused crash on non-Windows platform. It was caused by stack corruption. Then &ExternalImageType is used instead of ExternalImageType to bypass the problem.

Differential Revision: https://phabricator.services.mozilla.com/D32436
2019-05-28 22:03:54 +00:00
Sylvestre Ledru
1ad0cac654 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098
2019-04-05 21:41:42 +00:00
Csoregi Natalia
2ded4ab36d Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
ebe9c62d30 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
6b9ce2a82b Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
194039a8d9 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098
2019-04-04 20:12:23 +00:00
sotaro
8028fdaf9c Bug 1532201 - Enable SurfaceFactory_EGLImage usage with WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D24668
2019-04-02 03:16:20 +00:00
arthur.iakab
a7362eae0f Backed out changeset 48d248c9f5fd (bug 1532201) for causing multiple build bustages on TextureHostOGL.cpp CLOSED TREEE 2019-04-02 02:36:51 +03:00
sotaro
3cf83d532d Bug 1532201 - Enable SurfaceFactory_EGLImage usage with WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D24668
2019-04-01 22:07:47 +00:00
Jeff Gilbert
8e894f5e81 Bug 1528394 - Reduce includes of GLContext.h. r=lsalzman
Splitting part of OGLShaderProgram.h out into OGLShaderConfig.h makes it
easier to keep GLContext.h included in OGLShaderProgram.h for inlining
purposes.

Differential Revision: https://phabricator.services.mozilla.com/D20017
2019-02-19 23:25:42 +00:00
Dorel Luca
d6b222d4f6 Backed out changeset 2c28c2185a32 (bug 1528394) for build bustage. CLOSED TREE 2019-02-19 22:09:07 +02:00
Jeff Gilbert
2a66371508 Bug 1528394 - Reduce includes of GLContext.h. r=lsalzman
Splitting part of OGLShaderProgram.h out into OGLShaderConfig.h makes it
easier to keep GLContext.h included in OGLShaderProgram.h for inlining
purposes.

Differential Revision: https://phabricator.services.mozilla.com/D20017
2019-02-19 05:23:54 +00:00
Ehsan Akhgari
498e2df734 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset
2019-01-18 10:16:18 +01:00
Sylvestre Ledru
3ece000f7a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D15426
2018-12-28 15:48:06 +00:00
sotaro
2bb3230ce2 Bug 1415020 - Deallocate device data of TextureImageTextureSourceOGL during destroying CompositorOGL r=nical 2018-12-11 17:54:14 +09:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
sotaro
a2e44a90bc Bug 1510174 - Fix WrExternalImageBufferType in SurfaceTextureHost::CreateRenderTexture() r=kats
By accident, WrExternalImageBufferType::TextureRectHandle was set in SurfaceTextureHost::CreateRenderTexture() instead of WrExternalImageBufferType::TextureExternalHandle in Bug 1499255.

Differential Revision: https://phabricator.services.mozilla.com/D13050
2018-11-29 15:39:51 +00:00
sotaro
64b69aa348 Bug 1499255 - Make SurfaceTextureHost to support WebRender r=nical 2018-11-16 11:22:15 +09:00
Doug Thayer
091e4b54ce Bug 1483533 - Switch to glClientWaitSync for texture syncing r=jrmuizel
glFenceSync/glClientWaitSync just seem to be more well supported
on nvidia hardware, and they work fine as well on AMD/intel, so
I'm transitioning to that.

Depends on D6463

Differential Revision: https://phabricator.services.mozilla.com/D6464
2018-09-25 13:41:25 +00:00
Nicolas Silva
dbe2598583 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
Doug Thayer
f962ba53fa Bug 1478704 - Use GL_TEXTURE_RECTANGLE_ARB for client storage r=jrmuizel
Now that the shader problems are fixed it's a simple switch.

MozReview-Commit-ID: 6MJlEVITwii
2018-07-26 16:55:55 -07:00
Andreea Pavel
87d56d9dfb Backed out 3 changesets (bug 1478704) on request by dthayer for breaking video
Backed out changeset c57be31d3c06 (bug 1478704)
Backed out changeset c77acf366e1c (bug 1478704)
Backed out changeset 3329c8f5582a (bug 1478704)
2018-07-28 01:23:16 +03:00
Doug Thayer
aee310dd82 Bug 1478704 - Use GL_TEXTURE_RECTANGLE_ARB for client storage r=jrmuizel
Now that the shader problems are fixed it's a simple switch.

MozReview-Commit-ID: 6MJlEVITwii
2018-07-26 16:55:55 -07:00
Doug Thayer
577b4daf2d Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2
2018-05-05 15:46:26 -07:00
Doug Thayer
2ed2b12b20 Bug 1265824 - Add a new texture source type "DirectMapTextureSource" r=mattwoodrow
The DirectMapTextureSource could let the compositor to read the buffer directly.
That could get rid of some memory copy operations during texture uploading.

MozReview-Commit-ID: CHhoR96P7VG
2018-05-02 18:20:10 -07:00
Doug Thayer
c1529e018f Bug 1265824 - Remove the unsed member in GLTextureSource r=mattwoodrow
The "mExternallyOwned" is used for gralloc buffer. We don't use the gralloc buffer now.

MozReview-Commit-ID: 7Gurpa3kdp0
2018-05-02 18:19:54 -07:00
Cosmin Sabou
6919bdcb41 Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824)
Backed out changeset 27c7daabd1a3 (bug 1265824)
Backed out changeset 7c90215a2eca (bug 1265824)
Backed out changeset c141fb67cf9a (bug 1265824)
Backed out changeset 239ab9f9ef52 (bug 1265824)
Backed out changeset 39ae151b3d8c (bug 1265824)
Backed out changeset 71b23fbe1fec (bug 1265824)
Backed out changeset 295dd1a6a09f (bug 1265824)
Backed out changeset 6aecd088e02c (bug 1265824)
Backed out changeset bf9d73b214fc (bug 1265824)
2018-07-23 19:36:37 +03:00
Doug Thayer
a786b427cc Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2
2018-05-05 15:46:26 -07:00
Doug Thayer
f6c2a5f203 Bug 1265824 - Add a new texture source type "DirectMapTextureSource" r=mattwoodrow
The DirectMapTextureSource could let the compositor to read the buffer directly.
That could get rid of some memory copy operations during texture uploading.

MozReview-Commit-ID: CHhoR96P7VG
2018-05-02 18:20:10 -07:00
Doug Thayer
0da3ddeb61 Bug 1265824 - Remove the unsed member in GLTextureSource r=mattwoodrow
The "mExternallyOwned" is used for gralloc buffer. We don't use the gralloc buffer now.

MozReview-Commit-ID: 7Gurpa3kdp0
2018-05-02 18:19:54 -07:00