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

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

Snap for 6596975 from dbc3025d to rvc-release

Change-Id: I2c107c278ddd240b0dc37ba46e4ff1cce52eb032
parents 3ff7db59 dbc3025d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -2017,8 +2017,9 @@ bool SurfaceFlinger::handleMessageTransaction() {


    bool flushedATransaction = flushTransactionQueues();
    bool flushedATransaction = flushTransactionQueues();


    bool runHandleTransaction = transactionFlags &&
    bool runHandleTransaction =
            ((transactionFlags != eTransactionFlushNeeded) || flushedATransaction);
            (transactionFlags && (transactionFlags != eTransactionFlushNeeded)) ||
            flushedATransaction;


    if (runHandleTransaction) {
    if (runHandleTransaction) {
        handleTransaction(eTransactionMask);
        handleTransaction(eTransactionMask);
+3 −1
Original line number Original line Diff line number Diff line
@@ -87,7 +87,9 @@ std::string TimeStatsHelper::TimeStatsLayer::toString() const {
    StringAppendF(&result, "badDesiredPresentFrames = %d\n", badDesiredPresentFrames);
    StringAppendF(&result, "badDesiredPresentFrames = %d\n", badDesiredPresentFrames);
    const auto iter = deltas.find("present2present");
    const auto iter = deltas.find("present2present");
    if (iter != deltas.end()) {
    if (iter != deltas.end()) {
        StringAppendF(&result, "averageFPS = %.3f\n", 1000.0 / iter->second.averageTime());
        const float averageTime = iter->second.averageTime();
        const float averageFPS = averageTime < 1.0f ? 0.0f : 1000.0f / averageTime;
        StringAppendF(&result, "averageFPS = %.3f\n", averageFPS);
    }
    }
    for (const auto& ele : deltas) {
    for (const auto& ele : deltas) {
        StringAppendF(&result, "%s histogram is as below:\n", ele.first.c_str());
        StringAppendF(&result, "%s histogram is as below:\n", ele.first.c_str());
+9 −0
Original line number Original line Diff line number Diff line
@@ -833,6 +833,15 @@ TEST_F(TimeStatsTest, canDumpWithInvalidMaxLayers) {
    ASSERT_EQ(0, globalProto.stats_size());
    ASSERT_EQ(0, globalProto.stats_size());
}
}


TEST_F(TimeStatsTest, noInfInAverageFPS) {
    EXPECT_TRUE(inputCommand(InputCommand::ENABLE, FMT_STRING).empty());
    insertTimeRecord(NORMAL_SEQUENCE, LAYER_ID_0, 1, 1000000);
    insertTimeRecord(NORMAL_SEQUENCE, LAYER_ID_0, 2, 1000000);

    const std::string result(inputCommand(InputCommand::DUMP_ALL, FMT_STRING));
    EXPECT_THAT(result, HasSubstr("averageFPS = 0.000"));
}

namespace {
namespace {
std::string buildExpectedHistogramBytestring(const std::vector<int32_t>& times,
std::string buildExpectedHistogramBytestring(const std::vector<int32_t>& times,
                                             const std::vector<int32_t>& frameCounts) {
                                             const std::vector<int32_t>& frameCounts) {