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

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

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 1b421469443e22b1304ee5380698d70e90cf8215..a125ae80f0550a0e347ec20ce8e2c8ef5148675b 100644
--- a/gpu/command_buffer/service/image_manager.h
+++ b/gpu/command_buffer/service/image_manager.h
@@ -8,6 +8,7 @@
#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,10 +19,20 @@ namespace gpu {
namespace gles2 {
// Interface used by the cmd decoder to lookup images.
-class GPU_EXPORT ImageManager : public base::RefCounted<ImageManager> {
+class GPU_EXPORT ImageManager
+ : public GpuMemoryBufferManagerInterface,
+ public base::RefCounted<ImageManager> {
public:
ImageManager();
+ // Overridden from GpuMemoryBufferManagerInterface:
+ virtual bool RegisterGpuMemoryBuffer(int32 id,
+ gfx::GpuMemoryBufferHandle buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) OVERRIDE;
+ virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
+
void AddImage(gfx::GLImage* gl_image, int32 service_id);
void RemoveImage(int32 service_id);
gfx::GLImage* LookupImage(int32 service_id);
@@ -29,7 +40,7 @@ class GPU_EXPORT ImageManager : public base::RefCounted<ImageManager> {
private:
friend class base::RefCounted<ImageManager>;
- ~ImageManager();
+ virtual ~ImageManager();
typedef base::hash_map<uint32, scoped_refptr<gfx::GLImage> > GLImageMap;
GLImageMap gl_images_;
« 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