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

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

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/image_manager.h
diff --git a/gpu/command_buffer/service/image_manager.h b/gpu/command_buffer/service/image_manager.h
index eadf24619d8ecb2ff5390ead5bdcd155c77140f7..9ac26b0631a647a6b1feaa717b723094b028e1c4 100644
--- a/gpu/command_buffer/service/image_manager.h
+++ b/gpu/command_buffer/service/image_manager.h
@@ -23,12 +23,13 @@ class GPU_EXPORT ImageManager {
ImageManager();
~ImageManager();
- void AddImage(gfx::GLImage* image, int32 service_id);
- void RemoveImage(int32 service_id);
+ void Destroy(bool have_context);
+ bool AddImage(gfx::GLImage* image, int32 service_id);
+ bool RemoveImage(int32 service_id);
no sievers 2014/07/30 12:34:08 I'd leave RemoveImage() as returning void
sohanjg 2014/07/30 13:08:02 Done.
gfx::GLImage* LookupImage(int32 service_id);
private:
- typedef base::hash_map<uint32, scoped_refptr<gfx::GLImage> > GLImageMap;
+ typedef base::hash_map<int32, scoped_refptr<gfx::GLImage> > GLImageMap;
GLImageMap images_;
DISALLOW_COPY_AND_ASSIGN(ImageManager);

Powered by Google App Engine
This is Rietveld 408576698