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

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

Issue 8369010: Add GLES2Implemention::FreeUnusedSharedMemory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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 | « gpu/command_buffer/client/fenced_allocator.h ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/fenced_allocator.cc
diff --git a/gpu/command_buffer/client/fenced_allocator.cc b/gpu/command_buffer/client/fenced_allocator.cc
index f105f3a50ea3e23b6045f798831af085aebd3e2b..912c22dd6cbf4e285af07c386593f0eef78f1b6a 100644
--- a/gpu/command_buffer/client/fenced_allocator.cc
+++ b/gpu/command_buffer/client/fenced_allocator.cc
@@ -130,6 +130,10 @@ bool FencedAllocator::CheckConsistency() {
return true;
}
+bool FencedAllocator::InUse() {
+ return blocks_.size() != 1 || blocks_[0].state != FREE;
+}
+
// Collapse the block to the next one, then to the previous one. Provided the
// structure is consistent, those are the only blocks eligible for collapse.
FencedAllocator::BlockIndex FencedAllocator::CollapseFreeBlock(
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.h ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698