Branch: refs/heads/webkitglib/2.48
  Home:   https://github.com/WebKit/WebKit
  Commit: ffa624c2dba1d4e644a1dc970084cf53ed25200b
      
https://github.com/WebKit/WebKit/commit/ffa624c2dba1d4e644a1dc970084cf53ed25200b
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2025-05-27 (Tue, 27 May 2025)

  Changed paths:
    M Source/WebCore/platform/Skia.cmake
    M Source/WebCore/platform/SourcesSkia.txt
    M Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.cpp
    M Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.h
    A Source/WebCore/platform/graphics/skia/SkiaRecordingResult.cpp
    A Source/WebCore/platform/graphics/skia/SkiaRecordingResult.h
    M Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp
    M Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.h
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h

  Log Message:
  -----------
  Cherry-pick 292929@main (5abe8ab78cbb). 
https://bugs.webkit.org/show_bug.cgi?id=290614

    [GTK][WPE][Skia] Record all dirty tiles of a layer once, don't record each 
tile
    https://bugs.webkit.org/show_bug.cgi?id=290614

    Reviewed by Carlos Garcia Campos.

    For each layer, we currently record each dirty tile, then replay in a worker
    thread. We can do better and once record a SkPicture of the area spanning 
all
    dirty tiles, and then use the same SkPicture for replaying N times, for each
    dirty tile.

    Covered by existing tests.

    * Source/WebCore/platform/Skia.cmake:
    * Source/WebCore/platform/SourcesSkia.txt:
    * Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.cpp:
    (WebCore::SkiaPaintingEngine::paint):
    (WebCore::SkiaPaintingEngine::record):
    (WebCore::SkiaPaintingEngine::replay):
    (WebCore::SkiaPaintingEngine::paintGraphicsLayerIntoBuffer const): Deleted.
    (WebCore::SkiaPaintingEngine::paintLayer): Deleted.
    (WebCore::SkiaPaintingEngine::postPaintingTask): Deleted.
    (WebCore::SkiaPaintingEngine::performPaintingTask): Deleted.
    * Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.h:
    (WebCore::SkiaPaintingEngine::useThreadedRendering const):
    * Source/WebCore/platform/graphics/skia/SkiaRecordingResult.cpp: Added.
    (WebCore::SkiaRecordingResult::SkiaRecordingResult):
    (WebCore::SkiaRecordingResult::create):
    (WebCore::SkiaRecordingResult::hasFences):
    (WebCore::SkiaRecordingResult::waitForFenceIfNeeded):
    * Source/WebCore/platform/graphics/skia/SkiaRecordingResult.h: Added.
    * Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp:
    (WebCore::SkiaReplayCanvas::SkiaReplayCanvas):
    (WebCore::SkiaReplayCanvas::create):
    
(WebCore::SkiaReplayCanvas::waitForRenderingCompletionAndRewrapImageIfNeeded):
    * Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.h:
    * 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.cpp:
    (WebCore::CoordinatedBackingStoreProxy::updateIfNeeded):
    * 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
    (WebCore::CoordinatedPlatformLayer::paint):
    (WebCore::CoordinatedPlatformLayer::record):
    (WebCore::CoordinatedPlatformLayer::replay):
    * 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:

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


  Commit: 52dd3e3db7e70b51d6a54d2c2883d09ac9272864
      
https://github.com/WebKit/WebKit/commit/52dd3e3db7e70b51d6a54d2c2883d09ac9272864
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2025-05-27 (Tue, 27 May 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.cpp

  Log Message:
  -----------
  Cherry-pick 294946@main (a9691ca8fe8a). 
https://bugs.webkit.org/show_bug.cgi?id=293012

    [Gtk][WPE][Skia] Setting WEBKIT_SKIA_GPU_PAINTING_THREADS=0 crashes
    https://bugs.webkit.org/show_bug.cgi?id=293012

    Reviewed by Carlos Garcia Campos.

    To enforce CPU rendering we usually set 
`WEBKIT_SKIA_ENABLE_CPU_RENDERING=1`.
    This causes ProcessCapabilities::canUseAcceleratedBuffers() to return
    false globally. No GPU rendering is performed in that mode.

    Nowadays by default we use threaded rendering with N CPU worker threads
    and M GPU worker threads, where N by default is nCores/2 and M is 2 (when
    more than 4 CPU cores are present, 1 otherwise).

    Setting WEBKIT_SKIA_GPU_PAINTING_THREADS=0 is an alternative way to enforce
    using CPU for tile rendering, but keeping the GPU usage allowed, e.g.
    for accelerated ImageBuffers (used for accelerated filters). Currently
    this mode crashes, as SkiaPaintingEngine contains a logic error:

    - record() decides whether to use an GraphicsContext in accelerated mode
      based on the ProcessCapabilities::canUseAcceleratedBuffers().

    - replay() layer assumes m_gpuWorkerPool is non-zero, if renderingMode
      is accelerated -- however when WEBKIT_SKIA_GPU_PAINTING_THREADS is set
      to 0 m_gpuWorkerPool is nullptr, while canUseAcceleratedBuffers() still
      returns true, leading to the crash.

    Fix that, by null-checking m_gpuWorkerPool.

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


Compare: https://github.com/WebKit/WebKit/compare/9304e09457eb...52dd3e3db7e7

To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to