[CoordinatedGraphics] Use unsigned integers for UpdateAtlas IDs
authorchristophe.dumez@intel.com <christophe.dumez@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 12:53:55 +0000 (12:53 +0000)
committerchristophe.dumez@intel.com <christophe.dumez@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 12:53:55 +0000 (12:53 +0000)
commit2d010f506aa8c1346a6e0fe08587517cf7867cfd
treeb6f22324819c2b72949eb927cb8ae1bff4e471ad
parent6013ad1736dd0b76bbf84de4a4aefcb36fed2e94
[CoordinatedGraphics] Use unsigned integers for UpdateAtlas IDs
https://bugs.webkit.org/show_bug.cgi?id=104654

Reviewed by Kenneth Rohde Christiansen.

UpdateAtlas currently uses *signed* integer type for its identifier.
Due to the way we generate those IDs, it is safer to use *unsigned*
integers. This is because the generated ID will overflow at some
point and the C and C++ language standards say that overflow of a
signed value is undefined behaviour.

This patch switches to unsigned integer type for UpdateAtlas IDs
since unsigned integers are guaranteed to wrap around on overflow.

* Shared/SurfaceUpdateInfo.h:
(SurfaceUpdateInfo):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas):
(WebKit::LayerTreeCoordinatorProxy::removeUpdateAtlas):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
(CoordinatedTileClient):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::createUpdateAtlas):
(WebKit::LayerTreeCoordinator::removeUpdateAtlas):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::~UpdateAtlas):
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
(UpdateAtlasClient):
(UpdateAtlas):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/SurfaceUpdateInfo.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h