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

Commit 32829c7a authored by Patrick Williams's avatar Patrick Williams Committed by Android (Google) Code Review
Browse files

Merge "Add getStalledTransactionInfo method to SurfaceComposer" into udc-qpr-dev

parents 1700661a b0b1d13e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ filegroup {
    name: "guiconstants_aidl",
    srcs: [
        "android/gui/DropInputMode.aidl",
        "android/gui/StalledTransactionInfo.aidl",
        "android/**/TouchOcclusionMode.aidl",
    ],
}
+7 −0
Original line number Diff line number Diff line
@@ -1302,6 +1302,13 @@ sp<IBinder> SurfaceComposerClient::getPhysicalDisplayToken(PhysicalDisplayId dis
    return status.isOk() ? display : nullptr;
}

std::optional<gui::StalledTransactionInfo> SurfaceComposerClient::getStalledTransactionInfo(
        pid_t pid) {
    std::optional<gui::StalledTransactionInfo> result;
    ComposerServiceAIDL::getComposerService()->getStalledTransactionInfo(pid, &result);
    return result;
}

void SurfaceComposerClient::Transaction::setAnimationTransaction() {
    mAnimation = true;
}
+7 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.gui.LayerDebugInfo;
import android.gui.OverlayProperties;
import android.gui.PullAtomData;
import android.gui.ARect;
import android.gui.StalledTransactionInfo;
import android.gui.StaticDisplayInfo;
import android.gui.WindowInfosListenerInfo;

@@ -507,4 +508,10 @@ interface ISurfaceComposer {
    void removeWindowInfosListener(IWindowInfosListener windowInfosListener);

    OverlayProperties getOverlaySupport();

    /**
     * Returns an instance of StalledTransaction if a transaction from the passed pid has not been
     * applied in SurfaceFlinger due to an unsignaled fence. Otherwise, null is returned.
     */
    @nullable StalledTransactionInfo getStalledTransactionInfo(int pid);
}
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.gui;

/** @hide */
parcelable StalledTransactionInfo {
    String layerName;
    long bufferId;
    long frameNumber;
}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ public:
    MOCK_METHOD(binder::Status, removeWindowInfosListener, (const sp<gui::IWindowInfosListener>&),
                (override));
    MOCK_METHOD(binder::Status, getOverlaySupport, (gui::OverlayProperties*), (override));
    MOCK_METHOD(binder::Status, getStalledTransactionInfo,
                (int32_t, std::optional<gui::StalledTransactionInfo>*), (override));
};

class FakeBnSurfaceComposerClient : public gui::BnSurfaceComposerClient {
Loading