Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 49ef3002488aa8b83b2f1975816d4172863f1554 https://github.com/WebKit/WebKit/commit/49ef3002488aa8b83b2f1975816d4172863f1554 Author: Nikolas Zimmermann <nzimmerm...@igalia.com> Date: 2025-05-15 (Thu, 15 May 2025)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/perspective-transforms-equivalence.html M Source/WebCore/SourcesGTK.txt M Source/WebCore/SourcesWPE.txt M Source/WebCore/platform/TextureMapper.cmake A Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp A Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.h M Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.cpp M Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.h M Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp M Source/WebCore/platform/graphics/texmap/BitmapTexture.h M Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreTile.cpp Log Message: ----------- [GTK][WPE] Add support for memory-mapped GPU buffers https://bugs.webkit.org/show_bug.cgi?id=290800 Reviewed by Carlos Garcia Campos. When using CPU rendering we produce pixel data that has to be uploaded into a GL texture for composition - usually using glTexSubImage2D(). In order to save precious memory bandwidth on embedded devices, explore an alternative mechanism, where buffer uploading happens out of the scope of OpenGL to avoid overhead, such as copying the pixel data into a staging buffer in Mesa etc. The idea is to create a GBM buffer object, export it as a dma-buf, wrap the dma-buf in an EGLImage and use it as backing for a regular OpenGL texture, using glEGLImageTargetTexture2DOES(). Later on to update the texture, one can mmap() the dma-buf fd, to gain write access to the dma-buf. All memory operations have to be fenced using DMA_BUF_SYNC_* system calls to ensure that the data is properly synchronized between CPU and GPU (on shared memory systems, that are common in embedded). Optimize BitmapTexture::updateContents() for the case when we want to update a linear, mappable texture (backed by a dma-buf). Avoid using glCopyTexSubImage2D, and use memcpy() instead on the mapped memory region -- that avoids driver pitfalls, giving more control about when synchronization happens. Allocate tile textures always using GL_NEAREST instead of GL_LINEAR filter -- GL_NEAREST is less expensive than GL_LINEAR, consuming less bandwidth. However, it can only be used for textures that are not scaled/filtered/... to avoid quality loss. Add WEBKIT_SKIA_USE_LINEAR_TILE_TEXTURES environment variable, only when set to 1 linear textures are used for the tiles. Off by default, since the benefit is highly platform dependant. Canonical link: https://commits.webkit.org/294962@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes