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

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

Issue 11419280: Make FencedAlloctor fail on size = 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add separate zero allocation tracking Created 8 years 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/fenced_allocator.h
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h
index 3ccad45951e2fd0b45a94d49e88239c47941ae6d..486063b5c06e35ab30ceaa529618ce8c4e1dc81d 100644
--- a/gpu/command_buffer/client/fenced_allocator.h
+++ b/gpu/command_buffer/client/fenced_allocator.h
@@ -132,8 +132,13 @@ class GPU_EXPORT FencedAllocator {
// the other functions that return a block index).
Offset AllocInBlock(BlockIndex index, unsigned int size);
+ // Frees allocations of size = 0.
+ void FreeZeroAlloc(FencedAllocator::Offset offset);
+
CommandBufferHelper *helper_;
Container blocks_;
+ Offset zero_offset_;
+ std::vector<bool> zero_allocs_;
DISALLOW_IMPLICIT_CONSTRUCTORS(FencedAllocator);
};
« no previous file with comments | « no previous file | gpu/command_buffer/client/fenced_allocator.cc » ('j') | gpu/command_buffer/client/fenced_allocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698