[webkit-changes] [WebKit/WebKit] 9b290c: Cherry-pick 267560 at main (bb7a34a9631c). <bug>

Carlos Garcia Campos noreply at github.com
Fri Sep 8 00:32:04 PDT 2023


  Branch: refs/heads/webkitglib/2.42
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b290c232c1729e41c9f004ef73a34caa7d017a2
      https://github.com/WebKit/WebKit/commit/9b290c232c1729e41c9f004ef73a34caa7d017a2
  Author: Žan Doberšek <zdobersek at igalia.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h

  Log Message:
  -----------
  Cherry-pick 267560 at main (bb7a34a9631c). <bug>

    [JSC] Unreviewed RISCV64 build fix

    Fix the RISCV64 build of JavaScriptCore. In MacroAssemblerRISCV64, the
    supportsCountPopulation() static function is added, returning false,
    since the underlying RISC-V functions are only available with certain
    extensions we currently can't hard-depend on. No-op templates are added
    for two related count-population methods.

    * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:
    (JSC::MacroAssemblerRISCV64::supportsCountPopulation):

    Canonical link: https://commits.webkit.org/267560@main


  Commit: 2b0a1e382b366437f13f29123abbb4f0ea9dd8a2
      https://github.com/WebKit/WebKit/commit/2b0a1e382b366437f13f29123abbb4f0ea9dd8a2
  Author: Akihiro Kiuchi <Akihiro.Kiuchi at sony.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp
    M Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperGL.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

  Log Message:
  -----------
  Cherry-pick 267599 at main (499bdf98d4a7). https://bugs.webkit.org/show_bug.cgi?id=261022

    Move filter specific code from BitmapTextureGL to TextureMapperGL.
    https://bugs.webkit.org/show_bug.cgi?id=261022

    Reviewed by Fujii Hironori.

    This is a preparation refactoring for https://bugs.webkit.org/show_bug.cgi?id=231653.

    To fix the issue above, we have to change the number of passes needed to
    do blur filtering according to the standard deviation of the blur.
    Now the number of passes for each filter is specified in
    BitmapTextureGL.cpp but other parameters regarding filtering such as
    shader options are specified in TextureMapperGL.cpp, which leads to the
    inconsistency and low readability.

    This change moves filter specific code from BitmapTextureGL.cpp
    to TextureMapperGL.cpp

    * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp:
    (WebCore::BitmapTextureGL::applyFilters):
    (WebCore::getPassesRequiredForFilter): Deleted.
    * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h:
    (WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
    (WebCore::BitmapTextureGL::setFilterInfo):
    * Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:
    (WebCore::TextureMapperGL::drawTexture):
    (WebCore::TextureMapperGL::drawTexturePlanarYUV):
    (WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
    (WebCore::TextureMapperGL::drawTexturePackedYUV):
    (WebCore::TextureMapperGL::drawFilterPass):
    (WebCore::getPassesRequiredForFilter):
    (WebCore::TextureMapperGL::applyFilter):
    (WebCore::TextureMapperGL::drawFiltered): Deleted.
    * Source/WebCore/platform/graphics/texmap/TextureMapperGL.h:
    * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
    (WebCore::TextureMapperLayer::paintIntoSurface):

    Canonical link: https://commits.webkit.org/267599@main


  Commit: e9cc37c74045a5ceaa356c37802b1dbddaec0775
      https://github.com/WebKit/WebKit/commit/e9cc37c74045a5ceaa356c37802b1dbddaec0775
  Author: Akihiro Kiuchi <Akihiro.Kiuchi at sony.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperGL.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h

  Log Message:
  -----------
  Cherry-pick 267646 at main (57b05d82091b). https://bugs.webkit.org/show_bug.cgi?id=261101

    [TextureMapper] Shrink texture before applying large radius blur
    https://bugs.webkit.org/show_bug.cgi?id=261101

    Reviewed by Fujii Hironori.

    As Bug231653 pointed out, current blurring causes a mosaic artifacts
    when the blur radius is large.

    This is because the size of kernel for gaussian blur is fixed and the
    implementation just expanded the kernel according to the blur radius.
    So the radius is too large, kernel size is smaller than the number of
    pixels which should be convolved in a pixel, that is there are unsampled
    pixels between the pixels that the adjacent elements of the kernel
    sample.

    This periodical missing of pixels leads to the mosaic artifact.

    This fix first shrinks the texture so that there is no gap between
    kernel elements, and aligns the kernel elements to pixels precisely.

    * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h:
    (WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
    * Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:
    (WebCore::TextureMapperGCGLPlatformLayer::paintToTextureMapper):
    * Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:
    (WebCore::optionsForFilterType):
    (WebCore::blurRadiusToKernelHalfSize):
    (WebCore::kernelHalfSizeToBlurRadius):
    (WebCore::gauss):
    (WebCore::computeGaussianKernel):
    (WebCore::prepareFilterProgram):
    (WebCore::TextureMapperGL::drawTexture):
    (WebCore::TextureMapperGL::drawTexturePlanarYUV):
    (WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
    (WebCore::TextureMapperGL::drawTexturePackedYUV):
    (WebCore::TextureMapperGL::drawTextureCopy):
    (WebCore::TextureMapperGL::drawBlurred):
    (WebCore::TextureMapperGL::applyBlurFilter):
    (WebCore::TextureMapperGL::applyDropShadowFilter):
    (WebCore::TextureMapperGL::applySinglePassFilter):
    (WebCore::TextureMapperGL::applyFilter):
    (WebCore::gaussianKernel): Deleted.
    (WebCore::TextureMapperGL::drawFilterPass): Deleted.
    (WebCore::getPassesRequiredForFilter): Deleted.
    * Source/WebCore/platform/graphics/texmap/TextureMapperGL.h:
    * Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
    (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
    * Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:
    (WebCore::TextureMapperPlatformLayerProxyDMABuf::DMABufLayer::paintToTextureMapper):
    * Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:
    (WebCore::TextureMapperShaderProgram::create):
    * Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h:

    Canonical link: https://commits.webkit.org/267646@main


  Commit: 59e6e67d6b8b2dcac0ca3f39e75426f58576af4a
      https://github.com/WebKit/WebKit/commit/59e6e67d6b8b2dcac0ca3f39e75426f58576af4a
  Author: Akihiro Kiuchi <Akihiro.Kiuchi at sony.com>
  Date:   2023-09-08 (Fri, 08 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:
  -----------
  Cherry-pick 267687 at main (14f7f3375957). https://bugs.webkit.org/show_bug.cgi?id=261187

    [TextureMapper] Do texture transformation in vertex shader when copying texture
    https://bugs.webkit.org/show_bug.cgi?id=261187

    Reviewed by Fujii Hironori.

    With the current implementation, transformation of texture coordinate
    is performed in a fragment shader when copying texture or applying blur.

    This change will move the transformation to vertex shader for better
    performance.

    * Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:
    (WebCore::TextureMapperGL::drawTextureCopy):
    (WebCore::TextureMapperGL::drawBlurred):
    * Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:
    * Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h:

    Canonical link: https://commits.webkit.org/267687@main


  Commit: d3d4dad6e880a4dbd23b146992d10f30cbae1edd
      https://github.com/WebKit/WebKit/commit/d3d4dad6e880a4dbd23b146992d10f30cbae1edd
  Author: Akihiro Kiuchi <Akihiro.Kiuchi at sony.com>
  Date:   2023-09-08 (Fri, 08 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:
  -----------
  Cherry-pick 267715 at main (437b5540d082). https://bugs.webkit.org/show_bug.cgi?id=261102

    [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


Compare: https://github.com/WebKit/WebKit/compare/7ea615c41bcd...d3d4dad6e880


More information about the webkit-changes mailing list