Reland^2: Use "gfxstream" namespace
This reverts commit d37d7c8c0cdf6b84d453cb41e358094880a8f3b5.
Reland adds in aosp/2516595 which was only built on the "full"
target and removes namespace around window methods to satisfy
MacOS build.
Bug: b/271464937
Test: android build
Test: cmake build
Test: ATP MacOS build
Change-Id: Ida36ac16f9c3b98aedd744d21c9b27e9063a8eea
diff --git a/stream-servers/vulkan/VkCommonOperations.cpp b/stream-servers/vulkan/VkCommonOperations.cpp
index b5032c5..32795d3 100644
--- a/stream-servers/vulkan/VkCommonOperations.cpp
+++ b/stream-servers/vulkan/VkCommonOperations.cpp
@@ -49,6 +49,10 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
+namespace gfxstream {
+namespace vk {
+namespace {
+
#define VK_COMMON_ERROR(fmt, ...) \
fprintf(stderr, "%s:%d " fmt "\n", __func__, __LINE__, ##__VA_ARGS__);
#define VK_COMMON_LOG(fmt, ...) \
@@ -58,19 +62,14 @@
fprintf(stderr, "%s:%d " fmt "\n", __func__, __LINE__, ##__VA_ARGS__);
using android::base::AutoLock;
+using android::base::kNullopt;
using android::base::ManagedDescriptor;
using android::base::Optional;
using android::base::StaticLock;
using android::base::StaticMap;
-
-using android::base::kNullopt;
using emugl::ABORT_REASON_OTHER;
using emugl::FatalError;
-namespace goldfish_vk {
-
-namespace {
-
constexpr size_t kPageBits = 12;
constexpr size_t kPageSize = 1u << kPageBits;
@@ -509,7 +508,7 @@
if (sVkEmulation) return sVkEmulation;
- if (!emugl::vkDispatchValid(vk)) {
+ if (!vkDispatchValid(vk)) {
VK_EMU_INIT_RETURN_OR_ABORT_ON_ERROR(ABORT_REASON_OTHER, "Dispatch is invalid.");
}
@@ -3226,4 +3225,5 @@
return compositorInfo;
}
-} // namespace goldfish_vk
+} // namespace vk
+} // namespace gfxstream