drm_hwcomposer: Migrate to android::drm_hwcomposer namespace
Change-Id: I2859aa8f55532d88231389724956fc77b0625339
This commit is contained in:
parent
d4ab368f7f
commit
9255d0d10b
88 changed files with 281 additions and 241 deletions
|
|
@ -24,7 +24,7 @@
|
|||
#include "drm/DrmHwc.h"
|
||||
#include "hwc/HwcDisplay.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
@ -273,4 +273,4 @@ std::tuple<size_t, size_t> Backend::GetExtraClientRange(
|
|||
REGISTER_BACKEND("generic", Backend);
|
||||
// clang-format on
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "compositor/LayerData.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
struct DrmKmsPlan;
|
||||
class HwcDisplay;
|
||||
|
|
@ -63,4 +63,5 @@ class Backend {
|
|||
const HwcDisplay* display, const std::vector<const HwcLayer*>& layers,
|
||||
size_t client_start, size_t client_size, bool use_cursor_plane);
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include "BackendManager.h"
|
||||
#include "hwc/HwcDisplay.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto BackendClient::ValidateDisplay(HwcDisplay* display)
|
||||
-> ValidatedComposition {
|
||||
|
|
@ -31,4 +31,4 @@ auto BackendClient::ValidateDisplay(HwcDisplay* display)
|
|||
REGISTER_BACKEND("client", BackendClient);
|
||||
// clang-format on
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@
|
|||
|
||||
#include "Backend.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BackendClient : public Backend {
|
||||
public:
|
||||
auto ValidateDisplay(HwcDisplay* display) -> ValidatedComposition override;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
// NOLINTNEXTLINE(cert-err58-cpp)
|
||||
const std::vector<std::string> BackendManager::kClientDevices = {
|
||||
|
|
@ -81,4 +81,5 @@ std::unique_ptr<Backend> BackendManager::GetBackendByName(std::string &name) {
|
|||
|
||||
return available_backends_[name]();
|
||||
}
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
return std::make_unique<backend_>(); \
|
||||
});
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BackendManager {
|
||||
public:
|
||||
|
|
@ -50,4 +50,5 @@ class BackendManager {
|
|||
|
||||
std::map<std::string, BackendConstructorT> available_backends_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
constexpr int kBufferMaxPlanes = 4;
|
||||
|
||||
|
|
@ -69,4 +69,4 @@ struct BufferInfo {
|
|||
std::shared_ptr<PrimeFdsSharedBase> fds_shared;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
BufferInfoGetter *BufferInfoGetter::GetInstance() {
|
||||
static std::unique_ptr<BufferInfoGetter> inst;
|
||||
|
|
@ -122,4 +122,4 @@ LegacyBufferInfoGetter::CreateInstance() {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#define DRM_FORMAT_INVALID 0
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
using BufferUniqueId = uint64_t;
|
||||
|
||||
|
|
@ -87,4 +87,4 @@ class LegacyBufferInfoGetter : public BufferInfoGetter {
|
|||
}
|
||||
#endif
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
@ -179,4 +179,4 @@ auto BufferInfoMapperMetadata::GetBoInfo(buffer_handle_t handle)
|
|||
return bi;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoMapperMetadata : public BufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -30,4 +30,5 @@ class BufferInfoMapperMetadata : public BufferInfoGetter {
|
|||
|
||||
static BufferInfoGetter *CreateInstance();
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "img_gralloc1_public.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoImagination);
|
||||
|
||||
|
|
@ -65,4 +65,4 @@ auto BufferInfoImagination::GetBoInfo(buffer_handle_t handle)
|
|||
return bi;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoImagination : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -28,4 +28,5 @@ class BufferInfoImagination : public LegacyBufferInfoGetter {
|
|||
|
||||
auto GetBoInfo(buffer_handle_t handle) -> std::optional<BufferInfo> override;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoLibdrm);
|
||||
|
||||
|
|
@ -227,4 +227,4 @@ int BufferInfoLibdrm::ValidateGralloc() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoLibdrm : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -33,4 +33,4 @@ class BufferInfoLibdrm : public LegacyBufferInfoGetter {
|
|||
BufferInfo *bo);
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#define MALI_ALIGN(value, base) (((value) + ((base)-1)) & ~((base)-1))
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoMaliHisi);
|
||||
|
||||
|
|
@ -122,4 +122,4 @@ auto BufferInfoMaliHisi::GetBoInfo(buffer_handle_t handle)
|
|||
return bi;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoMaliHisi : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -31,4 +31,5 @@ class BufferInfoMaliHisi : public LegacyBufferInfoGetter {
|
|||
private:
|
||||
uint64_t ConvertGrallocFormatToDrmModifiers(uint64_t flags, bool is_rgb);
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "gralloc_priv.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoMaliMediatek);
|
||||
|
||||
|
|
@ -54,4 +54,4 @@ auto BufferInfoMaliMediatek::GetBoInfo(buffer_handle_t handle)
|
|||
return bi;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoMaliMediatek : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -28,4 +28,5 @@ class BufferInfoMaliMediatek : public LegacyBufferInfoGetter {
|
|||
|
||||
auto GetBoInfo(buffer_handle_t handle) -> std::optional<BufferInfo> override;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "gralloc_priv.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoMaliMeson);
|
||||
|
||||
|
|
@ -89,4 +89,4 @@ auto BufferInfoMaliMeson::GetBoInfo(buffer_handle_t handle)
|
|||
return bi;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoMaliMeson : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -30,4 +30,5 @@ class BufferInfoMaliMeson : public LegacyBufferInfoGetter {
|
|||
private:
|
||||
uint64_t ConvertGrallocFormatToDrmModifiers(uint64_t flags);
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "utils/log.h"
|
||||
namespace android {
|
||||
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
LEGACY_BUFFER_INFO_GETTER(BufferInfoMinigbm);
|
||||
|
||||
|
|
@ -122,4 +123,4 @@ int BufferInfoMinigbm::ValidateGralloc() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class BufferInfoMinigbm : public LegacyBufferInfoGetter {
|
||||
public:
|
||||
|
|
@ -29,4 +29,4 @@ class BufferInfoMinigbm : public LegacyBufferInfoGetter {
|
|||
int ValidateGralloc() override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <array>
|
||||
#include <cstdint>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
/*
|
||||
* 4x4 Identity matrix used for color transformations.
|
||||
|
|
@ -103,4 +103,4 @@ struct QueuedConfigTiming {
|
|||
int64_t new_vsync_time_ns;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
#include "drm/DrmPlane.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmKmsPlan::CreateDrmKmsPlan(const DrmDisplayPipeline &pipe,
|
||||
std::vector<LayerData> composition,
|
||||
std::optional<LayerData> cursor_layer)
|
||||
|
|
@ -71,4 +72,4 @@ auto DrmKmsPlan::CreateDrmKmsPlan(const DrmDisplayPipeline &pipe,
|
|||
return plan;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "LayerData.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmDevice;
|
||||
|
||||
|
|
@ -40,4 +40,4 @@ struct DrmKmsPlan {
|
|||
-> std::unique_ptr<DrmKmsPlan>;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto FlatteningController::CreateInstance(FlatConCallbacks &cbks)
|
||||
-> std::shared_ptr<FlatteningController> {
|
||||
|
|
@ -98,4 +98,4 @@ void FlatteningController::ThreadFn() {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <functional>
|
||||
#include <thread>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
// NOLINTNEXTLINE(misc-unused-using-decls): False positive
|
||||
using std::chrono_literals::operator""s;
|
||||
|
|
@ -73,4 +73,4 @@ class FlatteningController {
|
|||
FlatConCallbacks cbks_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "drm/DrmFbImporter.h"
|
||||
#include "utils/fd.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmFbIdHandle;
|
||||
|
||||
|
|
@ -107,4 +107,4 @@ struct LayerData {
|
|||
SharedFd acquire_fence;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "drm/DrmUnique.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmAtomicStateManager::CreateInstance(DrmDisplayPipeline *pipe)
|
||||
-> std::shared_ptr<DrmAtomicStateManager> {
|
||||
|
|
@ -579,4 +579,4 @@ auto DrmAtomicStateManager::ActivateDisplayUsingDPMS() -> int {
|
|||
DRM_MODE_DPMS_ON);
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "drm/ResourceManager.h"
|
||||
#include "drm/VSyncWorker.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
struct AtomicCommitArgs {
|
||||
/* inputs. All fields are optional, but at least one has to be specified */
|
||||
|
|
@ -174,4 +174,4 @@ class DrmAtomicStateManager {
|
|||
int frames_tracked_ GUARDED_BY(mutex_){};
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#define DRM_MODE_CONNECTOR_USB 20
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
constexpr size_t kTypesCount = 21;
|
||||
|
||||
|
|
@ -302,4 +302,4 @@ std::optional<PanelOrientation> DrmConnector::GetPanelOrientation() {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "compositor/DisplayInfo.h"
|
||||
#include "utils/EdidWrapper.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmDevice;
|
||||
|
||||
|
|
@ -190,4 +190,5 @@ class DrmConnector : public PipelineBindable<DrmConnector> {
|
|||
std::map<Colorspace, uint64_t> colorspace_enum_map_;
|
||||
std::map<uint64_t, PanelOrientation> panel_orientation_enum_map_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "DrmDevice.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
static int GetCrtcProperty(const DrmDevice &dev, const DrmCrtc &crtc,
|
||||
const char *prop_name, DrmProperty *property) {
|
||||
|
|
@ -69,4 +69,4 @@ auto DrmCrtc::CreateInstance(DrmDevice &dev, uint32_t crtc_id, uint32_t index)
|
|||
return c;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "DrmProperty.h"
|
||||
#include "DrmUnique.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmDevice;
|
||||
|
||||
|
|
@ -76,4 +76,5 @@ class DrmCrtc : public PipelineBindable<DrmCrtc> {
|
|||
DrmProperty mode_property_;
|
||||
DrmProperty out_fence_ptr_property_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmDevice::CreateInstance(std::string const &path,
|
||||
ResourceManager *res_man, uint32_t index)
|
||||
|
|
@ -401,4 +401,4 @@ done:
|
|||
}
|
||||
// NOLINTEND(cppcoreguidelines-avoid-goto)
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "bufferinfo/BufferInfo.h"
|
||||
#include "utils/fd.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmFbImporter;
|
||||
class DrmPlane;
|
||||
|
|
@ -141,4 +141,4 @@ class DrmDevice {
|
|||
ResourceManager *const res_man_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
template <class O>
|
||||
auto PipelineBindable<O>::BindPipeline(const DrmDisplayPipeline *pipeline,
|
||||
|
|
@ -208,4 +208,4 @@ DrmDisplayPipeline::~DrmDisplayPipeline() {
|
|||
atomic_state_manager->StopThread();
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmConnector;
|
||||
class DrmDevice;
|
||||
|
|
@ -92,4 +92,4 @@ struct DrmDisplayPipeline {
|
|||
std::shared_ptr<DrmAtomicStateManager> atomic_state_manager;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "DrmDevice.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmEncoder::CreateInstance(DrmDevice &dev, uint32_t encoder_id,
|
||||
uint32_t index) -> std::unique_ptr<DrmEncoder> {
|
||||
|
|
@ -38,4 +38,4 @@ auto DrmEncoder::CreateInstance(DrmDevice &dev, uint32_t encoder_id,
|
|||
return std::unique_ptr<DrmEncoder>(new DrmEncoder(std::move(e), index));
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "DrmCrtc.h"
|
||||
#include "DrmDisplayPipeline.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmEncoder : public PipelineBindable<DrmEncoder> {
|
||||
public:
|
||||
|
|
@ -63,4 +63,4 @@ class DrmEncoder : public PipelineBindable<DrmEncoder> {
|
|||
|
||||
const uint32_t index_in_res_array_;
|
||||
};
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmFbIdHandle::CreateInstance(BufferInfo *bo, GemHandle first_gem_handle,
|
||||
DrmDevice &drm)
|
||||
|
|
@ -172,4 +172,4 @@ auto DrmFbImporter::GetOrCreateFbId(BufferInfo *bo)
|
|||
return fb_id_handle;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
using GemHandle = uint32_t;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmFbIdHandle {
|
||||
public:
|
||||
|
|
@ -87,4 +87,4 @@ class DrmFbImporter {
|
|||
std::map<GemHandle, std::weak_ptr<DrmFbIdHandle>> drm_fb_id_handle_cache_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
namespace {
|
||||
// Helper functions for implementing dumpsys support.
|
||||
std::string DumpStats(const CompositionStats &stats) {
|
||||
|
|
@ -249,4 +250,4 @@ void DrmHwc::DeinitDisplays() {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "hwc/HwcDisplay.h"
|
||||
#include "stats/CompositionStats.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmHwc : public PipelineToFrontendBindingInterface,
|
||||
public CompositionStatsProvider {
|
||||
|
|
@ -100,4 +100,5 @@ class DrmHwc : public PipelineToFrontendBindingInterface,
|
|||
DisplayHandle last_display_handle_ = kPrimaryDisplay;
|
||||
CompositionStatsTracker dump_stats_tracker_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "DrmDevice.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
DrmMode::DrmMode(drmModeModeInfoPtr m) : mode_(*m){};
|
||||
|
||||
|
|
@ -45,4 +45,4 @@ auto DrmMode::CreateModeBlob(const DrmDevice &drm) const
|
|||
sizeof(struct drm_mode_modeinfo));
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "DrmUnique.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmDevice;
|
||||
|
||||
|
|
@ -66,4 +66,5 @@ class DrmMode {
|
|||
private:
|
||||
drmModeModeInfo mode_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "compositor/LayerData.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
namespace {
|
||||
// Ensure that |src| does not exceed the bounds of the buffer.
|
||||
|
|
@ -414,4 +414,4 @@ auto DrmPlane::GetPlaneProperty(const char *prop_name, DrmProperty &property,
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "DrmProperty.h"
|
||||
#include "compositor/LayerData.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmDevice;
|
||||
struct LayerData;
|
||||
|
|
@ -108,4 +108,5 @@ class DrmPlane : public PipelineBindable<DrmPlane> {
|
|||
uint64_t transform_enum_mask_ = DRM_MODE_ROTATE_0;
|
||||
std::vector<drm_plane_size_hint_local> size_hints_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "DrmDevice.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
DrmProperty::DrmPropertyEnum::DrmPropertyEnum(drm_mode_property_enum *e)
|
||||
: value(e->value), name(e->name) {
|
||||
|
|
@ -166,4 +166,4 @@ auto DrmProperty::GetEnumMask(uint64_t &mask) -> bool {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "utils/fd.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmProperty {
|
||||
public:
|
||||
|
|
@ -183,4 +183,4 @@ bool DrmProperty::GetBlobData(std::vector<T> &data_out) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
template <typename T>
|
||||
using DUniquePtr = std::unique_ptr<T, std::function<void(T *)>>;
|
||||
|
|
@ -85,4 +85,4 @@ auto inline MakeDrmModeResUnique(int fd) {
|
|||
[](drmModeRes *it) { drmModeFreeResources(it); });
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
ResourceManager::ResourceManager(
|
||||
PipelineToFrontendBindingInterface *p2f_bind_interface)
|
||||
|
|
@ -222,4 +222,4 @@ auto ResourceManager::GetWritebackConnectorsCount() -> uint32_t {
|
|||
return count;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "UEventListener.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class PipelineToFrontendBindingInterface {
|
||||
public:
|
||||
|
|
@ -94,4 +94,5 @@ class ResourceManager {
|
|||
|
||||
bool initialized_{};
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
UEventListener::~UEventListener() {
|
||||
StopThread();
|
||||
|
|
@ -69,4 +69,4 @@ void UEventListener::ThreadFn() {
|
|||
ALOGI("UEvent thread exit");
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "utils/UEvent.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class UEventListener {
|
||||
public:
|
||||
|
|
@ -48,4 +48,5 @@ class UEventListener {
|
|||
|
||||
std::function<void()> hotplug_handler_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "drm/ResourceManager.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto VSyncWorker::CreateInstance(std::shared_ptr<DrmDisplayPipeline> &pipe)
|
||||
-> std::unique_ptr<VSyncWorker> {
|
||||
|
|
@ -222,4 +222,5 @@ void VSyncWorker::ThreadFn() {
|
|||
|
||||
ALOGI("VSyncWorker thread exit");
|
||||
}
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "DrmDevice.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class VSyncWorker {
|
||||
public:
|
||||
|
|
@ -87,4 +87,5 @@ class VSyncWorker {
|
|||
std::thread vswt_;
|
||||
std::mutex mutex_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -31,10 +31,9 @@
|
|||
#include "drm/DrmHwc.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
using ::android::DrmDisplayPipeline;
|
||||
using ColorGamut = ::android::ColorSpace;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
@ -1177,4 +1176,4 @@ void HwcDisplay::SetConfigGroupsForActiveConfig() {
|
|||
configs_.SanitizeGroups();
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "drm/VSyncWorker.h"
|
||||
#include "stats/CompositionStats.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
using DisplayHandle = int64_t;
|
||||
|
||||
|
|
@ -320,4 +320,4 @@ class HwcDisplay {
|
|||
std::shared_ptr<FrontendDisplayBase> frontend_private_data_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ constexpr uint32_t kBackPorch = 10;
|
|||
constexpr uint32_t kFrontPorch = 10;
|
||||
constexpr uint32_t kHzInKHz = 1000;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
void HwcDisplayConfigs::GenFakeMode(uint16_t width, uint16_t height) {
|
||||
hwc_configs.clear();
|
||||
|
|
@ -177,4 +177,4 @@ bool HwcDisplayConfigs::SanitizeGroups() {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "drm/DrmMode.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
using ConfigId = int32_t;
|
||||
|
||||
|
|
@ -69,4 +69,4 @@ struct HwcDisplayConfigs {
|
|||
uint32_t mm_height = 0;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "bufferinfo/BufferInfoGetter.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
void HwcLayer::SetLayerProperties(const LayerProperties& layer_properties) {
|
||||
if (layer_properties.slot_buffer) {
|
||||
|
|
@ -132,4 +132,4 @@ bool HwcLayer::IsLayerUsableAsDevice() const {
|
|||
return it->second.fb != nullptr;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "compositor/LayerData.h"
|
||||
#include "utils/fd.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class HwcDisplay;
|
||||
|
||||
|
|
@ -147,4 +147,4 @@ class HwcLayer {
|
|||
bool IsLayerUsableAsDevice() const;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "backend/Backend.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
HWC2::Error DrmHwcTwo::RegisterCallback(int32_t descriptor,
|
||||
hwc2_callback_data_t data,
|
||||
|
|
@ -122,4 +122,4 @@ const std::string& DrmHwcTwo::RefreshStateDump() {
|
|||
return last_state_dump_;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "drm/DrmHwc.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class DrmHwcTwo : public DrmHwc {
|
||||
public:
|
||||
|
|
@ -54,4 +54,5 @@ class DrmHwcTwo : public DrmHwc {
|
|||
|
||||
std::string last_state_dump_;
|
||||
};
|
||||
} // namespace android
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include "hwc/HwcLayer.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
static int32_t ConfigErrorToHWC2(HwcDisplay::ConfigError result) {
|
||||
switch (result) {
|
||||
|
|
@ -1490,11 +1490,11 @@ static int HookDevOpen(const struct hw_module_t *module, const char *name,
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
static struct hw_module_methods_t hwc2_module_methods = {
|
||||
.open = android::HookDevOpen,
|
||||
.open = android::drm_hwcomposer::HookDevOpen,
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "utils/log.h"
|
||||
#include "utils/properties.h"
|
||||
|
||||
using ::android::Properties;
|
||||
using ::android::drm_hwcomposer::Properties;
|
||||
|
||||
namespace aidl::android::hardware::graphics::composer3::impl {
|
||||
|
||||
|
|
|
|||
|
|
@ -50,24 +50,23 @@
|
|||
#include "stats/CompositionStatsAtomReporter.h"
|
||||
#include "stats/CompositionStatsPoller.h"
|
||||
|
||||
using ::android::BufferBlendMode;
|
||||
using ::android::BufferColorSpace;
|
||||
using ::android::BufferSampleRange;
|
||||
using ::android::CompositionStatsAtomReporter;
|
||||
using ::android::CompositionStatsPoller;
|
||||
using ::android::CompositionType;
|
||||
using ::android::DamageInfo;
|
||||
using ::android::DisplayHandle;
|
||||
using ::android::DstRectInfo;
|
||||
using ::android::HwcDisplay;
|
||||
using ::android::HwcDisplayConfig;
|
||||
using ::android::HwcLayer;
|
||||
using ::android::IRect;
|
||||
using ::android::LayerTransform;
|
||||
using ::android::PanelOrientation;
|
||||
using ::android::SrcRectInfo;
|
||||
using ::android::drm_hwcomposer::BufferBlendMode;
|
||||
using ::android::drm_hwcomposer::BufferColorSpace;
|
||||
using ::android::drm_hwcomposer::BufferSampleRange;
|
||||
using ::android::drm_hwcomposer::CompositionStatsPoller;
|
||||
using ::android::drm_hwcomposer::CompositionType;
|
||||
using ::android::drm_hwcomposer::DamageInfo;
|
||||
using ::android::drm_hwcomposer::DisplayHandle;
|
||||
using ::android::drm_hwcomposer::DstRectInfo;
|
||||
using ::android::drm_hwcomposer::HwcDisplay;
|
||||
using ::android::drm_hwcomposer::HwcDisplayConfig;
|
||||
using ::android::drm_hwcomposer::HwcLayer;
|
||||
using ::android::drm_hwcomposer::IRect;
|
||||
using ::android::drm_hwcomposer::LayerTransform;
|
||||
using ::android::drm_hwcomposer::PanelOrientation;
|
||||
using ::android::drm_hwcomposer::SrcRectInfo;
|
||||
|
||||
using HwcOutputType = ::android::OutputType;
|
||||
using HwcOutputType = ::android::drm_hwcomposer::OutputType;
|
||||
#if __ANDROID_API__ >= 36
|
||||
using AidlOutputType = aidl::android::hardware::graphics::composer3::OutputType;
|
||||
#endif
|
||||
|
|
@ -216,7 +215,7 @@ std::optional<std::array<float, kCtmSize>> AidlToColorTransformMatrix(
|
|||
}
|
||||
|
||||
std::array<float, kCtmSize>
|
||||
color_transform_matrix = ::android::kIdentityMatrix;
|
||||
color_transform_matrix = ::android::drm_hwcomposer::kIdentityMatrix;
|
||||
std::copy(aidl_color_transform_matrix->begin(),
|
||||
aidl_color_transform_matrix->end(), color_transform_matrix.begin());
|
||||
return color_transform_matrix;
|
||||
|
|
@ -376,7 +375,7 @@ std::optional<DamageInfo> AidlToDamage(
|
|||
|
||||
} // namespace
|
||||
|
||||
class Hwc3BufferHandle : public ::android::PrimeFdsSharedBase {
|
||||
class Hwc3BufferHandle : public ::android::drm_hwcomposer::PrimeFdsSharedBase {
|
||||
public:
|
||||
static auto Create(buffer_handle_t handle)
|
||||
-> std::shared_ptr<Hwc3BufferHandle> {
|
||||
|
|
@ -406,10 +405,11 @@ class Hwc3BufferHandle : public ::android::PrimeFdsSharedBase {
|
|||
buffer_handle_t imported_handle_{};
|
||||
};
|
||||
|
||||
class Hwc3Layer : public ::android::FrontendLayerBase {
|
||||
class Hwc3Layer : public ::android::drm_hwcomposer::FrontendLayerBase {
|
||||
public:
|
||||
auto HandleNextBuffer(std::optional<buffer_handle_t> raw_handle,
|
||||
::android::SharedFd fence_fd, int32_t slot_id)
|
||||
::android::drm_hwcomposer::SharedFd fence_fd,
|
||||
int32_t slot_id)
|
||||
-> std::optional<HwcLayer::LayerProperties> {
|
||||
HwcLayer::LayerProperties lp;
|
||||
if (!raw_handle && slots_.count(slot_id) != 0) {
|
||||
|
|
@ -431,8 +431,8 @@ class Hwc3Layer : public ::android::FrontendLayerBase {
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto bi = ::android::BufferInfoGetter::GetInstance()->GetBoInfo(
|
||||
hwc3->GetHandle());
|
||||
auto bi = ::android::drm_hwcomposer::BufferInfoGetter::GetInstance()
|
||||
->GetBoInfo(hwc3->GetHandle());
|
||||
if (bi) {
|
||||
bi->fds_shared = hwc3;
|
||||
|
||||
|
|
@ -495,7 +495,8 @@ void ComposerClient::Init() {
|
|||
DEBUG_FUNC();
|
||||
hwc_ = std::make_unique<DrmHwcThree>();
|
||||
|
||||
auto reporter = CompositionStatsAtomReporter::Create();
|
||||
auto reporter = ::android::drm_hwcomposer::CompositionStatsAtomReporter::
|
||||
Create();
|
||||
if (reporter) {
|
||||
stats_poller_ = std::make_unique<CompositionStatsPoller>(std::move(
|
||||
reporter),
|
||||
|
|
@ -586,7 +587,7 @@ ndk::ScopedAStatus ComposerClient::destroyVirtualDisplay(
|
|||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
::android::HwcDisplay* ComposerClient::GetDisplay(int64_t display_handle) {
|
||||
HwcDisplay* ComposerClient::GetDisplay(int64_t display_handle) {
|
||||
return hwc_->GetDisplay(static_cast<DisplayHandle>(display_handle));
|
||||
}
|
||||
|
||||
|
|
@ -660,9 +661,11 @@ void ComposerClient::DispatchLayerCommand(int64_t display_handle,
|
|||
auto fence = const_cast<::ndk::ScopedFileDescriptor&>(command.buffer->fence)
|
||||
.release();
|
||||
|
||||
auto lp = hwc3_layer->HandleNextBuffer(buffer_handle,
|
||||
::android::MakeSharedFd(fence),
|
||||
command.buffer->slot);
|
||||
auto lp = hwc3_layer
|
||||
->HandleNextBuffer(buffer_handle,
|
||||
::android::drm_hwcomposer::MakeSharedFd(
|
||||
fence),
|
||||
command.buffer->slot);
|
||||
|
||||
if (!lp) {
|
||||
cmd_result_writer_->AddError(hwc3::Error::kBadLayer);
|
||||
|
|
@ -785,7 +788,7 @@ void ComposerClient::ExecuteDisplayCommand(const DisplayCommand& command) {
|
|||
return;
|
||||
}
|
||||
|
||||
::android::SharedFd present_fence;
|
||||
::android::drm_hwcomposer::SharedFd present_fence;
|
||||
std::vector<HwcDisplay::ReleaseFence> release_fences;
|
||||
bool ret = display->PresentStagedComposition(hwc3_display
|
||||
->desired_present_time,
|
||||
|
|
@ -798,11 +801,13 @@ void ComposerClient::ExecuteDisplayCommand(const DisplayCommand& command) {
|
|||
|
||||
using ::android::base::unique_fd;
|
||||
cmd_result_writer_->AddPresentFence( //
|
||||
display_handle, unique_fd(::android::DupFd(present_fence)));
|
||||
display_handle,
|
||||
unique_fd(::android::drm_hwcomposer::DupFd(present_fence)));
|
||||
|
||||
std::unordered_map<int64_t, unique_fd> hal_release_fences;
|
||||
for (const auto& [layer_id, release_fence] : release_fences) {
|
||||
hal_release_fences[layer_id] = unique_fd(::android::DupFd(release_fence));
|
||||
hal_release_fences[layer_id] = unique_fd(
|
||||
::android::drm_hwcomposer::DupFd(release_fence));
|
||||
}
|
||||
cmd_result_writer_->AddReleaseFence(display_handle, hal_release_fences);
|
||||
}
|
||||
|
|
@ -865,8 +870,9 @@ ndk::ScopedAStatus ComposerClient::getDataspaceSaturationMatrix(
|
|||
}
|
||||
|
||||
matrix->clear();
|
||||
matrix->insert(matrix->begin(), ::android::kIdentityMatrix.begin(),
|
||||
::android::kIdentityMatrix.end());
|
||||
matrix->insert(matrix->begin(),
|
||||
::android::drm_hwcomposer::kIdentityMatrix.begin(),
|
||||
::android::drm_hwcomposer::kIdentityMatrix.end());
|
||||
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
|
@ -931,7 +937,7 @@ ndk::ScopedAStatus ComposerClient::getDisplayCapabilities(
|
|||
|
||||
// Skip color transform altogether if device/drm cannot support it.
|
||||
if (hwc_->GetResMan().GetCtmHandling() ==
|
||||
::android::CtmHandling::kDrmOrIgnore) {
|
||||
::android::drm_hwcomposer::CtmHandling::kDrmOrIgnore) {
|
||||
caps->emplace_back(DisplayCapability::SKIP_CLIENT_COLOR_TRANSFORM);
|
||||
}
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
|
@ -1147,7 +1153,8 @@ ndk::ScopedAStatus ComposerClient::getReadbackBufferFence(
|
|||
return ToBinderStatus(hwc3::Error::kUnsupported);
|
||||
}
|
||||
|
||||
::android::SharedFd fence = display->GetWritebackBufferFence();
|
||||
::android::drm_hwcomposer::SharedFd fence = display
|
||||
->GetWritebackBufferFence();
|
||||
display->SetWritebackEnabled(false);
|
||||
display->GetWritebackLayer()->ClearSlots();
|
||||
if (!fence) {
|
||||
|
|
@ -1156,7 +1163,8 @@ ndk::ScopedAStatus ComposerClient::getReadbackBufferFence(
|
|||
}
|
||||
|
||||
if (fence && *fence >= 0) {
|
||||
*acquire_fence = ndk::ScopedFileDescriptor(::android::DupFd(fence));
|
||||
*acquire_fence = ndk::ScopedFileDescriptor(
|
||||
::android::drm_hwcomposer::DupFd(fence));
|
||||
}
|
||||
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
|
@ -1219,7 +1227,8 @@ ndk::ScopedAStatus ComposerClient::setActiveConfig(int64_t display_handle,
|
|||
|
||||
VsyncPeriodChangeTimeline timeline;
|
||||
VsyncPeriodChangeConstraints constraints = {
|
||||
.desiredTimeNanos = ::android::ResourceManager::GetTimeMonotonicNs(),
|
||||
.desiredTimeNanos = ::android::drm_hwcomposer::ResourceManager::
|
||||
GetTimeMonotonicNs(),
|
||||
.seamlessRequired = false,
|
||||
};
|
||||
return setActiveConfigWithConstraints(display_handle, config, constraints,
|
||||
|
|
@ -1259,7 +1268,7 @@ ndk::ScopedAStatus ComposerClient::setActiveConfigWithConstraints(
|
|||
|
||||
// Always try to queue a seamless commit to reduce jank and flicker artifacts.
|
||||
// Fall-back to a full blocking commit otherwise.
|
||||
::android::QueuedConfigTiming timing{};
|
||||
::android::drm_hwcomposer::QueuedConfigTiming timing{};
|
||||
auto error = display->QueueConfig(config, constraints.desiredTimeNanos,
|
||||
&timing);
|
||||
if (error == HwcDisplay::kNone) {
|
||||
|
|
@ -1273,8 +1282,8 @@ ndk::ScopedAStatus ComposerClient::setActiveConfigWithConstraints(
|
|||
config);
|
||||
|
||||
error = display->SetConfig(config);
|
||||
timeline->newVsyncAppliedTimeNanos = ::android::ResourceManager::
|
||||
GetTimeMonotonicNs();
|
||||
timeline->newVsyncAppliedTimeNanos = ::android::drm_hwcomposer::
|
||||
ResourceManager::GetTimeMonotonicNs();
|
||||
timeline->refreshRequired = false;
|
||||
}
|
||||
|
||||
|
|
@ -1353,7 +1362,8 @@ ndk::ScopedAStatus ComposerClient::setColorMode(int64_t display_handle,
|
|||
if (intent != RenderIntent::COLORIMETRIC)
|
||||
return ToBinderStatus(hwc3::Error::kUnsupported);
|
||||
|
||||
display->SetColorMode(static_cast<::android::ColorMode>(mode));
|
||||
display->SetColorMode(
|
||||
static_cast<::android::drm_hwcomposer::ColorMode>(mode));
|
||||
return ToBinderStatus(hwc3::Error::kNone);
|
||||
}
|
||||
|
||||
|
|
@ -1445,14 +1455,14 @@ ndk::ScopedAStatus ComposerClient::setReadbackBuffer(
|
|||
HwcLayer::LayerProperties properties;
|
||||
properties.slot_buffer = {
|
||||
.slot_id = 0,
|
||||
.bi = ::android::BufferInfoGetter::GetInstance()->GetBoInfo(
|
||||
imported_handle),
|
||||
.bi = ::android::drm_hwcomposer::BufferInfoGetter::GetInstance()
|
||||
->GetBoInfo(imported_handle),
|
||||
};
|
||||
ndk::ScopedFileDescriptor release_fence = ndk::ScopedFileDescriptor(
|
||||
release_fence_in.get());
|
||||
properties.active_slot = {
|
||||
.slot_id = 0,
|
||||
.fence = ::android::MakeSharedFd(release_fence.release()),
|
||||
.fence = ::android::drm_hwcomposer::MakeSharedFd(release_fence.release()),
|
||||
};
|
||||
properties.blend_mode = BufferBlendMode::kNone;
|
||||
|
||||
|
|
@ -1583,7 +1593,8 @@ void ComposerClient::ExecuteSetDisplayClientTarget(
|
|||
.release();
|
||||
|
||||
auto properties = hwc3layer->HandleNextBuffer(raw_buffer,
|
||||
::android::MakeSharedFd(fence),
|
||||
::android::drm_hwcomposer::
|
||||
MakeSharedFd(fence),
|
||||
command.buffer.slot);
|
||||
|
||||
if (!properties) {
|
||||
|
|
@ -1626,7 +1637,8 @@ void ComposerClient::ExecuteSetDisplayOutputBuffer(int64_t display_handle,
|
|||
auto fence = const_cast<::ndk::ScopedFileDescriptor&>(buffer.fence).release();
|
||||
|
||||
auto properties = hwc3layer->HandleNextBuffer(raw_buffer,
|
||||
::android::MakeSharedFd(fence),
|
||||
::android::drm_hwcomposer::
|
||||
MakeSharedFd(fence),
|
||||
buffer.slot);
|
||||
|
||||
if (!properties) {
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
using AidlPixelFormat = aidl::android::hardware::graphics::common::PixelFormat;
|
||||
using AidlNativeHandle = aidl::android::hardware::common::NativeHandle;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
class CompositionStatsPoller;
|
||||
class HwcDisplay;
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
||||
namespace aidl::android::hardware::graphics::composer3::impl {
|
||||
using AidlColorMode = ColorMode;
|
||||
|
|
@ -160,9 +160,9 @@ class ComposerClient : public BnComposerClient {
|
|||
::ndk::SpAIBinder createBinder() override;
|
||||
|
||||
private:
|
||||
hwc3::Error ImportLayerBuffer(int64_t display_handle, int64_t layer_id,
|
||||
const Buffer& buffer,
|
||||
::android::HwcLayer::Buffer* out_buffer);
|
||||
hwc3::Error ImportLayerBuffer(
|
||||
int64_t display_handle, int64_t layer_id, const Buffer& buffer,
|
||||
::android::drm_hwcomposer::HwcLayer::Buffer* out_buffer);
|
||||
|
||||
// Layer commands
|
||||
void DispatchLayerCommand(int64_t display_handle,
|
||||
|
|
@ -175,13 +175,14 @@ class ComposerClient : public BnComposerClient {
|
|||
void ExecuteSetDisplayOutputBuffer(int64_t display_handle,
|
||||
const Buffer& buffer);
|
||||
|
||||
::android::HwcDisplay* GetDisplay(int64_t display_handle);
|
||||
::android::drm_hwcomposer::HwcDisplay* GetDisplay(int64_t display_handle);
|
||||
|
||||
std::unique_ptr<CommandResultWriter> cmd_result_writer_;
|
||||
|
||||
std::unique_ptr<DrmHwcThree> hwc_;
|
||||
|
||||
std::unique_ptr<::android::CompositionStatsPoller> stats_poller_;
|
||||
std::unique_ptr<::android::drm_hwcomposer::CompositionStatsPoller>
|
||||
stats_poller_;
|
||||
};
|
||||
|
||||
} // namespace aidl::android::hardware::graphics::composer3::impl
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace aidl::android::hardware::graphics::composer3::impl {
|
||||
|
||||
auto DrmHwcThree::GetHwc3Display(::android::HwcDisplay& display)
|
||||
auto DrmHwcThree::GetHwc3Display(::android::drm_hwcomposer::HwcDisplay& display)
|
||||
-> std::shared_ptr<Hwc3Display> {
|
||||
auto frontend_private_data = display.GetFrontendPrivateData();
|
||||
if (!frontend_private_data) {
|
||||
|
|
@ -47,7 +47,8 @@ void DrmHwcThree::Init(std::shared_ptr<IComposerCallback> callback) {
|
|||
}
|
||||
|
||||
void DrmHwcThree::SendVsyncPeriodTimingChangedEventToClient(
|
||||
::android::DisplayHandle display_handle, int64_t timestamp) const {
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle,
|
||||
int64_t timestamp) const {
|
||||
VsyncPeriodChangeTimeline timeline;
|
||||
timeline.newVsyncAppliedTimeNanos = timestamp;
|
||||
timeline.refreshRequired = false;
|
||||
|
|
@ -59,7 +60,7 @@ void DrmHwcThree::SendVsyncPeriodTimingChangedEventToClient(
|
|||
}
|
||||
|
||||
void DrmHwcThree::SendRefreshEventToClient(
|
||||
::android::DisplayHandle display_handle) {
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle) {
|
||||
{
|
||||
const std::scoped_lock lock(must_validate_lock_);
|
||||
must_validate_.insert(display_handle);
|
||||
|
|
@ -68,14 +69,14 @@ void DrmHwcThree::SendRefreshEventToClient(
|
|||
}
|
||||
|
||||
void DrmHwcThree::SendVsyncEventToClient(
|
||||
::android::DisplayHandle display_handle, int64_t timestamp,
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle, int64_t timestamp,
|
||||
uint32_t vsync_period) const {
|
||||
composer_callback_->onVsync(static_cast<int64_t>(display_handle), timestamp,
|
||||
static_cast<int32_t>(vsync_period));
|
||||
}
|
||||
|
||||
void DrmHwcThree::SendHotplugEventToClient(
|
||||
::android::DisplayHandle display_handle,
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle,
|
||||
DrmHwc::DisplayStatus display_status) {
|
||||
common::DisplayHotplugEvent event = common::DisplayHotplugEvent::DISCONNECTED;
|
||||
switch (display_status) {
|
||||
|
|
@ -97,13 +98,13 @@ void DrmHwcThree::SendHotplugEventToClient(
|
|||
}
|
||||
|
||||
auto DrmHwcThree::GetMustValidateDisplay(
|
||||
::android::DisplayHandle display_handle) -> bool {
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle) -> bool {
|
||||
std::scoped_lock lock(must_validate_lock_);
|
||||
return must_validate_.find(display_handle) != must_validate_.end();
|
||||
}
|
||||
|
||||
void DrmHwcThree::ClearMustValidateDisplay(
|
||||
::android::DisplayHandle display_handle) {
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle) {
|
||||
std::scoped_lock lock(must_validate_lock_);
|
||||
must_validate_.erase(display_handle);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace aidl::android::hardware::graphics::composer3::impl {
|
||||
|
||||
class Hwc3Display : public ::android::FrontendDisplayBase {
|
||||
class Hwc3Display : public ::android::drm_hwcomposer::FrontendDisplayBase {
|
||||
public:
|
||||
// Desired present time for a composition that has been validated but not
|
||||
// yet presented. nullopt means it should be presented at the next vsync.
|
||||
|
|
@ -33,7 +33,7 @@ class Hwc3Display : public ::android::FrontendDisplayBase {
|
|||
int64_t next_layer_id = 1;
|
||||
};
|
||||
|
||||
class DrmHwcThree : public ::android::DrmHwc {
|
||||
class DrmHwcThree : public ::android::drm_hwcomposer::DrmHwc {
|
||||
public:
|
||||
explicit DrmHwcThree() = default;
|
||||
~DrmHwcThree() override;
|
||||
|
|
@ -41,28 +41,32 @@ class DrmHwcThree : public ::android::DrmHwc {
|
|||
void Init(std::shared_ptr<IComposerCallback> callback);
|
||||
|
||||
// DrmHwcInterface
|
||||
void SendVsyncEventToClient(::android::DisplayHandle display_handle,
|
||||
int64_t timestamp,
|
||||
uint32_t vsync_period) const override;
|
||||
void SendVsyncEventToClient(
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle,
|
||||
int64_t timestamp, uint32_t vsync_period) const override;
|
||||
void SendVsyncPeriodTimingChangedEventToClient(
|
||||
::android::DisplayHandle display_handle,
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle,
|
||||
int64_t timestamp) const override;
|
||||
void SendRefreshEventToClient(
|
||||
::android::DisplayHandle display_handle) override;
|
||||
void SendHotplugEventToClient(::android::DisplayHandle display_handle,
|
||||
DrmHwc::DisplayStatus display_status) override;
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle) override;
|
||||
void SendHotplugEventToClient(
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle,
|
||||
DrmHwc::DisplayStatus display_status) override;
|
||||
|
||||
static auto GetHwc3Display(::android::HwcDisplay& display)
|
||||
static auto GetHwc3Display(::android::drm_hwcomposer::HwcDisplay& display)
|
||||
-> std::shared_ptr<Hwc3Display>;
|
||||
|
||||
auto GetMustValidateDisplay(::android::DisplayHandle display_handle) -> bool;
|
||||
void ClearMustValidateDisplay(::android::DisplayHandle display_handle);
|
||||
auto GetMustValidateDisplay(
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle) -> bool;
|
||||
void ClearMustValidateDisplay(
|
||||
::android::drm_hwcomposer::DisplayHandle display_handle);
|
||||
|
||||
private:
|
||||
std::shared_ptr<IComposerCallback> composer_callback_;
|
||||
|
||||
std::mutex must_validate_lock_;
|
||||
std::set<::android::DisplayHandle> must_validate_
|
||||
std::set<::android::drm_hwcomposer::DisplayHandle> must_validate_
|
||||
GUARDED_BY(must_validate_lock_);
|
||||
};
|
||||
|
||||
} // namespace aidl::android::hardware::graphics::composer3::impl
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "stats/CompositionStats.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
CompositionStats operator-(const CompositionStats& a,
|
||||
const CompositionStats& b) {
|
||||
|
|
@ -39,4 +39,4 @@ void CompositionStatsTracker::ReportStats(const Callback& callback) {
|
|||
previous_stats_ = new_stats;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <functional>
|
||||
#include <map>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
struct CompositionStats {
|
||||
uint32_t total_frames = 0;
|
||||
|
|
@ -70,4 +70,4 @@ class CompositionStatsTracker {
|
|||
std::map<int64_t, CompositionStats> previous_stats_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
std::unique_ptr<CompositionStatsAtomReporter>
|
||||
CompositionStatsAtomReporter::Create() {
|
||||
|
|
@ -28,4 +28,4 @@ CompositionStatsAtomReporter::Create() {
|
|||
return {};
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
// CompositionStatsAtomReporter is a wrapper around creation of a VendorAtom
|
||||
// and pushing it to the IStats::reportVendorAtom interface.
|
||||
|
|
@ -35,4 +35,4 @@ class CompositionStatsAtomReporter {
|
|||
virtual ~CompositionStatsAtomReporter() = default;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ using aidl::android::frameworks::stats::IStats;
|
|||
using aidl::android::frameworks::stats::VendorAtom;
|
||||
namespace DesktopAtoms = android::vendor::google::desktop::stats::DesktopAtoms;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
namespace {
|
||||
|
||||
const std::string kStatsServiceName = std::string(IStats::descriptor)
|
||||
|
|
@ -80,4 +80,4 @@ CompositionStatsAtomReporter::Create() {
|
|||
return std::make_unique<CompositionStatsReporterDesktop>();
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "hwc/HwcDisplay.h"
|
||||
#include "stats/CompositionStatsAtomReporter.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
CompositionStatsPoller::CompositionStatsPoller(
|
||||
std::unique_ptr<CompositionStatsAtomReporter> reporter,
|
||||
|
|
@ -63,4 +63,4 @@ void CompositionStatsPoller::PollFunc() {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <android-base/thread_annotations.h>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class CompositionStatsAtomReporter;
|
||||
|
||||
|
|
@ -53,4 +53,4 @@ class CompositionStatsPoller {
|
|||
std::unique_ptr<CompositionStatsAtomReporter> reporter_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ using ::testing::NiceMock;
|
|||
using ::testing::Return;
|
||||
using ::testing::StrictMock;
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
// Equality operator to be used by Eq, ASSERT_EQ, etc. Needs to be static rather
|
||||
// than in anonymous namespace to ensure gmock can find it.
|
||||
|
|
@ -301,4 +301,4 @@ TEST_F(CompositionStatsTrackerTest, ReportStatsDisplayRemoved) {
|
|||
tracker_->ReportStats(mock_callback.AsStdFunction());
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "utils/UEvent.h"
|
||||
|
||||
int main() {
|
||||
auto uevent = android::UEvent::CreateInstance();
|
||||
auto uevent = android::drm_hwcomposer::UEvent::CreateInstance();
|
||||
if (!uevent) {
|
||||
std::cout << "Can't initialize UEvent class\n";
|
||||
return -ENODEV;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#include "compositor/DisplayInfo.h"
|
||||
#include "drm/DrmUnique.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
// Stub wrapper class for edid parsing
|
||||
class EdidWrapper {
|
||||
|
|
@ -84,4 +84,4 @@ class LibdisplayEdidWrapper final : public EdidWrapper {
|
|||
};
|
||||
#endif
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "utils/EdidWrapper.h"
|
||||
#include "utils/log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto LibdisplayEdidWrapper::Create(DrmModePropertyBlobUnique blob)
|
||||
-> std::unique_ptr<LibdisplayEdidWrapper> {
|
||||
|
|
@ -110,5 +110,6 @@ auto LibdisplayEdidWrapper::GetBoundsMm() -> std::pair<int32_t, int32_t> {
|
|||
return {dtd->horiz_image_mm, dtd->vert_image_mm};
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "fd.h"
|
||||
#include "log.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
class UEvent {
|
||||
public:
|
||||
|
|
@ -143,4 +143,4 @@ class UEvent {
|
|||
UniqueFd stop_event_fd_;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "fd.h"
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
static void CloseFd(const int *fd) {
|
||||
if (fd != nullptr) {
|
||||
|
|
@ -49,4 +49,4 @@ auto DupFd(SharedFd const &fd) -> int {
|
|||
return fcntl(*fd, F_DUPFD_CLOEXEC, 0);
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
using UniqueFd = std::unique_ptr<int, void (*)(const int *)>;
|
||||
using SharedFd = std::shared_ptr<int>;
|
||||
|
|
@ -33,4 +33,4 @@ auto MakeSharedFd(int fd) -> SharedFd;
|
|||
|
||||
auto DupFd(SharedFd const &fd) -> int;
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ auto inline property_get_bool(const char *key, int8_t default_value) -> int8_t {
|
|||
} // namespace
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
/**
|
||||
* @brief Determine if the "Present Not Reliable" property is enabled.
|
||||
|
|
@ -144,4 +144,4 @@ auto Properties::GetDevicePath() -> std::string {
|
|||
return {path_pattern};
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace android {
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
enum class CtmHandling {
|
||||
kDrmOrGpu, /* Handled by DRM is possible, otherwise by GPU */
|
||||
|
|
@ -38,4 +38,4 @@ class Properties {
|
|||
static auto GetDevicePath() -> std::string;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue