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

Unified Diff: trunk/src/gpu/command_buffer/client/mapped_memory.h

Issue 216673006: Revert 260177 "By keeping track of transfer buffer usage (both s..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
Index: trunk/src/gpu/command_buffer/client/mapped_memory.h
===================================================================
--- trunk/src/gpu/command_buffer/client/mapped_memory.h (revision 260192)
+++ trunk/src/gpu/command_buffer/client/mapped_memory.h (working copy)
@@ -5,7 +5,6 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_
#define GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_
-#include "base/bind.h"
#include "base/memory/scoped_vector.h"
#include "gpu/command_buffer/client/fenced_allocator.h"
#include "gpu/command_buffer/common/buffer.h"
@@ -21,8 +20,7 @@
public:
MemoryChunk(int32 shm_id,
scoped_refptr<gpu::Buffer> shm,
- CommandBufferHelper* helper,
- const base::Closure& poll_callback);
+ CommandBufferHelper* helper);
~MemoryChunk();
// Gets the size of the largest free block that is available without waiting.
@@ -123,7 +121,6 @@
// |unused_memory_reclaim_limit|: When exceeded this causes pending memory
// to be reclaimed before allocating more memory.
MappedMemoryManager(CommandBufferHelper* helper,
- const base::Closure& poll_callback,
size_t unused_memory_reclaim_limit);
~MappedMemoryManager();
@@ -168,15 +165,6 @@
return chunks_.size();
}
- size_t bytes_in_use() const {
- size_t bytes_in_use = 0;
- for (size_t ii = 0; ii < chunks_.size(); ++ii) {
- MemoryChunk* chunk = chunks_[ii];
- bytes_in_use += chunk->bytes_in_use();
- }
- return bytes_in_use;
- }
-
// Used for testing
size_t allocated_memory() const {
return allocated_memory_;
@@ -188,7 +176,6 @@
// size a chunk is rounded up to.
unsigned int chunk_size_multiple_;
CommandBufferHelper* helper_;
- base::Closure poll_callback_;
MemoryChunkVector chunks_;
size_t allocated_memory_;
size_t max_free_bytes_;

Powered by Google App Engine
This is Rietveld 408576698