Index: gpu/command_buffer/client/gles2_implementation.h |
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h |
index e176c8b20a2ca761346d004833caa93ba7ccc452..5669f1916fd58cb2b45811bdfc2d9311736dd4dc 100644 |
--- a/gpu/command_buffer/client/gles2_implementation.h |
+++ b/gpu/command_buffer/client/gles2_implementation.h |
@@ -102,6 +102,8 @@ class TransferBufferInterface; |
namespace gles2 { |
+class GpuMemoryBufferFactory; |
+class GpuMemoryBufferTracker; |
class VertexArrayObjectManager; |
// This class emulates GLES2 over command buffers. It can be used by a client |
@@ -219,6 +221,10 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
return share_group_.get(); |
} |
+ void SetGpuMemoryBufferFactory(GpuMemoryBufferFactory* factory) { |
+ gpu_memory_buffer_factory_ = factory; |
+ } |
+ |
private: |
friend class GLES2ImplementationTest; |
friend class VertexArrayObjectManager; |
@@ -407,6 +413,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
void GenTexturesHelper(GLsizei n, const GLuint* textures); |
void GenVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
void GenQueriesEXTHelper(GLsizei n, const GLuint* queries); |
+ void GenImageBuffersHelper(GLsizei n, const GLuint* imagebuffers); |
void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); |
void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
@@ -416,9 +423,11 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
bool DeleteShaderHelper(GLuint shader); |
void DeleteQueriesEXTHelper(GLsizei n, const GLuint* queries); |
void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* arrays); |
+ void DeleteImageBuffersHelper(GLsizei n, const GLuint* imagebuffers); |
void DeleteBuffersStub(GLsizei n, const GLuint* buffers); |
void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers); |
+ void DeleteImageBuffersStub(GLsizei n, const GLuint* imagebuffers); |
void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers); |
void DeleteTexturesStub(GLsizei n, const GLuint* textures); |
void DeleteProgramStub(GLsizei n, const GLuint* programs); |
@@ -435,6 +444,10 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
GLenum target, GLintptr offset, GLsizeiptr size, const void* data, |
ScopedTransferBufferPtr* buffer); |
+ // Helper for ImageBufferData |
+ void CreateGpuMemoryBuffer2DCHROMIUMHelper( |
+ GLuint image_id, GLint width, GLint height); |
+ |
// Helper for GetVertexAttrib |
bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param); |
@@ -498,6 +511,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
void FailGLError(GLenum /* error */) { } |
#endif |
+ void GetBoundGpuMemoryBuffer(const char* function_name, GLuint* buffer_id); |
+ |
GLES2Util util_; |
GLES2CmdHelper* helper_; |
TransferBufferInterface* transfer_buffer_; |
@@ -554,6 +569,9 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
GLuint bound_pixel_pack_transfer_buffer_id_; |
GLuint bound_pixel_unpack_transfer_buffer_id_; |
+ // The currently bound GPU memory buffer |
+ GLuint bound_gpu_memory_buffer_id_; |
+ |
// Client side management for vertex array objects. Needed to correctly |
// track client side arrays. |
scoped_ptr<VertexArrayObjectManager> vertex_array_object_manager_; |
@@ -600,10 +618,14 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
scoped_ptr<BufferTracker> buffer_tracker_; |
+ scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; |
+ |
ErrorMessageCallback* error_message_callback_; |
scoped_ptr<std::string> current_trace_name_; |
+ GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
}; |