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

Commit c7ec5485 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9662639 from 854b864e to udc-release

Change-Id: Icc87c9e4ec73b741b72addb2af8ed8e4a3196fe4
parents babeaa82 854b864e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,8 +15,10 @@
 */

// #define LOG_NDEBUG 0
#define ATRACE_TAG ATRACE_TAG_GRAPHICS

#include <gui/Choreographer.h>
#include <gui/TraceUtils.h>
#include <jni.h>

#undef LOG_TAG
@@ -297,6 +299,8 @@ void Choreographer::dispatchVsync(nsecs_t timestamp, PhysicalDisplayId, uint32_t
    mLastVsyncEventData = vsyncEventData;
    for (const auto& cb : callbacks) {
        if (cb.vsyncCallback != nullptr) {
            ATRACE_FORMAT("AChoreographer_vsyncCallback %" PRId64,
                          vsyncEventData.preferredVsyncId());
            const ChoreographerFrameCallbackDataImpl frameCallbackData =
                    createFrameCallbackData(timestamp);
            registerStartTime();
@@ -306,8 +310,10 @@ void Choreographer::dispatchVsync(nsecs_t timestamp, PhysicalDisplayId, uint32_t
                             cb.data);
            mInCallback = false;
        } else if (cb.callback64 != nullptr) {
            ATRACE_FORMAT("AChoreographer_frameCallback64");
            cb.callback64(timestamp, cb.data);
        } else if (cb.callback != nullptr) {
            ATRACE_FORMAT("AChoreographer_frameCallback");
            cb.callback(timestamp, cb.data);
        }
    }
+15 −6
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ layer_state_t::layer_state_t()
        surfaceDamageRegion(),
        api(-1),
        colorTransform(mat4()),
        bgColorAlpha(0),
        bgColor(0),
        bgColorDataspace(ui::Dataspace::UNKNOWN),
        colorSpaceAgnostic(false),
        shadowRadius(0.0f),
@@ -140,7 +140,10 @@ status_t layer_state_t::write(Parcel& output) const
    SAFE_PARCEL(output.writeFloat, cornerRadius);
    SAFE_PARCEL(output.writeUint32, backgroundBlurRadius);
    SAFE_PARCEL(output.writeParcelable, metadata);
    SAFE_PARCEL(output.writeFloat, bgColorAlpha);
    SAFE_PARCEL(output.writeFloat, bgColor.r);
    SAFE_PARCEL(output.writeFloat, bgColor.g);
    SAFE_PARCEL(output.writeFloat, bgColor.b);
    SAFE_PARCEL(output.writeFloat, bgColor.a);
    SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(bgColorDataspace));
    SAFE_PARCEL(output.writeBool, colorSpaceAgnostic);
    SAFE_PARCEL(output.writeVectorSize, listeners);
@@ -259,7 +262,14 @@ status_t layer_state_t::read(const Parcel& input)
    SAFE_PARCEL(input.readUint32, &backgroundBlurRadius);
    SAFE_PARCEL(input.readParcelable, &metadata);

    SAFE_PARCEL(input.readFloat, &bgColorAlpha);
    SAFE_PARCEL(input.readFloat, &tmpFloat);
    bgColor.r = tmpFloat;
    SAFE_PARCEL(input.readFloat, &tmpFloat);
    bgColor.g = tmpFloat;
    SAFE_PARCEL(input.readFloat, &tmpFloat);
    bgColor.b = tmpFloat;
    SAFE_PARCEL(input.readFloat, &tmpFloat);
    bgColor.a = tmpFloat;
    SAFE_PARCEL(input.readUint32, &tmpUint32);
    bgColorDataspace = static_cast<ui::Dataspace>(tmpUint32);
    SAFE_PARCEL(input.readBool, &colorSpaceAgnostic);
