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

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

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 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/mapped_memory.h » ('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 80038571be9fccf4e5274101e0959c33aa2586c9..6db6e501977d1ca79f14bdc4e082d029b6302b7a 100644
--- a/gpu/command_buffer/client/fenced_allocator.cc
+++ b/gpu/command_buffer/client/fenced_allocator.cc
@@ -14,23 +14,22 @@ namespace gpu {
namespace {
-// Allocation alignment, must be a power of two.
-const unsigned int kAllocAlignment = 16;
-
// Round down to the largest multiple of kAllocAlignment no greater than |size|.
unsigned int RoundDown(unsigned int size) {
- return size & ~(kAllocAlignment - 1);
+ return size & ~(FencedAllocator::kAllocAlignment - 1);
}
// Round up to the smallest multiple of kAllocAlignment no smaller than |size|.
unsigned int RoundUp(unsigned int size) {
- return (size + (kAllocAlignment - 1)) & ~(kAllocAlignment - 1);
+ return (size + (FencedAllocator::kAllocAlignment - 1)) &
+ ~(FencedAllocator::kAllocAlignment - 1);
}
} // namespace
#ifndef _MSC_VER
const FencedAllocator::Offset FencedAllocator::kInvalidOffset;
+const unsigned int FencedAllocator::kAllocAlignment;
#endif
FencedAllocator::FencedAllocator(unsigned int size,
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.h ('k') | gpu/command_buffer/client/mapped_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698