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

Commit 7649d5b5 authored by Kevin Lubick's avatar Kevin Lubick Committed by Android (Google) Code Review
Browse files

Merge "Migrate SkSurface::flush methods to skgpu::ganesh version"

parents 78e1991b aa592d0e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ IRenderPipeline::DrawResult SkiaOpenGLPipeline::draw(

    {
        ATRACE_NAME("flush commands");
        surface->flushAndSubmit();
        skgpu::ganesh::FlushAndSubmit(surface);
    }
    layerUpdateQueue->clear();

+3 −3
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ Frame VulkanManager::dequeueNextBuffer(VulkanSurface* surface) {
                        // The following flush blocks the GPU immediately instead of waiting for
                        // other drawing ops. It seems dequeue_fence is not respected otherwise.
                        // TODO: remove the flush after finding why backendSemaphore is not working.
                        bufferInfo->skSurface->flushAndSubmit();
                        skgpu::ganesh::FlushAndSubmit(bufferInfo->skSurface);
                    }
                }
            }
@@ -586,10 +586,10 @@ nsecs_t VulkanManager::finishFrame(SkSurface* surface) {
    } else {
        semaphore = VK_NULL_HANDLE;
    }
    GrSemaphoresSubmitted submitted =
            surface->flush(SkSurface::BackendSurfaceAccess::kPresent, flushInfo);
    GrDirectContext* context = GrAsDirectContext(surface->recordingContext());
    ALOGE_IF(!context, "Surface is not backed by gpu");
    GrSemaphoresSubmitted submitted = context->flush(
            surface, SkSurfaces::BackendSurfaceAccess::kPresent, flushInfo);
    context->submit();
    const nsecs_t submissionTime = systemTime();
    if (semaphore != VK_NULL_HANDLE) {