Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: cc/CCLayerTilingData.cpp

Issue 10914327: Make cc's use of WTF::HashMap robust to key/value change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCDirectRenderer.cpp ('k') | cc/CCLayerTreeHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #if USE(ACCELERATED_COMPOSITING) 8 #if USE(ACCELERATED_COMPOSITING)
9 9
10 #include "CCLayerTilingData.h" 10 #include "CCLayerTilingData.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (size.isEmpty()) { 125 if (size.isEmpty()) {
126 m_tiles.clear(); 126 m_tiles.clear();
127 return; 127 return;
128 } 128 }
129 129
130 // Any tiles completely outside our new bounds are invalid and should be dro pped. 130 // Any tiles completely outside our new bounds are invalid and should be dro pped.
131 int left, top, right, bottom; 131 int left, top, right, bottom;
132 contentRectToTileIndices(IntRect(IntPoint(), size), left, top, right, bottom ); 132 contentRectToTileIndices(IntRect(IntPoint(), size), left, top, right, bottom );
133 Vector<TileMapKey> invalidTileKeys; 133 Vector<TileMapKey> invalidTileKeys;
134 for (TileMap::const_iterator it = m_tiles.begin(); it != m_tiles.end(); ++it ) { 134 for (TileMap::const_iterator it = m_tiles.begin(); it != m_tiles.end(); ++it ) {
135 #if WTF_NEW_HASHMAP_ITERATORS_INTERFACE
136 if (it->key.first > right || it->key.second > bottom)
137 invalidTileKeys.append(it->key);
138 #else
135 if (it->first.first > right || it->first.second > bottom) 139 if (it->first.first > right || it->first.second > bottom)
136 invalidTileKeys.append(it->first); 140 invalidTileKeys.append(it->first);
141 #endif
137 } 142 }
138 for (size_t i = 0; i < invalidTileKeys.size(); ++i) 143 for (size_t i = 0; i < invalidTileKeys.size(); ++i)
139 m_tiles.remove(invalidTileKeys[i]); 144 m_tiles.remove(invalidTileKeys[i]);
140 } 145 }
141 146
142 IntSize CCLayerTilingData::bounds() const 147 IntSize CCLayerTilingData::bounds() const
143 { 148 {
144 return m_tilingData.totalSize(); 149 return m_tilingData.totalSize();
145 } 150 }
146 151
147 } // namespace cc 152 } // namespace cc
148 153
149 #endif // USE(ACCELERATED_COMPOSITING) 154 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/CCDirectRenderer.cpp ('k') | cc/CCLayerTreeHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698