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

Unified Diff: gpu/command_buffer/service/image_manager.cc

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 years, 2 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 | « gpu/command_buffer/service/image_manager.h ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/image_manager.cc
diff --git a/gpu/command_buffer/service/image_manager.cc b/gpu/command_buffer/service/image_manager.cc
index 7c7c6e6f6a9796ca925f4f4bafca52122cd62fe8..6e9a5ba4a3a12eb9b2a1112113aebd7ae63422bc 100644
--- a/gpu/command_buffer/service/image_manager.cc
+++ b/gpu/command_buffer/service/image_manager.cc
@@ -18,23 +18,14 @@ ImageManager::ImageManager() {
ImageManager::~ImageManager() {
}
-void ImageManager::Destroy(bool have_context) {
- for (GLImageMap::const_iterator iter = images_.begin(); iter != images_.end();
- ++iter)
- iter->second.get()->Destroy(have_context);
- images_.clear();
-}
-
void ImageManager::AddImage(gl::GLImage* image, int32_t service_id) {
DCHECK(images_.find(service_id) == images_.end());
images_[service_id] = image;
}
void ImageManager::RemoveImage(int32_t service_id) {
- GLImageMap::iterator iter = images_.find(service_id);
- DCHECK(iter != images_.end());
- iter->second.get()->Destroy(true);
- images_.erase(iter);
+ DCHECK(images_.find(service_id) != images_.end());
+ images_.erase(service_id);
}
gl::GLImage* ImageManager::LookupImage(int32_t service_id) {
« no previous file with comments | « gpu/command_buffer/service/image_manager.h ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698