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

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

Issue 1796002: Changes the GLES2Implementation to use a RingBuffer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.h
===================================================================
--- gpu/command_buffer/client/gles2_implementation.h (revision 45742)
+++ gpu/command_buffer/client/gles2_implementation.h (working copy)
@@ -12,7 +12,7 @@
#include "../common/scoped_ptr.h"
#include "../client/gles2_cmd_helper.h"
#include "../client/id_allocator.h"
-#include "../client/fenced_allocator.h"
+#include "../client/ring_buffer.h"
#define GLES2_SUPPORT_CLIENT_SIDE_BUFFERS 1
@@ -139,25 +139,26 @@
}
private:
- // Wraps FencedAllocatorWrapper to provide aligned allocations.
- class AlignedFencedAllocator : public FencedAllocatorWrapper {
+ // Wraps RingBufferWrapper to provide aligned allocations.
+ class AlignedRingBuffer : public RingBufferWrapper {
public:
- AlignedFencedAllocator(unsigned int size,
- CommandBufferHelper *helper,
- void *base)
- : FencedAllocatorWrapper(size, helper, base) {
+ AlignedRingBuffer(RingBuffer::Offset base_offset,
+ unsigned int size,
+ CommandBufferHelper *helper,
+ void *base)
+ : RingBufferWrapper(base_offset, size, helper, base) {
}
static unsigned int RoundToAlignment(unsigned int size) {
return (size + kAlignment - 1) & ~(kAlignment - 1);
}
- // Overrriden from FencedAllocatorWrapper
+ // Overrriden from RingBufferWrapper
void *Alloc(unsigned int size) {
- return FencedAllocatorWrapper::Alloc(RoundToAlignment(size));
+ return RingBufferWrapper::Alloc(RoundToAlignment(size));
}
- // Overrriden from FencedAllocatorWrapper
+ // Overrriden from RingBufferWrapper
template <typename T> T *AllocTyped(unsigned int count) {
return static_cast<T *>(Alloc(count * sizeof(T)));
}
@@ -230,7 +231,7 @@
IdAllocator renderbuffer_id_allocator_;
IdAllocator program_and_shader_id_allocator_;
IdAllocator texture_id_allocator_;
- AlignedFencedAllocator transfer_buffer_;
+ AlignedRingBuffer transfer_buffer_;
int transfer_buffer_id_;
void* result_buffer_;
uint32 result_shm_offset_;
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698