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

Commit cff3c078 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Merge duplicate APIs in VulkanInterface" into main

parents 1b3f3090 76efc4a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static void unref_semaphore(void* semaphore) {

std::unique_ptr<SkiaGpuContext> GaneshVkRenderEngine::createContext(
        VulkanInterface& vulkanInterface) {
    return SkiaGpuContext::MakeVulkan_Ganesh(vulkanInterface.getGaneshBackendContext(),
    return SkiaGpuContext::MakeVulkan_Ganesh(vulkanInterface.createSkiaVulkanBackendContext(),
                                             mSkSLCacheMonitor);
}

+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static void unref_semaphore(void* semaphore, skgpu::CallbackResult result) {

std::unique_ptr<SkiaGpuContext> GraphiteVkRenderEngine::createContext(
        VulkanInterface& vulkanInterface) {
    return SkiaGpuContext::MakeVulkan_Graphite(vulkanInterface.getGraphiteBackendContext());
    return SkiaGpuContext::MakeVulkan_Graphite(vulkanInterface.createSkiaVulkanBackendContext());
}

void GraphiteVkRenderEngine::waitFence(SkiaGpuContext*, base::borrowed_fd fenceFd) {
+1 −5
Original line number Diff line number Diff line
@@ -32,11 +32,7 @@ namespace android {
namespace renderengine {
namespace skia {

VulkanBackendContext VulkanInterface::getGaneshBackendContext() {
    return this->getGraphiteBackendContext();
};

VulkanBackendContext VulkanInterface::getGraphiteBackendContext() {
VulkanBackendContext VulkanInterface::createSkiaVulkanBackendContext() {
    VulkanBackendContext backendContext;
    backendContext.fInstance = mInstance;
    backendContext.fPhysicalDevice = mPhysicalDevice;
+1 −3
Original line number Diff line number Diff line
@@ -44,9 +44,7 @@ public:
    bool takeOwnership();
    void teardown();

    // TODO(b/309785258) Combine these into one now that they are the same implementation.
    VulkanBackendContext getGaneshBackendContext();
    VulkanBackendContext getGraphiteBackendContext();
    VulkanBackendContext createSkiaVulkanBackendContext();
    VkSemaphore createExportableSemaphore();
    VkSemaphore importSemaphoreFromSyncFd(int syncFd);
    int exportSemaphoreSyncFd(VkSemaphore semaphore);