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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc

Issue 1131463004: content: Cleanup IOSurface/SurfaceTexture destruction code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_io_surface.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc
index 1b2c881f6aeb2e5420e57cd9e5bf68eb4672e543..002ad61b1c20b4e4aeb108fa58e618b09bd9a34b 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc
@@ -85,9 +85,8 @@ void GpuMemoryBufferFactorySurfaceTexture::DestroyGpuMemoryBuffer(
base::AutoLock lock(surface_textures_lock_);
SurfaceTextureMapKey key(id, client_id);
- SurfaceTextureMap::iterator it = surface_textures_.find(key);
- if (it != surface_textures_.end())
- surface_textures_.erase(it);
+ DCHECK(surface_textures_.find(key) != surface_textures_.end());
+ surface_textures_.erase(key);
}
SurfaceTextureManager::GetInstance()->UnregisterSurfaceTexture(id, client_id);
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_io_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698