[iOS WK2] Avoid creating tiles that are too large for rendering
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2016 02:07:47 +0000 (02:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2016 02:07:47 +0000 (02:07 +0000)
commit657a25fefb764bdb1029200be1e3dc12ac97936d
treec0dceb18df302da81cb742c64ead7aca31527626
parent93d62f66228b9708cc18198b8baf679ecea23b01
[iOS WK2] Avoid creating tiles that are too large for rendering
https://bugs.webkit.org/show_bug.cgi?id=156050
rdar://problem/25424541

Reviewed by Darin Adler.

In the case of a WKWebView which is sized large enough to show an entire document
(for example, when enclosed inside a UIScrollView), we would create tiles that were
larger than CoreAnimation was willing to deal with.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileSize): Take the device scale, and the max IOSurface size
into account when computing the max tile size.
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::maximumSize): CoreAnimation imposes limits in addition to the size reported
by IOSurfaceGetPropertyMaximum(), namely an 8k cap, so mimic that here.
(IOSurface::ensurePlatformContext): Typo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/TileController.cpp
Source/WebCore/platform/graphics/cocoa/IOSurface.mm