Changeset 195082 in webkit


Ignore:
Timestamp:
Jan 14, 2016 4:14:14 PM (8 years ago)
Author:
Simon Fraser
Message:

Remove workaround for rdar://problem/23623670
https://bugs.webkit.org/show_bug.cgi?id=153107
rdar://problem/23633319

Reviewed by Tim Horton.

Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.

Source/WebCore:

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

(IOSurface::ensurePlatformContext):
(IOSurface::copyToSurface): Deleted.

Source/WebKit2:

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::display):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195081 r195082  
     12016-01-14  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove workaround for rdar://problem/23623670
     4        https://bugs.webkit.org/show_bug.cgi?id=153107
     5        rdar://problem/23633319
     6
     7        Reviewed by Tim Horton.
     8
     9        Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
     10        back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.
     11
     12        * platform/graphics/cocoa/IOSurface.h:
     13        * platform/graphics/cocoa/IOSurface.mm:
     14        (IOSurface::ensurePlatformContext):
     15        (IOSurface::copyToSurface): Deleted.
     16
    1172016-01-14  Beth Dakin  <bdakin@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h

    r194750 r195082  
    9595
    9696#if PLATFORM(IOS)
    97     WEBCORE_EXPORT void copyToSurface(IOSurface&);
    9897    WEBCORE_EXPORT static bool allowConversionFromFormatToFormat(Format, Format);
    9998    WEBCORE_EXPORT static void convertToFormat(std::unique_ptr<WebCore::IOSurface>&& inSurface, Format, std::function<void(std::unique_ptr<WebCore::IOSurface>)>);
  • trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm

    r194750 r195082  
    287287        break;
    288288    case Format::RGB10:
    289         bitsPerComponent = 10;
    290         bitsPerPixel = 32;
    291         break;
    292289    case Format::RGB10A8:
    293         // FIXME: This doesn't take the two-plane format into account.
    294         bitsPerComponent = 10;
    295         bitsPerPixel = 32;
     290        // A half-float format will be used if CG needs to read back the IOSurface contents,
     291        // but for an IOSurface-to-IOSurface copy, there shoud be no conversion.
     292        bitsPerComponent = 16;
     293        bitsPerPixel = 64;
     294        bitmapInfo = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder16Host | kCGBitmapFloatComponents;
    296295        break;
    297296    case Format::YUV422:
     
    375374
    376375#if PLATFORM(IOS)
    377 WEBCORE_EXPORT void IOSurface::copyToSurface(IOSurface& destSurface)
    378 {
    379     if (destSurface.format() != format()) {
    380         WTFLogAlways("Trying to copy IOSurface to another surface with a different format");
    381         return;
    382     }
    383 
    384     if (destSurface.size() != size()) {
    385         WTFLogAlways("Trying to copy IOSurface to another surface with a different size");
    386         return;
    387     }
    388 
    389     static IOSurfaceAcceleratorRef accelerator;
    390     if (!accelerator)
    391         IOSurfaceAcceleratorCreate(nullptr, nullptr, &accelerator);
    392 
    393     IOReturn ret = IOSurfaceAcceleratorTransformSurface(accelerator, m_surface.get(), destSurface.surface(), nullptr, nullptr, nullptr, nullptr, nullptr);
    394     if (ret)
    395         WTFLogAlways("IOSurfaceAcceleratorTransformSurface %p to %p failed with error %d", m_surface.get(), destSurface.surface(), ret);
    396 }
    397 
    398376bool IOSurface::allowConversionFromFormatToFormat(Format sourceFormat, Format destFormat)
    399377{
  • trunk/Source/WebKit2/ChangeLog

    r195081 r195082  
     12016-01-14  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove workaround for rdar://problem/23623670
     4        https://bugs.webkit.org/show_bug.cgi?id=153107
     5        rdar://problem/23633319
     6
     7        Reviewed by Tim Horton.
     8
     9        Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
     10        back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.
     11
     12        * Shared/mac/RemoteLayerBackingStore.mm:
     13        (WebKit::RemoteLayerBackingStore::display):
     14
    1152016-01-14  Beth Dakin  <bdakin@apple.com>
    216
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm

    r194496 r195082  
    266266    if (m_acceleratesDrawing) {
    267267        RetainPtr<CGImageRef> backImage;
    268         if (m_backBuffer.surface && !willPaintEntireBackingStore) {
    269 #if PLATFORM(IOS)
    270             if (m_backBuffer.surface->format() == WebCore::IOSurface::Format::RGB10A8) {
    271                 // FIXME: remove this when rdar://problem/23623670 is fixed.
    272                 m_backBuffer.surface->copyToSurface(*m_frontBuffer.surface);
    273             } else
    274 #endif
    275                 backImage = m_backBuffer.surface->createImage();
    276         }
     268        if (m_backBuffer.surface && !willPaintEntireBackingStore)
     269            backImage = m_backBuffer.surface->createImage();
    277270
    278271        GraphicsContext& context = m_frontBuffer.surface->ensureGraphicsContext();
Note: See TracChangeset for help on using the changeset viewer.