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

Side by Side Diff: gpu/command_buffer/client/mapped_memory.h

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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(multiple % FencedAllocator::kAllocAlignment == 0);
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.cc ('k') | gpu/command_buffer/client/mapped_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698