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

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

Issue 12649002: Refactor GPU code. Buffer* info to Buffer* buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0d99e9b031ed5a5f281799a71bece42ddda59b3a..ad32be07a817a59e146e64d1232455054774ac6f 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -209,7 +209,7 @@ class GPU_EXPORT BufferManager {
const GLvoid* data);
// Sets the target of a buffer. Returns false if the target can not be set.
- bool SetTarget(Buffer* info, GLenum target);
+ bool SetTarget(Buffer* buffer, GLenum target);
void set_allow_buffers_on_multiple_targets(bool allow) {
allow_buffers_on_multiple_targets_ = allow;
@@ -224,26 +224,27 @@ class GPU_EXPORT BufferManager {
private:
friend class Buffer;
- void StartTracking(Buffer* info);
- void StopTracking(Buffer* info);
+ void StartTracking(Buffer* buffer);
+ void StopTracking(Buffer* buffer);
// Sets the size, usage and initial data of a buffer.
// If data is NULL buffer will be initialized to 0 if shadowed.
- void SetInfo(Buffer* info, GLsizeiptr size, GLenum usage, const GLvoid* data);
+ void SetInfo(
+ Buffer* buffer, GLsizeiptr size, GLenum usage, const GLvoid* data);
scoped_ptr<MemoryTypeTracker> memory_tracker_;
scoped_refptr<FeatureInfo> feature_info_;
// Info for each buffer in the system.
- typedef base::hash_map<GLuint, scoped_refptr<Buffer> > BufferInfoMap;
- BufferInfoMap buffer_infos_;
+ typedef base::hash_map<GLuint, scoped_refptr<Buffer> > BufferMap;
+ BufferMap buffers_;
// Whether or not buffers can be bound to multiple targets.
bool allow_buffers_on_multiple_targets_;
// Counts the number of Buffer allocated with 'this' as its manager.
// Allows to check no Buffer will outlive this.
- unsigned int buffer_info_count_;
+ unsigned int buffer_count_;
bool have_context_;
bool use_client_side_arrays_for_stream_buffers_;
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698