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

Changeset 267459 in webkit


Ignore:
Timestamp:
Sep 22, 2020, 8:41:44 PM (6 years ago)
Author:
Wenson Hsieh
Message:

[GPU Process] fast/canvas/canvas-blend-image.html and fast/canvas/canvas-blend-solid.html fail on macOS
https://bugs.webkit.org/show_bug.cgi?id=216860

Reviewed by Said Abou-Hallawa.

These two tests disable accelerated drawing for canvas elements; when using the GPU process, this causes us to
use ImageBufferShareableBitmapBackend as the back-end for the image buffer backing the canvas element.

On both macOS and iOS, the image buffer is backed by BGRA image data. However, we override
backendColorFormat() and return ColorFormat::BGRA only for PLATFORM(IOS_FAMILY), causing putImageData
and getImageData to result in flipped red and blue channels on macOS, which subsequently causes these two
layout tests to fail.

Fix these tests by removing the PLATFORM(IOS_FAMILY) guard.

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r267455 r267459  
     12020-09-22  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [GPU Process] fast/canvas/canvas-blend-image.html and fast/canvas/canvas-blend-solid.html fail on macOS
     4        https://bugs.webkit.org/show_bug.cgi?id=216860
     5
     6        Reviewed by Said Abou-Hallawa.
     7
     8        These two tests disable accelerated drawing for canvas elements; when using the GPU process, this causes us to
     9        use `ImageBufferShareableBitmapBackend` as the back-end for the image buffer backing the canvas element.
     10
     11        On both macOS and iOS, the image buffer is backed by BGRA image data. However, we override
     12        `backendColorFormat()` and return `ColorFormat::BGRA` only for `PLATFORM(IOS_FAMILY)`, causing `putImageData`
     13        and `getImageData` to result in flipped red and blue channels on macOS, which subsequently causes these two
     14        layout tests to fail.
     15
     16        Fix these tests by removing the `PLATFORM(IOS_FAMILY)` guard.
     17
     18        * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
     19
    1202020-09-22  Commit Queue  <commit-queue@webkit.org>
    221
  • trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h

    r265360 r267459  
    6161
    6262private:
    63 #if PLATFORM(IOS_FAMILY)
    6463    ColorFormat backendColorFormat() const override { return ColorFormat::BGRA; }
    65 #endif
    6664
    6765    RefPtr<ShareableBitmap> m_bitmap;
Note: See TracChangeset for help on using the changeset viewer.