| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 
| 6 #define GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 128                       const base::Closure& poll_callback, | 128                       const base::Closure& poll_callback, | 
| 129                       size_t unused_memory_reclaim_limit); | 129                       size_t unused_memory_reclaim_limit); | 
| 130 | 130 | 
| 131   ~MappedMemoryManager(); | 131   ~MappedMemoryManager(); | 
| 132 | 132 | 
| 133   unsigned int chunk_size_multiple() const { | 133   unsigned int chunk_size_multiple() const { | 
| 134     return chunk_size_multiple_; | 134     return chunk_size_multiple_; | 
| 135   } | 135   } | 
| 136 | 136 | 
| 137   void set_chunk_size_multiple(unsigned int multiple) { | 137   void set_chunk_size_multiple(unsigned int multiple) { | 
|  | 138     DCHECK_GE(multiple, FencedAllocator::kAllocAlignment); | 
| 138     chunk_size_multiple_ = multiple; | 139     chunk_size_multiple_ = multiple; | 
| 139   } | 140   } | 
| 140 | 141 | 
| 141   // Allocates a block of memory | 142   // Allocates a block of memory | 
| 142   // Parameters: | 143   // Parameters: | 
| 143   //   size: size of memory to allocate. | 144   //   size: size of memory to allocate. | 
| 144   //   shm_id: pointer to variable to receive the shared memory id. | 145   //   shm_id: pointer to variable to receive the shared memory id. | 
| 145   //   shm_offset: pointer to variable to receive the shared memory offset. | 146   //   shm_offset: pointer to variable to receive the shared memory offset. | 
| 146   // Returns: | 147   // Returns: | 
| 147   //   pointer to allocated block of memory. NULL if failure. | 148   //   pointer to allocated block of memory. NULL if failure. | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 194   MemoryChunkVector chunks_; | 195   MemoryChunkVector chunks_; | 
| 195   size_t allocated_memory_; | 196   size_t allocated_memory_; | 
| 196   size_t max_free_bytes_; | 197   size_t max_free_bytes_; | 
| 197 | 198 | 
| 198   DISALLOW_COPY_AND_ASSIGN(MappedMemoryManager); | 199   DISALLOW_COPY_AND_ASSIGN(MappedMemoryManager); | 
| 199 }; | 200 }; | 
| 200 | 201 | 
| 201 }  // namespace gpu | 202 }  // namespace gpu | 
| 202 | 203 | 
| 203 #endif  // GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 204 #endif  // GPU_COMMAND_BUFFER_CLIENT_MAPPED_MEMORY_H_ | 
| 204 |  | 
| OLD | NEW | 
|---|