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 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « gpu/command_buffer/service/gpu_memory_buffer_manager.h ('k') | gpu/command_buffer/service/image_manager.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.h
diff --git a/gpu/command_buffer/service/image_manager.h b/gpu/command_buffer/service/image_manager.h
index 95d836f232e1c7a915f908fafc4851704d82941b..eadf24619d8ecb2ff5390ead5bdcd155c77140f7 100644
--- a/gpu/command_buffer/service/image_manager.h
+++ b/gpu/command_buffer/service/image_manager.h
@@ -8,7 +8,6 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
-#include "gpu/command_buffer/service/gpu_memory_buffer_manager.h"
#include "gpu/gpu_export.h"
namespace gfx {
@@ -18,36 +17,19 @@ class GLImage;
namespace gpu {
namespace gles2 {
-// Interface used by the cmd decoder to lookup images.
-class GPU_EXPORT ImageManager
- : public GpuMemoryBufferManagerInterface,
- public base::RefCounted<ImageManager> {
+// This class keeps track of the images and their state.
+class GPU_EXPORT ImageManager {
public:
ImageManager();
+ ~ImageManager();
- // Overridden from GpuMemoryBufferManagerInterface:
- virtual void RegisterGpuMemoryBuffer(int32 id,
- gfx::GpuMemoryBufferHandle buffer,
- size_t width,
- size_t height,
- unsigned internalformat) OVERRIDE;
- virtual void UnregisterGpuMemoryBuffer(int32 id) OVERRIDE;
-
- void AddImage(gfx::GLImage* gl_image, int32 service_id);
+ void AddImage(gfx::GLImage* image, int32 service_id);
void RemoveImage(int32 service_id);
gfx::GLImage* LookupImage(int32 service_id);
- // For Android specific workaround.
- void SetReleaseAfterUse();
-
private:
- friend class base::RefCounted<ImageManager>;
-
- virtual ~ImageManager();
-
typedef base::hash_map<uint32, scoped_refptr<gfx::GLImage> > GLImageMap;
- GLImageMap gl_images_;
- bool release_after_use_;
+ GLImageMap images_;
DISALLOW_COPY_AND_ASSIGN(ImageManager);
};
« no previous file with comments | « gpu/command_buffer/service/gpu_memory_buffer_manager.h ('k') | gpu/command_buffer/service/image_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698