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

Commit 5655702c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5342135 from cc26306f to qt-release

Change-Id: Iab921af75346aea9b5bba6264ab917f0b4a18379
parents da7676b8 cc26306f
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <binder/IResultReceiver.h>
#include <binder/Parcel.h>
#include <binder/PermissionCache.h>
#include <cutils/properties.h>
#include <private/android_filesystem_config.h>
#include <utils/String8.h>
#include <utils/Trace.h>
@@ -38,6 +39,7 @@ using base::StringAppendF;
namespace {
status_t cmdHelp(int out);
status_t cmdVkjson(int out, int err);
void dumpGameDriverInfo(std::string* result);
} // namespace

const String16 sDump("android.permission.DUMP");
@@ -96,7 +98,11 @@ status_t GpuService::doDump(int fd, const Vector<String16>& args, bool /*asProto
        }

        if (dumpAll) {
            dumpGameDriverInfo(&result);
            result.append("\n");

            mGpuStats->dump(Vector<String16>(), &result);
            result.append("\n");
        }
    }

@@ -137,6 +143,18 @@ status_t cmdVkjson(int out, int /*err*/) {
    return NO_ERROR;
}

void dumpGameDriverInfo(std::string* result) {
    if (!result) return;

    char stableGameDriver[PROPERTY_VALUE_MAX] = {};
    property_get("ro.gfx.driver.0", stableGameDriver, "unsupported");
    StringAppendF(result, "Stable Game Driver: %s\n", stableGameDriver);

    char preReleaseGameDriver[PROPERTY_VALUE_MAX] = {};
    property_get("ro.gfx.driver.1", preReleaseGameDriver, "unsupported");
    StringAppendF(result, "Pre-release Game Driver: %s\n", preReleaseGameDriver);
}

} // anonymous namespace

} // namespace android
+5 −2
Original line number Diff line number Diff line
@@ -125,9 +125,11 @@ static constexpr mat4 inverseOrientation(uint32_t transform) {

bool BufferLayer::prepareClientLayer(const RenderArea& renderArea, const Region& clip,
                                     bool useIdentityTransform, Region& clearRegion,
                                     const bool supportProtectedContent,
                                     renderengine::LayerSettings& layer) {
    ATRACE_CALL();
    Layer::prepareClientLayer(renderArea, clip, useIdentityTransform, clearRegion, layer);
    Layer::prepareClientLayer(renderArea, clip, useIdentityTransform, clearRegion,
                              supportProtectedContent, layer);
    if (CC_UNLIKELY(mActiveBuffer == 0)) {
        // the texture has not been created yet, this Layer has
        // in fact never been drawn into. This happens frequently with
@@ -154,7 +156,8 @@ bool BufferLayer::prepareClientLayer(const RenderArea& renderArea, const Region&
        }
        return false;
    }
    bool blackOutLayer = isProtected() || (isSecure() && !renderArea.isSecure());
    bool blackOutLayer =
            (isProtected() && !supportProtectedContent) || (isSecure() && !renderArea.isSecure());
    const State& s(getDrawingState());
    if (!blackOutLayer) {
        layer.source.buffer.buffer = mActiveBuffer;
+2 −1
Original line number Diff line number Diff line
@@ -168,7 +168,8 @@ protected:
    // prepareClientLayer - constructs a RenderEngine layer for GPU composition.
    bool prepareClientLayer(const RenderArea& renderArea, const Region& clip,
                            bool useIdentityTransform, Region& clearRegion,
                            renderengine::LayerSettings& layer);
                            const bool supportProtectedContent,
                            renderengine::LayerSettings& layer) override;

private:
    // Returns true if this layer requires filtering
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ void BufferQueueLayer::setHwcLayerBuffer(const sp<const DisplayDevice>& display)
    uint32_t hwcSlot = 0;
    sp<GraphicBuffer> hwcBuffer;
    (*outputLayer->editState().hwc)
            .hwcBufferCache.getHwcBuffer(mActiveBufferSlot, mActiveBuffer, &hwcSlot, &hwcBuffer);
            .hwcBufferCache.getHwcBuffer(mActiveBuffer, &hwcSlot, &hwcBuffer);

    auto acquireFence = mConsumer->getCurrentFence();
    auto error = hwcLayer->setBuffer(hwcSlot, hwcBuffer, acquireFence);
+6 −3
Original line number Diff line number Diff line
@@ -565,14 +565,17 @@ status_t BufferStateLayer::updateFrameNumber(nsecs_t /*latchTime*/) {
void BufferStateLayer::setHwcLayerBuffer(const sp<const DisplayDevice>& display) {
    const auto outputLayer = findOutputLayerForDisplay(display);
    LOG_FATAL_IF(!outputLayer || !outputLayer->getState().hwc);
    auto& hwcLayer = (*outputLayer->getState().hwc).hwcLayer;
    auto& hwcInfo = *outputLayer->editState().hwc;
    auto& hwcLayer = hwcInfo.hwcLayer;

    const State& s(getDrawingState());

    // TODO(marissaw): support more than one slot
    // obtain slot
    uint32_t hwcSlot = 0;
    sp<GraphicBuffer> buffer;
    hwcInfo.hwcBufferCache.getHwcBuffer(s.buffer, &hwcSlot, &buffer);

    auto error = hwcLayer->setBuffer(hwcSlot, s.buffer, s.acquireFence);
    auto error = hwcLayer->setBuffer(hwcSlot, buffer, s.acquireFence);
    if (error != HWC2::Error::None) {
        ALOGE("[%s] Failed to set buffer %p: %s (%d)", mName.string(),
              s.buffer->handle, to_string(error).c_str(), static_cast<int32_t>(error));
Loading