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

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: Incorporate code reviews 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..ff63ee7365cbb0ed2650060d434e337731508697 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"
@@ -92,6 +94,9 @@
GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION_ASSERT(!ptr || \
(ptr[0] == static_cast<type>(0) || ptr[0] == static_cast<type>(-1)));
+// TODO(kaanb): Ask gman if there's a better header for this.
+#define GL_READ_WRITE 0x88BA
+
struct GLUniformDefinitionCHROMIUM;
namespace gpu {
@@ -102,6 +107,7 @@ class TransferBufferInterface;
namespace gles2 {
+class ImageFactory;
class VertexArrayObjectManager;
// This class emulates GLES2 over command buffers. It can be used by a client
@@ -165,7 +171,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface {
ShareGroup* share_group,
TransferBufferInterface* transfer_buffer,
bool share_resources,
- bool bind_generates_resource);
+ bool bind_generates_resource,
+ ImageFactory* image_factory);
virtual ~GLES2Implementation();
@@ -435,6 +442,14 @@ class GLES2_IMPL_EXPORT GLES2Implementation : public GLES2Interface {
GLenum target, GLintptr offset, GLsizeiptr size, const void* data,
ScopedTransferBufferPtr* buffer);
+ GLuint CreateImageCHROMIUMHelper(
+ GLsizei width, GLsizei height, GLenum internalformat);
+ void DestroyImageCHROMIUMHelper(GLuint image_id);
+ void* MapImageCHROMIUMHelper(GLuint image_id, GLenum access);
+ void 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_;
+ ImageFactory* image_factory_; // weak
reveman 2013/05/14 01:21:04 nit: no need for "weak" comment. that's already im
kaanb 2013/05/14 18:12:11 Done.
+
DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
};

Powered by Google App Engine
This is Rietveld 408576698