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

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

Merge "Add getStalledTransactionInfo method to SurfaceComposer" into main

parents 18f8c58c 090ad06d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@ filegroup {
    name: "guiconstants_aidl",
    name: "guiconstants_aidl",
    srcs: [
    srcs: [
        "android/gui/DropInputMode.aidl",
        "android/gui/DropInputMode.aidl",
        "android/gui/StalledTransactionInfo.aidl",
        "android/**/TouchOcclusionMode.aidl",
        "android/**/TouchOcclusionMode.aidl",
    ],
    ],
}
}
@@ -140,6 +141,7 @@ aidl_library {
        "android/gui/IWindowInfosListener.aidl",
        "android/gui/IWindowInfosListener.aidl",
        "android/gui/IWindowInfosPublisher.aidl",
        "android/gui/IWindowInfosPublisher.aidl",
        "android/gui/IWindowInfosReportedListener.aidl",
        "android/gui/IWindowInfosReportedListener.aidl",
        "android/gui/StalledTransactionInfo.aidl",
        "android/gui/WindowInfo.aidl",
        "android/gui/WindowInfo.aidl",
        "android/gui/WindowInfosUpdate.aidl",
        "android/gui/WindowInfosUpdate.aidl",
    ],
    ],
+7 −0
Original line number Original line Diff line number Diff line
@@ -1308,6 +1308,13 @@ sp<IBinder> SurfaceComposerClient::getPhysicalDisplayToken(PhysicalDisplayId dis
    return status.isOk() ? display : nullptr;
    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() {
void SurfaceComposerClient::Transaction::setAnimationTransaction() {
    mAnimation = true;
    mAnimation = true;
}
}
+7 −0
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@ import android.gui.LayerDebugInfo;
import android.gui.OverlayProperties;
import android.gui.OverlayProperties;
import android.gui.PullAtomData;
import android.gui.PullAtomData;
import android.gui.ARect;
import android.gui.ARect;
import android.gui.StalledTransactionInfo;
import android.gui.StaticDisplayInfo;
import android.gui.StaticDisplayInfo;
import android.gui.WindowInfosListenerInfo;
import android.gui.WindowInfosListenerInfo;


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


    OverlayProperties getOverlaySupport();
    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 Original line 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 Original line Diff line number Diff line
@@ -158,6 +158,8 @@ public:
    MOCK_METHOD(binder::Status, removeWindowInfosListener, (const sp<gui::IWindowInfosListener>&),
    MOCK_METHOD(binder::Status, removeWindowInfosListener, (const sp<gui::IWindowInfosListener>&),
                (override));
                (override));
    MOCK_METHOD(binder::Status, getOverlaySupport, (gui::OverlayProperties*), (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 {
class FakeBnSurfaceComposerClient : public gui::BnSurfaceComposerClient {
Loading