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

Commit 52b943e8 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android Git Automerger
Browse files

am 44ade05f: am ea26c777: Camera3: Skip no-op stream configurations.

* commit '44ade05f':
  Camera3: Skip no-op stream configurations.
parents 31295e78 44ade05f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ status_t Camera3Device::initialize(camera_module_t *module)
    mHal3Device = device;
    mStatus = STATUS_IDLE;
    mNextStreamId = 0;
    mNeedConfig = true;

    return OK;
}
@@ -587,6 +588,7 @@ status_t Camera3Device::createStream(sp<ANativeWindow> consumer,
    }

    *id = mNextStreamId++;
    mNeedConfig = true;

    // Continue captures if active at start
    if (wasActive) {
@@ -712,6 +714,7 @@ status_t Camera3Device::deleteStream(int id) {
        // fall through since we want to still list the stream as deleted.
    }
    mDeletedStreams.add(deletedStream);
    mNeedConfig = true;

    return res;
}
@@ -1014,6 +1017,11 @@ status_t Camera3Device::configureStreamsLocked() {
        return INVALID_OPERATION;
    }

    if (!mNeedConfig) {
        ALOGV("%s: Skipping config, no stream changes", __FUNCTION__);
        return OK;
    }

    // Start configuring the streams

    camera3_stream_configuration config;
@@ -1099,6 +1107,7 @@ status_t Camera3Device::configureStreamsLocked() {
    // Finish configuring the streams lazily on first reference

    mStatus = STATUS_ACTIVE;
    mNeedConfig = false;

    return OK;
}
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ class Camera3Device :
    StreamSet                  mOutputStreams;
    sp<camera3::Camera3Stream> mInputStream;
    int                        mNextStreamId;
    bool                       mNeedConfig;

    // Need to hold on to stream references until configure completes.
    Vector<sp<camera3::Camera3StreamInterface> > mDeletedStreams;