mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-11-01 03:18:02 +03:00
init
This commit is contained in:
12511 files changed
+6156641
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2024 Google LLC
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "gfxstream/guest/GfxStreamGralloc.h"
|
||||
#include "util/detect_os.h"
|
||||
|
||||
#if DETECT_OS_ANDROID
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "GrallocGoldfish.h"
|
||||
#include "GrallocMinigbm.h"
|
||||
#include "android-base/properties.h"
|
||||
|
||||
namespace gfxstream {
|
||||
|
||||
Gralloc* createPlatformGralloc(int32_t descriptor) {
|
||||
const std::string value = android::base::GetProperty("ro.hardware.gralloc", "");
|
||||
if (value == "minigbm") {
|
||||
auto gralloc = new MinigbmGralloc(descriptor);
|
||||
return gralloc;
|
||||
}
|
||||
return new GoldfishGralloc();
|
||||
}
|
||||
|
||||
} // namespace gfxstream
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user