Allow more buffer formats in the IOSurface pool
[WebKit-https.git] / Source / WebCore / ChangeLog
index e152c4f72b4ce338ee78c2829954bf6cf658e830..aea5d8ea79385d7c810341de3b8d14666f332061 100644 (file)
@@ -1,3 +1,27 @@
+2015-11-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Allow more buffer formats in the IOSurface pool
+        https://bugs.webkit.org/show_bug.cgi?id=151516
+
+        Reviewed by Tim Horton.
+
+        Previously IOSurface::create was only looking in the pool for RGBA-format surfaces. Change that to
+        always look in the pool, and to cache all format types. We include format in the criteria used
+        to pick a surface from the pool.
+        
+        * platform/graphics/cg/IOSurfacePool.cpp:
+        (WebCore::surfaceMatchesParameters):
+        (WebCore::IOSurfacePool::takeSurface):
+        (WebCore::IOSurfacePool::shouldCacheFormat):
+        (WebCore::IOSurfacePool::shouldCacheSurface):
+        (WebCore::IOSurfacePool::addSurface):
+        * platform/graphics/cg/IOSurfacePool.h:
+        * platform/graphics/cocoa/IOSurface.h:
+        * platform/graphics/cocoa/IOSurface.mm:
+        (IOSurface::surfaceFromPool):
+        (IOSurface::create):
+        (IOSurface::IOSurface):
+
 2015-11-20  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Support High DPI drawing with CACFLayers
 2015-11-20  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Support High DPI drawing with CACFLayers