Loading include/ftl/optional.h +8 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,14 @@ struct Optional final : std::optional<T> { if (has_value()) return std::invoke(std::forward<F>(f), std::move(value())); return R(); } // Delete new for this class. Its base doesn't have a virtual destructor, and // if it got deleted via base class pointer, it would cause undefined // behavior. There's not a good reason to allocate this object on the heap // anyway. static void* operator new(size_t) = delete; static void* operator new[](size_t) = delete; }; template <typename T, typename U> Loading libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -2330,6 +2330,9 @@ status_t SurfaceComposerClient::getDynamicDisplayInfo(const sp<IBinder>& display outMode.sfVsyncOffset = mode.sfVsyncOffset; outMode.presentationDeadline = mode.presentationDeadline; outMode.group = mode.group; std::transform(mode.supportedHdrTypes.begin(), mode.supportedHdrTypes.end(), std::back_inserter(outMode.supportedHdrTypes), [](const int32_t& value) { return static_cast<ui::Hdr>(value); }); outInfo->supportedDisplayModes.push_back(outMode); } Loading libs/gui/aidl/android/gui/DisplayMode.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ parcelable DisplayMode { Size resolution; float xDpi = 0.0f; float yDpi = 0.0f; int[] supportedHdrTypes; float refreshRate = 0.0f; long appVsyncOffset = 0; Loading libs/ui/include/ui/DisplayMode.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <cstdint> #include <type_traits> #include <ui/GraphicTypes.h> #include <ui/Size.h> #include <utils/Flattenable.h> #include <utils/Timers.h> Loading @@ -34,6 +35,7 @@ struct DisplayMode { ui::Size resolution; float xDpi = 0; float yDpi = 0; std::vector<ui::Hdr> supportedHdrTypes; float refreshRate = 0; nsecs_t appVsyncOffset = 0; Loading libs/ui/include/ui/GraphicTypes.h +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <aidl/android/hardware/graphics/common/ChromaSiting.h> #include <aidl/android/hardware/graphics/common/Compression.h> #include <aidl/android/hardware/graphics/common/Cta861_3.h> #include <aidl/android/hardware/graphics/common/Hdr.h> #include <aidl/android/hardware/graphics/common/Interlaced.h> #include <aidl/android/hardware/graphics/common/PlaneLayout.h> #include <aidl/android/hardware/graphics/common/Smpte2086.h> Loading @@ -42,7 +43,6 @@ namespace ui { using android::hardware::graphics::common::V1_1::RenderIntent; using android::hardware::graphics::common::V1_2::ColorMode; using android::hardware::graphics::common::V1_2::Dataspace; using android::hardware::graphics::common::V1_2::Hdr; using android::hardware::graphics::common::V1_2::PixelFormat; /** Loading @@ -50,6 +50,7 @@ using android::hardware::graphics::common::V1_2::PixelFormat; */ using aidl::android::hardware::graphics::common::BlendMode; using aidl::android::hardware::graphics::common::Cta861_3; using aidl::android::hardware::graphics::common::Hdr; using aidl::android::hardware::graphics::common::PlaneLayout; using aidl::android::hardware::graphics::common::Smpte2086; Loading Loading
include/ftl/optional.h +8 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,14 @@ struct Optional final : std::optional<T> { if (has_value()) return std::invoke(std::forward<F>(f), std::move(value())); return R(); } // Delete new for this class. Its base doesn't have a virtual destructor, and // if it got deleted via base class pointer, it would cause undefined // behavior. There's not a good reason to allocate this object on the heap // anyway. static void* operator new(size_t) = delete; static void* operator new[](size_t) = delete; }; template <typename T, typename U> Loading
libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -2330,6 +2330,9 @@ status_t SurfaceComposerClient::getDynamicDisplayInfo(const sp<IBinder>& display outMode.sfVsyncOffset = mode.sfVsyncOffset; outMode.presentationDeadline = mode.presentationDeadline; outMode.group = mode.group; std::transform(mode.supportedHdrTypes.begin(), mode.supportedHdrTypes.end(), std::back_inserter(outMode.supportedHdrTypes), [](const int32_t& value) { return static_cast<ui::Hdr>(value); }); outInfo->supportedDisplayModes.push_back(outMode); } Loading
libs/gui/aidl/android/gui/DisplayMode.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ parcelable DisplayMode { Size resolution; float xDpi = 0.0f; float yDpi = 0.0f; int[] supportedHdrTypes; float refreshRate = 0.0f; long appVsyncOffset = 0; Loading
libs/ui/include/ui/DisplayMode.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <cstdint> #include <type_traits> #include <ui/GraphicTypes.h> #include <ui/Size.h> #include <utils/Flattenable.h> #include <utils/Timers.h> Loading @@ -34,6 +35,7 @@ struct DisplayMode { ui::Size resolution; float xDpi = 0; float yDpi = 0; std::vector<ui::Hdr> supportedHdrTypes; float refreshRate = 0; nsecs_t appVsyncOffset = 0; Loading
libs/ui/include/ui/GraphicTypes.h +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <aidl/android/hardware/graphics/common/ChromaSiting.h> #include <aidl/android/hardware/graphics/common/Compression.h> #include <aidl/android/hardware/graphics/common/Cta861_3.h> #include <aidl/android/hardware/graphics/common/Hdr.h> #include <aidl/android/hardware/graphics/common/Interlaced.h> #include <aidl/android/hardware/graphics/common/PlaneLayout.h> #include <aidl/android/hardware/graphics/common/Smpte2086.h> Loading @@ -42,7 +43,6 @@ namespace ui { using android::hardware::graphics::common::V1_1::RenderIntent; using android::hardware::graphics::common::V1_2::ColorMode; using android::hardware::graphics::common::V1_2::Dataspace; using android::hardware::graphics::common::V1_2::Hdr; using android::hardware::graphics::common::V1_2::PixelFormat; /** Loading @@ -50,6 +50,7 @@ using android::hardware::graphics::common::V1_2::PixelFormat; */ using aidl::android::hardware::graphics::common::BlendMode; using aidl::android::hardware::graphics::common::Cta861_3; using aidl::android::hardware::graphics::common::Hdr; using aidl::android::hardware::graphics::common::PlaneLayout; using aidl::android::hardware::graphics::common::Smpte2086; Loading