⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 295170 in webkit


Ignore:
Timestamp:
Jun 2, 2022, 10:35:30 PM (4 years ago)
Author:
Nikos Mouchtaris
Message:

Add check for pixel buffer format in RemoteRenderingBackend::getPixelBufferForImageBuffer
​https://bugs.webkit.org/show_bug.cgi?id=241243
<rdar://89611041>

Reviewed by Simon Fraser.

Add check to ensure that pixel buffer format is supported.

  • Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getPixelBufferForImageBuffer):

Canonical link: ​https://commits.webkit.org/251254@main

Location:
trunk/Source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/platform/graphics/PixelBuffer.h

    r295113 r295170  
    4040    WTF_MAKE_NONCOPYABLE(PixelBuffer);
    4141public:
    42     static bool supportedPixelFormat(PixelFormat);
     42    WEBCORE_EXPORT static bool supportedPixelFormat(PixelFormat);
    4343
    4444    WEBCORE_EXPORT static RefPtr<PixelBuffer> tryCreate(const PixelBufferFormat&, const IntSize&);
  • trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp

    r295113 r295170  
    208208{
    209209    MESSAGE_CHECK(m_getPixelBufferSharedMemory, "No shared memory for getPixelBufferForImageBuffer");
     210    MESSAGE_CHECK(PixelBuffer::supportedPixelFormat(destinationFormat.pixelFormat), "Pixel format not supported");
    210211    QualifiedRenderingResourceIdentifier qualifiedImageBuffer { imageBuffer, m_gpuConnectionToWebProcess->webProcessIdentifier() };
    211212    if (auto imageBuffer = m_remoteResourceCache.cachedImageBuffer(qualifiedImageBuffer)) {
Note: See TracChangeset for help on using the changeset viewer.