Title: [168308] trunk/Source/WebCore
Revision
168308
Author
timothy_hor...@apple.com
Date
2014-05-05 11:59:23 -0700 (Mon, 05 May 2014)

Log Message

More long hangs under IOSurfacePool::evict
https://bugs.webkit.org/show_bug.cgi?id=132576
<rdar://problem/16769469>

Reviewed by Simon Fraser.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::evict):
If the pool is too full, we should be evicting in-use surfaces
even if the size of the in-use surfaces has dropped below maximumInUseBytes,
otherwise we can get stuck in an infinite loop with 0 cached surfaces
and 1+ in-use surfaces.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (168307 => 168308)


--- trunk/Source/WebCore/ChangeLog	2014-05-05 18:50:44 UTC (rev 168307)
+++ trunk/Source/WebCore/ChangeLog	2014-05-05 18:59:23 UTC (rev 168308)
@@ -1,3 +1,18 @@
+2014-05-05  Tim Horton  <timothy_hor...@apple.com>
+
+        More long hangs under IOSurfacePool::evict
+        https://bugs.webkit.org/show_bug.cgi?id=132576
+        <rdar://problem/16769469>
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/cg/IOSurfacePool.cpp:
+        (WebCore::IOSurfacePool::evict):
+        If the pool is too full, we should be evicting in-use surfaces
+        even if the size of the in-use surfaces has dropped below maximumInUseBytes,
+        otherwise we can get stuck in an infinite loop with 0 cached surfaces
+        and 1+ in-use surfaces.
+
 2014-05-05  Radu Stavila  <stav...@adobe.com>
 
         [CSS Regions] Remove regionLayoutUpdate event

Modified: trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp (168307 => 168308)


--- trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp	2014-05-05 18:50:44 UTC (rev 168307)
+++ trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp	2014-05-05 18:59:23 UTC (rev 168308)
@@ -241,11 +241,11 @@
     while (m_bytesCached > targetSize) {
         tryEvictOldestCachedSurface();
 
-        if (m_inUseBytesCached > maximumInUseBytes)
+        if (m_inUseBytesCached > maximumInUseBytes || m_bytesCached > targetSize)
             tryEvictInUseSurface();
     }
 
-    while (m_inUseBytesCached > maximumInUseBytes)
+    while (m_inUseBytesCached > maximumInUseBytes || m_bytesCached > targetSize)
         tryEvictInUseSurface();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to