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

Commit 9e9cc4bf authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4481641 from a391ebe9 to pi-release

Change-Id: I4c1a42d6c365e83ed50a7083a9dbeef38b1919d0
parents 7ef18b1e a391ebe9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1085,7 +1085,7 @@ static void RunDumpsysNormal() {
                   CommandOptions::WithTimeout(90).DropRoot().Build());
    } else {
        RunDumpsys("DUMPSYS", {"--skip", "meminfo", "cpuinfo"},
                   CommandOptions::WithTimeout(90).Build(), 10);
                   CommandOptions::WithTimeout(90).Build(), SEC_TO_MSEC(10));
    }
}

@@ -1307,8 +1307,10 @@ static void DumpstateTelephonyOnly() {
    printf("== Android Framework Services\n");
    printf("========================================================\n");

    RunDumpsys("DUMPSYS", {"connectivity"}, CommandOptions::WithTimeout(90).Build(), 10);
    RunDumpsys("DUMPSYS", {"carrier_config"}, CommandOptions::WithTimeout(90).Build(), 10);
    RunDumpsys("DUMPSYS", {"connectivity"}, CommandOptions::WithTimeout(90).Build(),
               SEC_TO_MSEC(10));
    RunDumpsys("DUMPSYS", {"carrier_config"}, CommandOptions::WithTimeout(90).Build(),
               SEC_TO_MSEC(10));

    printf("========================================================\n");
    printf("== Running Application Services\n");
+8 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ cc_defaults {
        "dexopt.cpp",
        "globals.cpp",
        "utils.cpp",
        "binder/android/os/IInstalld.aidl",
        ":installd_aidl",
    ],
    shared_libs: [
        "libbase",
@@ -85,4 +85,11 @@ cc_binary {
    ],
}

filegroup {
    name: "installd_aidl",
    srcs: [
        "binder/android/os/IInstalld.aidl",
    ],
}

subdirs = ["tests"]
+9 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ cc_library {
        "TextOutput.cpp",
        "IpPrefix.cpp",
        "Value.cpp",
        "aidl/android/content/pm/IPackageManagerNative.aidl",
        ":libbinder_aidl",
    ],

    aidl: {
@@ -108,4 +108,12 @@ cc_library {
    },
}

// AIDL interface between libbinder and framework.jar
filegroup {
    name: "libbinder_aidl",
    srcs: [
        "aidl/android/content/pm/IPackageManagerNative.aidl",
    ],
}

subdirs = ["tests"]
+24 −21
Original line number Diff line number Diff line
@@ -109,13 +109,14 @@ void BufferLayer::useEmptyDamage() {
}

bool BufferLayer::isProtected() const {
    const sp<GraphicBuffer>& activeBuffer(mActiveBuffer);
    return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED);
    const sp<GraphicBuffer>& buffer(getBE().mBuffer);
    return (buffer != 0) &&
            (buffer->getUsage() & GRALLOC_USAGE_PROTECTED);
}

bool BufferLayer::isVisible() const {
    return !(isHiddenByPolicy()) && getAlpha() > 0.0f &&
            (mActiveBuffer != NULL || getBE().mSidebandStream != NULL);
            (getBE().mBuffer != NULL || getBE().mSidebandStream != NULL);
}

