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

Unified Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Rollback decoder changes Created 7 years, 7 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/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index e176c8b20a2ca761346d004833caa93ba7ccc452..7396f0216e984a2947e85f09a053a41aac576a77 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -16,6 +16,7 @@
#include "base/memory/scoped_ptr.h"
#include "../client/buffer_tracker.h"
#include "../client/client_context_state.h"
+#include "../client/gpu_memory_buffer_factory.h"
#include "../client/gles2_cmd_helper.h"
#include "../client/gles2_interface.h"
#include "../client/query_tracker.h"
@@ -102,6 +103,7 @@ class TransferBufferInterface;
namespace gles2 {
+class GpuMemoryBufferTracker;
class VertexArrayObjectManager;
// This class emulates GLES2 over command buffers. It can be used by a client
@@ -219,6 +221,11 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface {
return share_group_.get();
}
+ // GLES2Implementation owns the |factory|.
+ void SetGpuMemoryBufferFactory(scoped_ptr<GpuMemoryBufferFactory> factory) {
+ gpu_memory_buffer_factory_ = factory.Pass();
+ }
+
private:
friend class GLES2ImplementationTest;
friend class VertexArrayObjectManager;
@@ -407,6 +414,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);
@@ -435,6 +443,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 +615,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<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
};

Powered by Google App Engine
This is Rietveld 408576698