Avoid putting empty-sized surfaces into IOSurfacePool
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 01:26:24 +0000 (01:26 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 01:26:24 +0000 (01:26 +0000)
commite401f0c2d81b96df37afa879c72265847454b8ea
treecddf6cf28671441ba4ce5fb62abe987a4430541a
parentee8bf1588a9e03d7e0fed68a455b73cc3e58e5bf
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp