[CoordinatedGraphics] Have LayerTreeRenderer::ensureLayer() return the layer
authorchristophe.dumez@intel.com <christophe.dumez@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2012 18:17:51 +0000 (18:17 +0000)
committerchristophe.dumez@intel.com <christophe.dumez@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2012 18:17:51 +0000 (18:17 +0000)
commitfed3d386ae1e09498e5bc957d8f26b8a218480bf
treecb298ca484b32c3894ce0af14ff561b6499aebed
parent1035ea3139c91f5d383338b27864af684baee199
[CoordinatedGraphics] Have LayerTreeRenderer::ensureLayer() return the layer
https://bugs.webkit.org/show_bug.cgi?id=103645

Reviewed by Noam Rosenthal.

The current LayerTreeRenderer code keep calling ensureLayer() and then
LayerMap::find() to retrieve the layer. Since ensureLayer() already has
a pointer to the layer, we can simply have the function return it.
This is slightly more efficient and it makes the code a bit simpler.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerChildren):
(WebKit::LayerTreeRenderer::setLayerFilters):
(WebKit::LayerTreeRenderer::setLayerState):
(WebKit::LayerTreeRenderer::ensureLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h