[webkit-changes] [WebKit/WebKit] 8a6927: [GTK][WPE][Skia] Switch UnacceleratedBuffer buffer...

Nikolas Zimmermann noreply at github.com
Tue Sep 17 10:51:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a692724af8345c25047dd8ff9620c3eec2673b9
      https://github.com/WebKit/WebKit/commit/8a692724af8345c25047dd8ff9620c3eec2673b9
  Author: Nikolas Zimmermann <nzimmermann at igalia.com>
  Date:   2024-09-17 (Tue, 17 Sep 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/nicosia/NicosiaBuffer.cpp
    M Source/WebCore/platform/graphics/nicosia/NicosiaBuffer.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/coordinated/CoordinatedBackingStore.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp

  Log Message:
  -----------
  [GTK][WPE][Skia] Switch UnacceleratedBuffer buffer format to RGBA
https://bugs.webkit.org/show_bug.cgi?id=279614

Reviewed by Miguel Gomez.

Cairo rendering was performed in BGRA/ARGB (little/big-endian) and
BitmapTexture had to take care of converting to RGBA, when mapping
CPU-rendered buffers to GL textures. Skia supports RGBA directly, saving
the color conversion in TextureMapperShaderProgram.

Testing on desktop/rpi4 shows this change is perf neutral. This is a
preparation to introduce a hybrid rendering mode, where both CPU/GPU
participate in the rendering pipeline, simultaneously.

* Source/WebCore/platform/graphics/nicosia/NicosiaBuffer.cpp:
(Nicosia::UnacceleratedBuffer::UnacceleratedBuffer):
(Nicosia::UnacceleratedBuffer::pixelFormat const):
* Source/WebCore/platform/graphics/nicosia/NicosiaBuffer.h:
* Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::BitmapTexture):
(WebCore::BitmapTexture::reset):
(WebCore::BitmapTexture::updateContents):
(WebCore::BitmapTexture::copyFromExternalTexture):
(WebCore::BitmapTexture::colorConvertFlags const):
* Source/WebCore/platform/graphics/texmap/BitmapTexture.h:
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::drawNumber):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.cpp:
(WebCore::CoordinatedPlatformLayerBufferNativeImage::tryEnsureBuffer):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp:
(WebCore::CoordinatedPlatformLayerBufferVideo::paintToTextureMapper):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list