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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/TextureManager.cpp

Issue 10690121: Merge 121076 - [chromium] LayerRendererChromium is not getting visibility messages in single thread… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 #ifndef NDEBUG 235 #ifndef NDEBUG
236 ASSERT(m_evictedTextures[i].allocator == allocator); 236 ASSERT(m_evictedTextures[i].allocator == allocator);
237 #endif 237 #endif
238 allocator->deleteTexture(m_evictedTextures[i].textureId, m_evict edTextures[i].size, m_evictedTextures[i].format); 238 allocator->deleteTexture(m_evictedTextures[i].textureId, m_evict edTextures[i].size, m_evictedTextures[i].format);
239 } 239 }
240 } 240 }
241 } 241 }
242 m_evictedTextures.clear(); 242 m_evictedTextures.clear();
243 } 243 }
244 244
245 void TextureManager::evictAndRemoveAllDeletedTextures()
246 {
247 unprotectAllTextures();
248 reduceMemoryToLimit(0);
249 m_evictedTextures.clear();
250 }
251
245 void TextureManager::evictAndDeleteAllTextures(TextureAllocator* allocator) 252 void TextureManager::evictAndDeleteAllTextures(TextureAllocator* allocator)
246 { 253 {
247 unprotectAllTextures(); 254 unprotectAllTextures();
248 reduceMemoryToLimit(0); 255 reduceMemoryToLimit(0);
249 deleteEvictedTextures(allocator); 256 deleteEvictedTextures(allocator);
250 } 257 }
251 258
252 void TextureManager::removeTexture(TextureToken token, TextureInfo info) 259 void TextureManager::removeTexture(TextureToken token, TextureInfo info)
253 { 260 {
254 ASSERT(m_textureLRUSet.contains(token)); 261 ASSERT(m_textureLRUSet.contains(token));
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 #ifndef NDEBUG 316 #ifndef NDEBUG
310 info.allocator = 0; 317 info.allocator = 0;
311 #endif 318 #endif
312 addTexture(token, info); 319 addTexture(token, info);
313 return true; 320 return true;
314 } 321 }
315 322
316 } 323 }
317 324
318 #endif // USE(ACCELERATED_COMPOSITING) 325 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698