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

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

Snap for 4710485 from ab2e344e to pi-release

Change-Id: Id05eeda7645fed31b456826912d02140af3ebd79
parents ba6c79f3 ab2e344e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1276,7 +1276,7 @@ status_t Parcel::write(const FlattenableHelperInterface& val)
    if (err) return err;

    // payload
    void* const buf = this->writeInplace(pad_size(len));
    void* const buf = this->writeInplace(len);
    if (buf == NULL)
        return BAD_VALUE;

+4 −1
Original line number Diff line number Diff line
@@ -113,7 +113,10 @@ int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transfo
    constexpr int32_t kAllTransformBits =
            ANATIVEWINDOW_TRANSFORM_MIRROR_HORIZONTAL |
            ANATIVEWINDOW_TRANSFORM_MIRROR_VERTICAL |
            ANATIVEWINDOW_TRANSFORM_ROTATE_90;
            ANATIVEWINDOW_TRANSFORM_ROTATE_90 |
            // We don't expose INVERSE_DISPLAY as an NDK constant, but someone could have read it
            // from a buffer already set by Camera framework, so we allow it to be forwarded.
            NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
    if (!window || !query(window, NATIVE_WINDOW_IS_VALID))
        return -EINVAL;
    if ((transform & ~kAllTransformBits) != 0)
+5 −0
Original line number Diff line number Diff line
@@ -838,6 +838,11 @@ Region::const_iterator Region::begin() const {
}

Region::const_iterator Region::end() const {
    // Workaround for b/77643177
    // mStorage should never be empty, but somehow it is and it's causing
    // an abort in ubsan
    if (mStorage.isEmpty()) return mStorage.array();

    size_t numRects = isRect() ? 1 : mStorage.size() - 1;
    return mStorage.array() + numRects;
}
+12 −2
Original line number Diff line number Diff line
@@ -102,10 +102,20 @@ int DisplayEventReceiver::AttachedEvent::handleEvent(int fd, int events, void* /

            switch(buf[i].header.type) {
                case FwkReceiver::DISPLAY_EVENT_VSYNC: {
                    mCallback->onVsync(timestamp, event.vsync.count);
                    auto ret = mCallback->onVsync(timestamp, event.vsync.count);
                    if (!ret.isOk()) {
                        LOG(ERROR) << "AttachedEvent handleEvent fails on onVsync callback"
                                   << " because of " << ret.description();
                        return 0;  // remove the callback
                    }
                } break;
                case FwkReceiver::DISPLAY_EVENT_HOTPLUG: {
                    mCallback->onHotplug(timestamp, event.hotplug.connected);
                    auto ret = mCallback->onHotplug(timestamp, event.hotplug.connected);
                    if (!ret.isOk()) {
                        LOG(ERROR) << "AttachedEvent handleEvent fails on onHotplug callback"
                                   << " because of " << ret.description();
                        return 0;  // remove the callback
                    }
                } break;
                default: {
                    LOG(ERROR) << "AttachedEvent handleEvent unknown type: " << type;
+3 −3
Original line number Diff line number Diff line
@@ -44,13 +44,13 @@ ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const

void ColorLayer::onDraw(const RenderArea& renderArea, const Region& /* clip */,
                        bool useIdentityTransform) const {
    const State& s(getDrawingState());
    if (s.color.a > 0) {
    half4 color = getColor();
    if (color.a > 0) {
        Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2);
        computeGeometry(renderArea, mesh, useIdentityTransform);
        auto& engine(mFlinger->getRenderEngine());
        engine.setupLayerBlending(getPremultipledAlpha(), false /* opaque */,
                                  true /* disableTexture */, s.color);
                                  true /* disableTexture */, color);
        engine.drawMesh(mesh);
        engine.disableBlending();
    }
Loading