mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge changes I8a7ff4b0,Id121ecd4,I23375d73
am: 944e640e16
Change-Id: I96d522e9f8ab3c0e35761c4bcc1d63d150195ced
This commit is contained in:
@@ -1389,7 +1389,7 @@ static std::string rectString(hwc_rect_t rect) {
|
||||
}
|
||||
|
||||
static std::string approximateFloatString(float f) {
|
||||
if (static_cast<int32_t>(f) == f) {
|
||||
if (static_cast<float>(static_cast<int32_t>(f)) == f) {
|
||||
return std::to_string(static_cast<int32_t>(f));
|
||||
}
|
||||
int32_t truncated = static_cast<int32_t>(f * 10);
|
||||
@@ -1680,10 +1680,10 @@ std::string HWC2On1Adapter::Display::Config::toString(bool splitLine) const {
|
||||
if (mAttributes.count(HWC2::Attribute::DpiX) != 0 &&
|
||||
mAttributes.at(HWC2::Attribute::DpiX) != -1) {
|
||||
std::memset(buffer, 0, BUFFER_SIZE);
|
||||
writtenBytes = snprintf(buffer, BUFFER_SIZE,
|
||||
", DPI: %.1f x %.1f",
|
||||
mAttributes.at(HWC2::Attribute::DpiX) / 1000.0f,
|
||||
mAttributes.at(HWC2::Attribute::DpiY) / 1000.0f);
|
||||
writtenBytes =
|
||||
snprintf(buffer, BUFFER_SIZE, ", DPI: %.1f x %.1f",
|
||||
static_cast<float>(mAttributes.at(HWC2::Attribute::DpiX)) / 1000.0f,
|
||||
static_cast<float>(mAttributes.at(HWC2::Attribute::DpiY)) / 1000.0f);
|
||||
output.append(buffer, writtenBytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) {
|
||||
typedef ::android::hardware::sensors::V1_0::MetaDataEventType MetaDataEventType;
|
||||
|
||||
*dst = {
|
||||
.sensorHandle = src.sensor,
|
||||
.sensorType = (SensorType)src.type,
|
||||
.timestamp = src.timestamp
|
||||
.timestamp = src.timestamp,
|
||||
.sensorHandle = src.sensor,
|
||||
.sensorType = (SensorType)src.type,
|
||||
};
|
||||
|
||||
switch (dst->sensorType) {
|
||||
|
||||
@@ -147,8 +147,8 @@ BufferDescriptor GrallocHalWrapper<AllocatorT, MapperT>::getDescriptor(uint32_t
|
||||
.width = size,
|
||||
.height = 1,
|
||||
.layerCount = 1,
|
||||
.usage = kBufferUsage,
|
||||
.format = static_cast<decltype(descriptorInfo.format)>(PixelFormat::BLOB),
|
||||
.usage = kBufferUsage,
|
||||
};
|
||||
|
||||
BufferDescriptor descriptor;
|
||||
|
||||
Reference in New Issue
Block a user