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

Unified Diff: gpu/command_buffer/service/buffer_manager.h

Issue 10440019: Add support for GL_CHROMIUM_pixel_transfer_buffer_object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/service/buffer_manager.h
diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h
index b3b4ede36b898e706cd8bf946b01dc801e567628..8cea9423234ed810889c762e65b8c7255efbde8f 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -11,10 +11,14 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "gpu/command_buffer/service/gl_utils.h"
#include "gpu/gpu_export.h"
namespace gpu {
+
+class CommonDecoder;
+
namespace gles2 {
// This class keeps track of the buffers and their sizes so we can do
@@ -119,6 +123,8 @@ class GPU_EXPORT BufferManager {
}
void SetInfo(GLsizeiptr size, GLenum usage, bool shadow);
+ void SetInfo(GLsizeiptr size, GLenum usage, CommonDecoder* decoder,
+ int32 shm_id, uint32 shm_offset);
// Clears any cache of index ranges.
void ClearCache();
@@ -153,6 +159,13 @@ class GPU_EXPORT BufferManager {
// A map of ranges to the highest value in that range of a certain type.
typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap;
RangeToMaxValueMap range_set_;
+
+ // The decoder pointer is reset if the decoder is destroyed.
+ base::WeakPtr<CommonDecoder> decoder_;
greggman 2012/05/24 20:56:00 I'm a little leary of tracking decoders per buffer
+
+ // The shared memory used with this Buffer.
+ int32 shm_id_;
+ uint32 shm_offset_;
};
BufferManager();
@@ -176,6 +189,10 @@ class GPU_EXPORT BufferManager {
// Sets the size and usage of a buffer.
void SetInfo(BufferInfo* info, GLsizeiptr size, GLenum usage);
+ // Sets the size, usage and shared memory of a buffer.
+ void SetInfo(BufferInfo* info, GLsizeiptr size, GLenum usage,
+ CommonDecoder* decoder, int32 shm_id, uint32 shm_offset);
+
// Sets the target of a buffer. Returns false if the target can not be set.
bool SetTarget(BufferInfo* info, GLenum target);

Powered by Google App Engine
This is Rietveld 408576698