Make IOSurface::Locker and use it in ImageBufferDataCG
https://bugs.webkit.org/show_bug.cgi?id=180317
Reviewed by Zalan Bujtas.
Add an RAII IOSurface::Locker which can lock readonly or readwrite. Access
to the IOSurface base address is through the locker.
Add IOSurface::bytesPerRow() to wrap IOSurfaceGetBytesPerRow().
After this, there is only one location where we access the IOSurfaceRef
directly, in WebGL code.
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::toBGRAData const):
(WebCore::ImageBufferData::getData const):
(WebCore::ImageBufferData::putData):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::bytesPerRow const):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225454
268f45cc-cd09-0410-ab3c-
d52691b4dbfc