Revert "use 64-bits usage bits almost everywhere"
Bug: 38466700
This reverts commit 175d98757d7d9003d4f64756cf4c2b366ba77e97.
Change-Id: I5f08a4ca91511775cd52250d10a0220b258b8368
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index ded9549..cb893aa 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -1015,7 +1015,7 @@
return VK_ERROR_SURFACE_LOST_KHR;
}
}
- err = native_window_set_usage(surface.window.get(), uint64_t(gralloc_usage));
+ err = native_window_set_usage(surface.window.get(), gralloc_usage);
if (err != 0) {
// TODO(jessehall): Improve error reporting. Can we enumerate possible
// errors and translate them to valid Vulkan result codes?
@@ -1092,7 +1092,7 @@
image_native_buffer.handle = img.buffer->handle;
image_native_buffer.stride = img.buffer->stride;
image_native_buffer.format = img.buffer->format;
- image_native_buffer.usage = int(img.buffer->usage);
+ image_native_buffer.usage = img.buffer->usage;
// TODO: Adjust once ANativeWindowBuffer supports gralloc1-style usage.
// For now, this is the same translation Gralloc1On0Adapter does.
image_native_buffer.usage2.consumer =