[webkit-reviews] review denied: [Bug 134594] [CoordinatedGraphics] Use auto keyword to clean-up for loops : [Attachment 234343] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 3 10:22:42 PDT 2014
Darin Adler <darin at apple.com> has denied hunseopJeong
<hs85.jeong at samsung.com>'s request for review:
Bug 134594: [CoordinatedGraphics] Use auto keyword to clean-up for loops
https://bugs.webkit.org/show_bug.cgi?id=134594
Attachment 234343: Patch
https://bugs.webkit.org/attachment.cgi?id=234343&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=234343&action=review
If you’re going to touch all these loops, then you should clean them up even
more using C++11 syntax and the functions like keys() and values() for simple
iterations of maps. Example:
> Source/WebCore/platform/graphics/TiledBackingStore.cpp:118
> - TileMap::iterator end = m_tiles.end();
> - for (TileMap::iterator it = m_tiles.begin(); it != end; ++it) {
> + for (auto it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
> if (!it->value->isDirty())
> continue;
> dirtyTiles.append(it->value);
for (auto& tile : m_tiles.values()) {
if (tile->isDirty())
dirtyTiles.append(tile);
}
>
Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
239
> + for (auto iter = m_imageBackings.begin(), end = m_imageBackings.end();
iter != end; ++iter)
> iter->value->update();
for (auto& backing : m_imageBackings.values())
backing->update();
>
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp
:82
> + for (auto it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it)
> m_tilesToRemove.add(it->key);
for (auto& key : m_tiles.keys())
m_tilesToRemove.add(key);
>
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cp
p:563
> + for (auto it = m_backingStoresWithPendingBuffers.begin(), end =
m_backingStoresWithPendingBuffers.end(); it != end; ++it)
> (*it)->commitTileOperations(m_textureMapper.get());
for (auto& store : m_backingStoresWithPendingBuffers)
store->commitTileOperations(m_textureMapper.get());
More information about the webkit-reviews
mailing list