Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc24a607 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4728508 from c9340b63 to pi-release

Change-Id: I33d386758038f217642d24947b4a0b6266e80512
parents 57101c30 c9340b63
Loading
Loading
Loading
Loading
+23 −8
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ static int otapreopt_chroot(const int argc, char **arg) {
        LOG(ERROR) << "Target slot suffix not legal: " << arg[2];
        exit(207);
    }
    {
      std::string vendor_partition = StringPrintf("/dev/block/bootdevice/by-name/vendor%s",
                                                  arg[2]);
      int vendor_result = mount(vendor_partition.c_str(),
@@ -122,6 +123,20 @@ static int otapreopt_chroot(const int argc, char **arg) {
                                MS_RDONLY,
                                /* data */ nullptr);
      UNUSED(vendor_result);
    }

    // Try to mount the product partition. update_engine doesn't do this for us, but we
    // want it for product APKs. Same notes as vendor above.
    {
      std::string product_partition = StringPrintf("/dev/block/bootdevice/by-name/product%s",
                                                   arg[2]);
      int product_result = mount(product_partition.c_str(),
                                 "/postinstall/product",
                                 "ext4",
                                 MS_RDONLY,
                                 /* data */ nullptr);
      UNUSED(product_result);
    }

    // Chdir into /postinstall.
    if (chdir("/postinstall") != 0) {
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ size_t HdrCapabilities::getFlattenedSize() const {
            sizeof(mMaxAverageLuminance) +
            sizeof(mMinLuminance) +
            sizeof(int32_t) +
            mSupportedHdrTypes.size() * sizeof(int32_t);
            mSupportedHdrTypes.size() * sizeof(ui::Hdr);
}

status_t HdrCapabilities::flatten(void* buffer, size_t size) const {
@@ -48,7 +48,7 @@ status_t HdrCapabilities::flatten(void* buffer, size_t size) const {
    reinterpret_cast<float&>(buf[2]) = mMinLuminance;
    buf[3] = static_cast<int32_t>(mSupportedHdrTypes.size());
    for (size_t i = 0, c = mSupportedHdrTypes.size(); i < c; ++i) {
        buf[4 + i] = mSupportedHdrTypes[i];
        buf[4 + i] = static_cast<int32_t>(mSupportedHdrTypes[i]);
    }
    return NO_ERROR;
}
@@ -78,7 +78,7 @@ status_t HdrCapabilities::unflatten(void const* buffer, size_t size) {
    if (itemCount) {
        mSupportedHdrTypes.resize(itemCount);
        for (size_t i = 0; i < itemCount; ++i) {
            mSupportedHdrTypes[i] = buf[4 + i];
            mSupportedHdrTypes[i] = static_cast<ui::Hdr>(buf[4 + i]);
        }
    }
    return NO_ERROR;
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
namespace android {
namespace ui {

using android::hardware::graphics::common::V1_0::Hdr;
using android::hardware::graphics::common::V1_1::ColorMode;
using android::hardware::graphics::common::V1_1::Dataspace;
using android::hardware::graphics::common::V1_1::PixelFormat;
+4 −3
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@

#include <vector>

#include <ui/GraphicTypes.h>
#include <utils/Flattenable.h>

namespace android {
@@ -28,7 +29,7 @@ namespace android {
class HdrCapabilities : public LightFlattenable<HdrCapabilities>
{
public:
    HdrCapabilities(const std::vector<int32_t /*android_hdr_t*/>& types,
    HdrCapabilities(const std::vector<ui::Hdr>& types,
            float maxLuminance, float maxAverageLuminance, float minLuminance)
      : mSupportedHdrTypes(types),
        mMaxLuminance(maxLuminance),
@@ -47,7 +48,7 @@ public:

    ~HdrCapabilities();

    const std::vector<int32_t /*android_hdr_t*/>& getSupportedHdrTypes() const {
    const std::vector<ui::Hdr>& getSupportedHdrTypes() const {
        return mSupportedHdrTypes;
    }
    float getDesiredMaxLuminance() const { return mMaxLuminance; }
@@ -61,7 +62,7 @@ public:
    status_t unflatten(void const* buffer, size_t size);

private:
    std::vector<int32_t /*android_hdr_t*/> mSupportedHdrTypes;
    std::vector<ui::Hdr> mSupportedHdrTypes;
    float mMaxLuminance;
    float mMaxAverageLuminance;
    float mMinLuminance;
+21 −1
Original line number Diff line number Diff line
@@ -515,7 +515,27 @@ Region BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime
        recomputeVisibleRegions = true;
    }

    setDataSpace(mConsumer->getCurrentDataSpace());
    // Dataspace::V0_SRGB and Dataspace::V0_SRGB_LINEAR are not legacy
    // data space, however since framework doesn't distinguish them out of
    // legacy SRGB, we have to treat them as the same for now.
    // UNKNOWN is treated as legacy SRGB when the connected api is EGL.
    ui::Dataspace dataSpace = mConsumer->getCurrentDataSpace();
    switch (dataSpace) {
        case ui::Dataspace::V0_SRGB:
            dataSpace = ui::Dataspace::SRGB;
            break;
        case ui::Dataspace::V0_SRGB_LINEAR:
            dataSpace = ui::Dataspace::SRGB_LINEAR;
            break;
        case ui::Dataspace::UNKNOWN:
            if (mConsumer->getCurrentApi() == NATIVE_WINDOW_API_EGL) {
                dataSpace = ui::Dataspace::SRGB;
            }
            break;
        default:
            break;
    }
    setDataSpace(dataSpace);

    Rect crop(mConsumer->getCurrentCrop());
    const uint32_t transform(mConsumer->getCurrentTransform());
Loading