bool BufferLayer::isFixedSize() const {
@@ -171,7 +172,7 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip,
                         bool useIdentityTransform) const {
    ATRACE_CALL();

    if (CC_UNLIKELY(mActiveBuffer == 0)) {
    if (CC_UNLIKELY(getBE().mBuffer == 0)) {
        // the texture has not been created yet, this Layer has
        // in fact never been drawn into. This happens frequently with
        // SurfaceView because the WindowManager can't know when the client
@@ -249,8 +250,8 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip,
        }

        // Set things up for texturing.
        mTexture.setDimensions(mActiveBuffer->getWidth(),
                               mActiveBuffer->getHeight());
        mTexture.setDimensions(getBE().mBuffer->getWidth(),
                               getBE().mBuffer->getHeight());
        mTexture.setFiltering(useFiltering);
        mTexture.setMatrix(textureMatrix);

@@ -421,7 +422,7 @@ Region BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime
    // Capture the old state of the layer for comparisons later
    const State& s(getDrawingState());
    const bool oldOpacity = isOpaque(s);
    sp<GraphicBuffer> oldActiveBuffer = mActiveBuffer;
    sp<GraphicBuffer> oldBuffer = getBE().mBuffer;

    if (!allTransactionsSignaled()) {
        mFlinger->signalLayerUpdate();
@@ -498,9 +499,11 @@ Region BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime
    }

    // update the active buffer
    mActiveBuffer =
            mSurfaceFlingerConsumer->getCurrentBuffer(&mActiveBufferSlot);
    if (mActiveBuffer == NULL) {
    getBE().mBuffer =
            mSurfaceFlingerConsumer->getCurrentBuffer(&getBE().mBufferSlot);
    // replicated in LayerBE until FE/BE is ready to be synchronized
    mActiveBuffer = getBE().mBuffer;
    if (getBE().mBuffer == NULL) {
        // this can only happen if the very first buffer was rejected.
        return outDirtyRegion;
    }
@@ -516,7 +519,7 @@ Region BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime

    mRefreshPending = true;
    mFrameLatencyNeeded = true;
    if (oldActiveBuffer == NULL) {
    if (oldBuffer == NULL) {
        // the first time we receive a buffer, we need to trigger a
        // geometry invalidation.
        recomputeVisibleRegions = true;
@@ -536,16 +539,16 @@ Region BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime
        recomputeVisibleRegions = true;
    }

    if (oldActiveBuffer != NULL) {
        uint32_t bufWidth = mActiveBuffer->getWidth();
        uint32_t bufHeight = mActiveBuffer->getHeight();
        if (bufWidth != uint32_t(oldActiveBuffer->width) ||
            bufHeight != uint32_t(oldActiveBuffer->height)) {
    if (oldBuffer != NULL) {
        uint32_t bufWidth = getBE().mBuffer->getWidth();
        uint32_t bufHeight = getBE().mBuffer->getHeight();
        if (bufWidth != uint32_t(oldBuffer->width) ||
            bufHeight != uint32_t(oldBuffer->height)) {
            recomputeVisibleRegions = true;
        }
    }

    mCurrentOpacity = getOpacityForFormat(mActiveBuffer->format);
    mCurrentOpacity = getOpacityForFormat(getBE().mBuffer->format);
    if (oldOpacity != isOpaque(s)) {
        recomputeVisibleRegions = true;
    }
@@ -638,14 +641,14 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& displayDevice)

    uint32_t hwcSlot = 0;
    sp<GraphicBuffer> hwcBuffer;
    hwcInfo.bufferCache.getHwcBuffer(mActiveBufferSlot,
                                     mActiveBuffer, &hwcSlot, &hwcBuffer);
    hwcInfo.bufferCache.getHwcBuffer(getBE().mBufferSlot,
                                     getBE().mBuffer, &hwcSlot, &hwcBuffer);

    auto acquireFence = mSurfaceFlingerConsumer->getCurrentFence();
    error = hwcLayer->setBuffer(hwcSlot, hwcBuffer, acquireFence);
    if (error != HWC2::Error::None) {
        ALOGE("[%s] Failed to set buffer %p: %s (%d)", mName.string(),
              mActiveBuffer->handle, to_string(error).c_str(),
              getBE().mBuffer->handle, to_string(error).c_str(),
              static_cast<int32_t>(error));
    }
}
@@ -653,7 +656,7 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& displayDevice)
bool BufferLayer::isOpaque(const Layer::State& s) const {
    // if we don't have a buffer or sidebandStream yet, we're translucent regardless of the
    // layer's opaque flag.
    if ((getBE().mSidebandStream == nullptr) && (mActiveBuffer == nullptr)) {
    if ((getBE().mSidebandStream == nullptr) && (getBE().mBuffer == nullptr)) {
        return false;
    }

+20 −18
Original line number Diff line number Diff line
@@ -63,7 +63,9 @@
namespace android {

LayerBE::LayerBE()
      : mMesh(Mesh::TRIANGLE_FAN, 4, 2, 2) {
      : mBufferSlot(BufferQueue::INVALID_BUFFER_SLOT),
        mBuffer(nullptr),
        mMesh(Mesh::TRIANGLE_FAN, 4, 2, 2) {
}


@@ -255,9 +257,9 @@ Rect Layer::getContentCrop() const {
    if (!mCurrentCrop.isEmpty()) {
        // if the buffer crop is defined, we use that
        crop = mCurrentCrop;
    } else if (mActiveBuffer != NULL) {
    } else if (getBE().mBuffer != NULL) {
        // otherwise we use the whole buffer
        crop = mActiveBuffer->getBounds();
        crop = getBE().mBuffer->getBounds();
    } else {
        // if we don't have a buffer yet, we use an empty/invalid crop
        crop.makeInvalid();
@@ -1000,7 +1002,7 @@ uint32_t Layer::doTransaction(uint32_t flags) {
    // to the old buffer. However in the state where we don't have an old buffer
    // there is no such concern but we may still be being used as a parent layer.
    const bool resizePending = ((c.requested.w != c.active.w) || (c.requested.h != c.active.h)) &&
            (mActiveBuffer != nullptr);
            (getBE().mBuffer != nullptr);
    if (!isFixedSize()) {
        if (resizePending && getBE().mSidebandStream == NULL) {
            flags |= eDontUpdateGeometryState;
@@ -1399,12 +1401,12 @@ LayerDebugInfo Layer::getLayerDebugInfo() const {
    info.mMatrix[1][0] = ds.active.transform[1][0];
    info.mMatrix[1][1] = ds.active.transform[1][1];
    {
        sp<const GraphicBuffer> activeBuffer = getActiveBuffer();
        if (activeBuffer != 0) {
            info.mActiveBufferWidth = activeBuffer->getWidth();
            info.mActiveBufferHeight = activeBuffer->getHeight();
            info.mActiveBufferStride = activeBuffer->getStride();
            info.mActiveBufferFormat = activeBuffer->format;
        sp<const GraphicBuffer> buffer = getBE().mBuffer;
        if (buffer != 0) {
            info.mActiveBufferWidth = buffer->getWidth();
            info.mActiveBufferHeight = buffer->getHeight();
            info.mActiveBufferStride = buffer->getStride();
            info.mActiveBufferFormat = buffer->format;
        } else {
            info.mActiveBufferWidth = 0;
            info.mActiveBufferHeight = 0;
@@ -1718,15 +1720,15 @@ Transform Layer::getTransform() const {
        // for in the transform. We need to mirror this scaling in child surfaces
        // or we will break the contract where WM can treat child surfaces as
        // pixels in the parent surface.
        if (p->isFixedSize() && p->mActiveBuffer != nullptr) {
        if (p->isFixedSize() && p->getBE().mBuffer != nullptr) {
            int bufferWidth;
            int bufferHeight;
            if ((p->mCurrentTransform & NATIVE_WINDOW_TRANSFORM_ROT_90) == 0) {
                bufferWidth = p->mActiveBuffer->getWidth();
                bufferHeight = p->mActiveBuffer->getHeight();
                bufferWidth = p->getBE().mBuffer->getWidth();
                bufferHeight = p->getBE().mBuffer->getHeight();
            } else {
                bufferHeight = p->mActiveBuffer->getWidth();
                bufferWidth = p->mActiveBuffer->getHeight();
                bufferHeight = p->getBE().mBuffer->getWidth();
                bufferWidth = p->getBE().mBuffer->getHeight();
            }
            float sx = p->getDrawingState().active.w / static_cast<float>(bufferWidth);
            float sy = p->getDrawingState().active.h / static_cast<float>(bufferHeight);
@@ -1826,9 +1828,9 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet)
        layerInfo->set_z_order_relative_of(zOrderRelativeOf->sequence);
    }

    auto activeBuffer = getActiveBuffer();
    if (activeBuffer != nullptr) {
        LayerProtoHelper::writeToProto(activeBuffer, layerInfo->mutable_active_buffer());
    auto buffer = getBE().mBuffer;
    if (buffer != nullptr) {
        LayerProtoHelper::writeToProto(buffer, layerInfo->mutable_active_buffer());
    }

    layerInfo->set_queued_frames(getQueuedFrameCount());
Loading