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

Unified Diff: gpu/command_buffer/client/gpu_memory_buffer_tracker.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
Index: gpu/command_buffer/client/gpu_memory_buffer_tracker.h
diff --git a/gpu/command_buffer/client/gpu_memory_buffer_tracker.h b/gpu/command_buffer/client/gpu_memory_buffer_tracker.h
index 1192b1714f0ed5329fbc28392669e09a0f990910..0b07dd0a14817068405751f569cfd3d964165d01 100644
--- a/gpu/command_buffer/client/gpu_memory_buffer_tracker.h
+++ b/gpu/command_buffer/client/gpu_memory_buffer_tracker.h
@@ -5,8 +5,6 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
#define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
-#include <GLES2/gl2.h>
-
#include "base/basictypes.h"
#include "gles2_impl_export.h"
#include "gpu/command_buffer/client/hash_tables.h"
@@ -16,25 +14,24 @@ class GpuMemoryBuffer;
}
namespace gpu {
+class GpuControl;
+
namespace gles2 {
-class ImageFactory;
// Tracks GPU memory buffer objects on the client side.
class GLES2_IMPL_EXPORT GpuMemoryBufferTracker {
public:
- // Ownership of |factory| remains with caller.
- explicit GpuMemoryBufferTracker(ImageFactory* factory);
+ explicit GpuMemoryBufferTracker(GpuControl* gpu_control);
virtual ~GpuMemoryBufferTracker();
- GLuint CreateBuffer(
- GLsizei width, GLsizei height, GLenum internalformat);
- gfx::GpuMemoryBuffer* GetBuffer(GLuint image_id);
- void RemoveBuffer(GLuint image_id);
+ int32 CreateBuffer(size_t width, size_t height, int32 internalformat);
+ gfx::GpuMemoryBuffer* GetBuffer(int32 image_id);
+ void RemoveBuffer(int32 image_id);
private:
- typedef gpu::hash_map<GLuint, gfx::GpuMemoryBuffer*> BufferMap;
+ typedef gpu::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap;
BufferMap buffers_;
- ImageFactory* factory_;
+ GpuControl* gpu_control_;
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTracker);
};
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/client/gpu_memory_buffer_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698