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

Commit eae8088c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "vulkan: respect consumer default dataspace upon PASS_THROUGH"

parents 49bc7a32 51572c2f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1924,6 +1924,7 @@ int Surface::disconnect(int api, IGraphicBufferProducer::DisconnectMode mode) {
        mReqHeight = 0;
        mReqUsage = 0;
        mCrop.clear();
        mDataSpace = Dataspace::UNKNOWN;
        mScalingMode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
        mTransform = 0;
        mStickyTransform = 0;
+9 −5
Original line number Diff line number Diff line
@@ -1218,12 +1218,16 @@ VkResult CreateSwapchainKHR(VkDevice device,
              native_pixel_format, strerror(-err), err);
        return VK_ERROR_SURFACE_LOST_KHR;
    }

    /* Respect consumer default dataspace upon HAL_DATASPACE_ARBITRARY. */
    if (native_dataspace != HAL_DATASPACE_ARBITRARY) {
        err = native_window_set_buffers_data_space(window, native_dataspace);
        if (err != android::OK) {
            ALOGE("native_window_set_buffers_data_space(%d) failed: %s (%d)",
                  native_dataspace, strerror(-err), err);
            return VK_ERROR_SURFACE_LOST_KHR;
        }
    }

    err = native_window_set_buffers_dimensions(
        window, static_cast<int>(create_info->imageExtent.width),