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

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

Issue 706173005: Enable asynchronous glReadPixels on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add mechanism to propagate service-side glMapBuffer errors + tests. 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
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..d827d874f00ba5cb2d3918c4eb12c4975ab97608 100644
--- a/gpu/command_buffer/client/fenced_allocator.cc
+++ b/gpu/command_buffer/client/fenced_allocator.cc
@@ -14,17 +14,15 @@ 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

Powered by Google App Engine
This is Rietveld 408576698