[webkit-changes] [WebKit/WebKit] 437b55: [TextureMapper] Use linear sampling when blurring ...
Commit Queue
noreply at github.com
Wed Sep 6 20:28:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 437b5540d082a86c275db503fe8db8e0de51bbcc
https://github.com/WebKit/WebKit/commit/437b5540d082a86c275db503fe8db8e0de51bbcc
Author: Akihiro Kiuchi <Akihiro.Kiuchi at sony.com>
Date: 2023-09-06 (Wed, 06 Sep 2023)
Changed paths:
M Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h
Log Message:
-----------
[TextureMapper] Use linear sampling when blurring for better performance
https://bugs.webkit.org/show_bug.cgi?id=261102
Reviewed by Fujii Hironori.
To reduce the GPU load for gaussian blur, this fix reduces the size of
kernel use for the blur.
By adjusting the position(offset) to sample the texture and the weight
of each element of the kernel so that the linear interpolation during
texture sampling samples two texels and properly weights them, we can
reduce the size of the kernel without changing behaviour.
* Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::kernelHalfSizeToSimplifiedKernelHalfSize):
(WebCore::computeGaussianKernel):
(WebCore::TextureMapperGL::drawBlurred):
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h:
Canonical link: https://commits.webkit.org/267715@main
More information about the webkit-changes
mailing list