@@ -618,8 +628,7 @@ void layer_state_t::merge(const layer_state_t& other) {
    }
    if (other.what & eBackgroundColorChanged) {
        what |= eBackgroundColorChanged;
        color.rgb = other.color.rgb;
        bgColorAlpha = other.bgColorAlpha;
        bgColor = other.bgColor;
        bgColorDataspace = other.bgColorDataspace;
    }
    if (other.what & eMetadataChanged) {
@@ -752,7 +761,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const {
    CHECK_DIFF(diff, eColorTransformChanged, other, colorTransform);
    if (other.what & eHasListenerCallbacksChanged) diff |= eHasListenerCallbacksChanged;
    if (other.what & eInputInfoChanged) diff |= eInputInfoChanged;
    CHECK_DIFF3(diff, eBackgroundColorChanged, other, color.rgb, bgColorAlpha, bgColorDataspace);
    CHECK_DIFF2(diff, eBackgroundColorChanged, other, bgColor, bgColorDataspace);
    if (other.what & eMetadataChanged) diff |= eMetadataChanged;
    CHECK_DIFF(diff, eShadowRadiusChanged, other, shadowRadius);
    CHECK_DIFF3(diff, eRenderBorderChanged, other, borderEnabled, borderWidth, borderColor);
+2 −2
Original line number Diff line number Diff line
@@ -1560,8 +1560,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBackg
    }

    s->what |= layer_state_t::eBackgroundColorChanged;
    s->color.rgb = color;
    s->bgColorAlpha = alpha;
    s->bgColor.rgb = color;
    s->bgColor.a = alpha;
    s->bgColorDataspace = dataspace;

    registerSurfaceControlForCallback(sc);
+6 −7
Original line number Diff line number Diff line
@@ -226,9 +226,9 @@ struct layer_state_t {
    bool hasBufferChanges() const;

    // Layer hierarchy updates.
    static constexpr uint64_t HIERARCHY_CHANGES = layer_state_t::eBackgroundColorChanged |
            layer_state_t::eLayerChanged | layer_state_t::eRelativeLayerChanged |
            layer_state_t::eReparent;
    static constexpr uint64_t HIERARCHY_CHANGES = layer_state_t::eLayerChanged |
            layer_state_t::eRelativeLayerChanged | layer_state_t::eReparent |
            layer_state_t::eLayerStackChanged;

    // Geometry updates.
    static constexpr uint64_t GEOMETRY_CHANGES = layer_state_t::eBufferCropChanged |
@@ -264,9 +264,8 @@ struct layer_state_t {
    static constexpr uint64_t AFFECTS_CHILDREN = layer_state_t::GEOMETRY_CHANGES |
            layer_state_t::HIERARCHY_CHANGES | layer_state_t::eAlphaChanged |
            layer_state_t::eColorTransformChanged | layer_state_t::eCornerRadiusChanged |
            layer_state_t::eFlagsChanged | layer_state_t::eLayerStackChanged |
            layer_state_t::eTrustedOverlayChanged | layer_state_t::eFrameRateChanged |
            layer_state_t::eFixedTransformHintChanged;
            layer_state_t::eFlagsChanged | layer_state_t::eTrustedOverlayChanged |
            layer_state_t::eFrameRateChanged | layer_state_t::eFixedTransformHintChanged;

    // Changes affecting data sent to input.
    static constexpr uint64_t INPUT_CHANGES = layer_state_t::GEOMETRY_CHANGES |
@@ -333,7 +332,7 @@ struct layer_state_t {

    // The following refer to the alpha, and dataspace, respectively of
    // the background color layer
    float bgColorAlpha;
    half4 bgColor;
    ui::Dataspace bgColorDataspace;

    // A color space agnostic layer means the color of this layer can be
+5 −2
Original line number Diff line number Diff line
@@ -444,8 +444,11 @@ VulkanInterface initVulkanInterface(bool protectedContent = false) {
    ALOGD("Trying to create Vk device with protectedContent=%d (success)", protectedContent);

    VkQueue graphicsQueue;
    VK_GET_DEV_PROC(device, GetDeviceQueue);
    vkGetDeviceQueue(device, graphicsQueueIndex, 0, &graphicsQueue);
    VK_GET_DEV_PROC(device, GetDeviceQueue2);
    const VkDeviceQueueInfo2 deviceQueueInfo2 = {VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, nullptr,
                                                 deviceQueueCreateFlags,
                                                 (uint32_t)graphicsQueueIndex, 0};
    vkGetDeviceQueue2(device, &deviceQueueInfo2, &graphicsQueue);

    VK_GET_DEV_PROC(device, DeviceWaitIdle);
    VK_GET_DEV_PROC(device, DestroyDevice);
Loading