Chromium Code Reviews| 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..9ec205a9bec4415ef290724c24fd0f2eb5050dfd 100644 |
| --- a/gpu/command_buffer/client/gles2_implementation.h |
| +++ b/gpu/command_buffer/client/gles2_implementation.h |
| @@ -18,6 +18,8 @@ |
| #include "../client/client_context_state.h" |
| #include "../client/gles2_cmd_helper.h" |
| #include "../client/gles2_interface.h" |
| +#include "../client/gpu_memory_buffer_tracker.h" |
| +#include "../client/image_factory.h" |
| #include "../client/query_tracker.h" |
| #include "../client/ref_counted.h" |
| #include "../client/ring_buffer.h" |
| @@ -219,6 +221,16 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
| return share_group_.get(); |
| } |
| + // GLES2Implementation owns the |factory|. |
| + void SetImageFactory(scoped_ptr<ImageFactory> factory) { |
|
reveman
2013/05/10 02:06:16
Changing the ImageFactory during the lifetime of a
kaanb
2013/05/13 23:00:36
Done.
|
| + image_factory_ = factory.Pass(); |
| + } |
| + |
| + // GLES2Implementation owns the |tracker|. |
|
no sievers
2013/05/10 01:21:51
nit: maybe put 'for testing' here?
Because it see
kaanb
2013/05/13 23:00:36
Removed this method.
|
| + void SetGpuMemoryBufferTracker(scoped_ptr<GpuMemoryBufferTracker> tracker) { |
| + gpu_memory_buffer_tracker_ = tracker.Pass(); |
| + } |
| + |
| private: |
| friend class GLES2ImplementationTest; |
| friend class VertexArrayObjectManager; |
| @@ -407,6 +419,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); |
|
no sievers
2013/05/10 01:21:51
not used or defined?
kaanb
2013/05/13 23:00:36
Removed.
|
| void DeleteBuffersHelper(GLsizei n, const GLuint* buffers); |
| void DeleteFramebuffersHelper(GLsizei n, const GLuint* framebuffers); |
| @@ -435,6 +448,13 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface { |
| GLenum target, GLintptr offset, GLsizeiptr size, const void* data, |
| ScopedTransferBufferPtr* buffer); |
| + GLuint CreateImageCHROMIUMHelper(GLsizei width, GLsizei height); |
| + void DestroyImageCHROMIUMHelper(GLuint image_id); |
| + void* MapImageCHROMIUMHelper(GLuint image_id, GLenum access); |
| + GLboolean UnmapImageCHROMIUMHelper(GLuint image_id); |
| + void GetImageParameterivCHROMIUMHelper( |
| + GLuint image_id, GLenum pname, GLint* params); |
| + |
| // Helper for GetVertexAttrib |
| bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param); |
| @@ -600,10 +620,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_; |
| + scoped_ptr<ImageFactory> image_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
| }; |