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

Changeset 238459 in webkit


Ignore:
Timestamp:
Nov 23, 2018, 7:07:40 AM (8 years ago)
Author:
Antti Koivisto
Message:

UI side compositing doesn't paint on Mac
https://bugs.webkit.org/show_bug.cgi?id=191908

Reviewed by Tim Horton.

Source/WebCore:

For clarity put RGB10 and RGB10A8 formats behind PLATFORM(IOS_FAMILY). They are not supported on Mac.

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::IOSurface):
(WebCore::IOSurface::ensurePlatformContext):
(WebCore::IOSurface::format const):
(WebCore::operator<<):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::bytesPerPixel const):
(WebKit::RemoteLayerBackingStore::surfaceBufferFormat const):

These deep color formats are not supported on Mac.

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238457 r238459  
     12018-11-23  Antti Koivisto  <antti@apple.com>
     2
     3        UI side compositing doesn't paint on Mac
     4        https://bugs.webkit.org/show_bug.cgi?id=191908
     5
     6        Reviewed by Tim Horton.
     7
     8        For clarity put RGB10 and RGB10A8 formats behind PLATFORM(IOS_FAMILY). They are not supported on Mac.
     9
     10        * platform/graphics/cocoa/IOSurface.h:
     11        * platform/graphics/cocoa/IOSurface.mm:
     12        (WebCore::IOSurface::IOSurface):
     13        (WebCore::IOSurface::ensurePlatformContext):
     14        (WebCore::IOSurface::format const):
     15        (WebCore::operator<<):
     16
    1172018-11-23  Javier Fernandez  <jfernandez@igalia.com>
    218
  • trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h

    r236074 r238459  
    3232#include "IntSize.h"
    3333
     34#if PLATFORM(IOS_FAMILY)
     35#define HAVE_IOSURFACE_RGB10 1
     36#endif
     37
    3438namespace WTF {
    3539class MachSendRight;
     
    5155        RGBA,
    5256        YUV422,
     57#if HAVE(IOSURFACE_RGB10)
    5358        RGB10,
    5459        RGB10A8,
     60#endif
    5561    };
    5662   
  • trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm

    r237266 r238459  
    205205        options = optionsFor32BitSurface(size, 'BGRA');
    206206        break;
     207#if HAVE(IOSURFACE_RGB10)
    207208    case Format::RGB10:
    208209        options = optionsFor32BitSurface(size, 'w30r');
     
    211212        options = optionsForBiplanarSurface(size, 'b3a8', 4, 1);
    212213        break;
     214#endif
    213215    case Format::YUV422:
    214216        options = optionsForBiplanarSurface(size, '422f', 1, 1);
     
    288290    case Format::RGBA:
    289291        break;
     292#if HAVE(IOSURFACE_RGB10)
    290293    case Format::RGB10:
    291294    case Format::RGB10A8:
     
    296299        bitmapInfo = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder16Host | kCGBitmapFloatComponents;
    297300        break;
     301#endif
    298302    case Format::YUV422:
    299303        ASSERT_NOT_REACHED();
     
    363367        return Format::RGBA;
    364368
     369#if HAVE(IOSURFACE_RGB10)
    365370    if (pixelFormat == 'w30r')
    366371        return Format::RGB10;
     
    368373    if (pixelFormat == 'b3a8')
    369374        return Format::RGB10A8;
     375#endif
    370376
    371377    if (pixelFormat == '422f')
     
    405411bool IOSurface::allowConversionFromFormatToFormat(Format sourceFormat, Format destFormat)
    406412{
     413#if HAVE(IOSURFACE_RGB10)
    407414    if ((sourceFormat == Format::RGB10 || sourceFormat == Format::RGB10A8) && destFormat == Format::YUV422)
    408415        return false;
     416#endif
    409417
    410418    return true;
     
    467475        ts << "YUV422";
    468476        break;
     477#if HAVE(IOSURFACE_RGB10)
    469478    case IOSurface::Format::RGB10:
    470479        ts << "RGB10";
     
    473482        ts << "RGB10A8";
    474483        break;
     484#endif
    475485    }
    476486    return ts;
  • trunk/Source/WebKit/ChangeLog

    r238456 r238459  
     12018-11-23  Antti Koivisto  <antti@apple.com>
     2
     3        UI side compositing doesn't paint on Mac
     4        https://bugs.webkit.org/show_bug.cgi?id=191908
     5
     6        Reviewed by Tim Horton.
     7
     8        * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
     9        (WebKit::RemoteLayerBackingStore::bytesPerPixel const):
     10        (WebKit::RemoteLayerBackingStore::surfaceBufferFormat const):
     11
     12        These deep color formats are not supported on Mac.
     13
    1142018-11-22  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm

    r238108 r238459  
    182182    case WebCore::IOSurface::Format::RGBA: return 4;
    183183    case WebCore::IOSurface::Format::YUV422: return 2;
     184#if HAVE(IOSURFACE_RGB10)
    184185    case WebCore::IOSurface::Format::RGB10: return 4;
    185186    case WebCore::IOSurface::Format::RGB10A8: return 5;
     187#endif
    186188    }
    187189#endif
     
    501503WebCore::IOSurface::Format RemoteLayerBackingStore::surfaceBufferFormat() const
    502504{
     505#if HAVE(IOSURFACE_RGB10)
    503506    if (m_deepColor)
    504507        return m_isOpaque ? WebCore::IOSurface::Format::RGB10 : WebCore::IOSurface::Format::RGB10A8;
     508#endif
    505509
    506510    return WebCore::IOSurface::Format::RGBA;
Note: See TracChangeset for help on using the changeset viewer.