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

Commit 0375fee9 authored by Adlai Holler's avatar Adlai Holler
Browse files

Use SkSurface::recordingContext instead of deprecated getContext

The difference between recording & direct contexts does not matter
to Android right now because they don't use DDLs, so there's no
functional change here.

Change-Id: Iedcdf5c3ce0ccd3c7e1724d8fb45b7882d8c2129
parent 40e1467f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -516,8 +516,9 @@ void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect)
    flushInfo.fFinishedContext = destroyInfo;
    GrSemaphoresSubmitted submitted = bufferInfo->skSurface->flush(
            SkSurface::BackendSurfaceAccess::kPresent, flushInfo);
    ALOGE_IF(!bufferInfo->skSurface->getContext(), "Surface is not backed by gpu");
    bufferInfo->skSurface->getContext()->submit();
    GrDirectContext* context = GrAsDirectContext(bufferInfo->skSurface->recordingContext());
    ALOGE_IF(!context, "Surface is not backed by gpu");
    context->submit();
    if (submitted == GrSemaphoresSubmitted::kYes) {
        VkSemaphoreGetFdInfoKHR getFdInfo;
        getFdInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR;