[webkit-changes] [WebKit/WebKit] 071a8e: [Skia] Improve the way we decide when to use CPU o...
Carlos Garcia Campos
noreply at github.com
Wed Mar 13 01:28:06 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 071a8e4ca7a56a134f7c3573e76e00b392515861
https://github.com/WebKit/WebKit/commit/071a8e4ca7a56a134f7c3573e76e00b392515861
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths:
M Source/WebCore/html/CanvasBase.cpp
M Source/WebCore/html/HTMLCanvasElement.cpp
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/page/Settings.yaml
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp
M Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp
M Source/WebCore/platform/graphics/skia/SkiaAcceleratedBufferPool.cpp
M Source/WebCore/platform/graphics/skia/SkiaAcceleratedBufferPool.h
M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp
M Source/WebKit/SourcesWPE.txt
M Source/WebKit/UIProcess/WebPreferences.cpp
M Source/WebKit/UIProcess/gtk/WebPreferencesGtk.cpp
A Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
Log Message:
-----------
[Skia] Improve the way we decide when to use CPU or GPU
https://bugs.webkit.org/show_bug.cgi?id=270083
Reviewed by Adrian Perez de Castro.
We normally assume we always want hardware acceleration for rendering
with Skia, but there are several situations in which we need to use the
CPU:
- If we fail to create the GL context.
- If we fail to create the SkSurface (for example because the size
is bigger than the maximum render target size allowed).
- When accelerated compositing is disabled.
- When accelerated 2D canvas is disabled.
- When CPU rendering is disabled.
- When the canvas is too small (we use 128 * 129 to match chromium).
* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::shouldAccelerate const):
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createContext2d):
(WebCore::HTMLCanvasElement::createContextBitmapRenderer):
(WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer const):
(WebCore::HTMLCanvasElement::createImageBuffer const):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::bufferRenderingMode):
(WebCore::ImageBitmap::create):
(WebCore::ImageBitmap::createImageBuffer):
(WebCore::ImageBitmap::createBlankImageBuffer):
(WebCore::ImageBitmap::createCompletionHandler):
(WebCore::ImageBitmap::createFromBuffer):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::isAccelerated const):
* Source/WebCore/page/Settings.yaml:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp:
(WebCore::ImageBufferSkiaAcceleratedBackend::create):
* Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp:
(WebCore::PlatformDisplay::skiaGLContext):
* Source/WebCore/platform/graphics/skia/SkiaAcceleratedBufferPool.cpp:
(WebCore::SkiaAcceleratedBufferPool::acquireBuffer):
(WebCore::SkiaAcceleratedBufferPool::createAcceleratedBuffer):
* Source/WebCore/platform/graphics/skia/SkiaAcceleratedBufferPool.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp:
(WebCore::CoordinatedGraphicsLayer::paintTile):
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/WebPreferences.cpp:
* Source/WebKit/UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
* Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp: Copied from Source/WebKit/UIProcess/gtk/WebPreferencesGtk.cpp.
(WebKit::WebPreferences::platformInitializeStore):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::CompositingCoordinator):
(WebKit::skiaForceUseCpuRendering): Deleted.
Canonical link: https://commits.webkit.org/276016@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