Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5654d7e3839a57e4245d7d99c32447ef3b791cf
https://github.com/WebKit/WebKit/commit/e5654d7e3839a57e4245d7d99c32447ef3b791cf
Author: Nikolas Zimmermann <[email protected]>
Date: 2025-12-03 (Wed, 03 Dec 2025)
Changed paths:
M Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp
M Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.h
M Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp
M Source/WebCore/platform/graphics/texmap/BitmapTexture.h
M Source/WebCore/platform/graphics/texmap/TextureMapper.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapper.h
M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h
Log Message:
-----------
[TextureMapper] Add support for physical/logical size difference in
BitmapTexture
https://bugs.webkit.org/show_bug.cgi?id=303312
Reviewed by Carlos Garcia Campos.
Introduce m_allocatedSize to BitmapTexture to track the actual allocated
buffer size, which may differ from the logical m_size when using
specific tiled texture formats that require e.g. 64x64 alignment.
When rendering textures with allocated size differences, adjust UV
coordinates via drawTextureWithPhysicalSize() to sample only the logical
region, preventing rendering artifacts from the padding area.
Add a new ClampUVBounds shader option that clamps texture coordinates
to stay within the logical texture region. This prevents GPU bilinear
filtering from sampling texels in the padding area when the allocated
texture is larger than the logical size, which would otherwise cause
visible artifacts at texture edges.
* Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp:
(WebCore::MemoryMappedGPUBuffer::allocatedSize const):
* Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.h:
* Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::allocatedSize const):
* Source/WebCore/platform/graphics/texmap/BitmapTexture.h:
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::drawTexture):
(WebCore::TextureMapper::drawTextureWithPhysicalSize):
* Source/WebCore/platform/graphics/texmap/TextureMapper.h:
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h:
Canonical link: https://commits.webkit.org/303849@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications