Changeset 195082 in webkit
- Timestamp:
- Jan 14, 2016 4:14:14 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r195081 r195082 1 2016-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 1 17 2016-01-14 Beth Dakin <bdakin@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h
r194750 r195082 95 95 96 96 #if PLATFORM(IOS) 97 WEBCORE_EXPORT void copyToSurface(IOSurface&);98 97 WEBCORE_EXPORT static bool allowConversionFromFormatToFormat(Format, Format); 99 98 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 287 287 break; 288 288 case Format::RGB10: 289 bitsPerComponent = 10;290 bitsPerPixel = 32;291 break;292 289 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; 296 295 break; 297 296 case Format::YUV422: … … 375 374 376 375 #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 398 376 bool IOSurface::allowConversionFromFormatToFormat(Format sourceFormat, Format destFormat) 399 377 { -
trunk/Source/WebKit2/ChangeLog
r195081 r195082 1 2016-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 1 15 2016-01-14 Beth Dakin <bdakin@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
r194496 r195082 266 266 if (m_acceleratesDrawing) { 267 267 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(); 277 270 278 271 GraphicsContext& context = m_frontBuffer.surface->ensureGraphicsContext();
Note: See TracChangeset
for help on using the changeset viewer.