Title: [171332] trunk/Source/WebCore
- Revision
- 171332
- Author
- [email protected]
- Date
- 2014-07-21 18:26:24 -0700 (Mon, 21 Jul 2014)
Log Message
Avoid putting empty-sized surfaces into IOSurfacePool
https://bugs.webkit.org/show_bug.cgi?id=135136
<rdar://problem/17478407>
Reviewed by Simon Fraser.
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::addSurface):
Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
when their size is used as the key in the CachedSurfaceMap.
Additionally, avoid any empty sizes, because they're just pointless.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171331 => 171332)
--- trunk/Source/WebCore/ChangeLog 2014-07-22 01:14:08 UTC (rev 171331)
+++ trunk/Source/WebCore/ChangeLog 2014-07-22 01:26:24 UTC (rev 171332)
@@ -1,3 +1,16 @@
+2014-07-21 Tim Horton <[email protected]>
+
+ Avoid putting empty-sized surfaces into IOSurfacePool
+ https://bugs.webkit.org/show_bug.cgi?id=135136
+
+ Reviewed by Simon Fraser.
+
+ * platform/graphics/cg/IOSurfacePool.cpp:
+ (WebCore::IOSurfacePool::addSurface):
+ Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
+ when their size is used as the key in the CachedSurfaceMap.
+ Additionally, avoid any empty sizes, because they're just pointless.
+
2014-07-21 Beth Dakin <[email protected]>
WK1 should always setAcceleratedCompositingForFixedPositionEnabled(true) on
Modified: trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp (171331 => 171332)
--- trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp 2014-07-22 01:14:08 UTC (rev 171331)
+++ trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp 2014-07-22 01:26:24 UTC (rev 171332)
@@ -164,6 +164,11 @@
if (surface->totalBytes() > m_maximumBytesCached)
return;
+ // There's no reason to pool empty surfaces; we should never allocate them in the first place.
+ // This also covers isZero(), which would cause trouble when used as the key in m_cachedSurfaces.
+ if (surface->size().isEmpty())
+ return;
+
bool surfaceIsInUse = surface->isInUse();
willAddSurface(surface, surfaceIsInUse);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes