Migrate Fuchsia VK calls of GrBackend* (flutter/engine#45380)

Follow-up to https://github.com/flutter/engine/pull/45325

No functional change.
This commit is contained in:
Brian Osman
2023-09-01 11:41:43 -04:00
committed by GitHub
parent 9d90b18967
commit 19d37a310c
2 changed files with 7 additions and 4 deletions

View File

@@ -18,6 +18,7 @@
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
#include "vulkan/vulkan_core.h"
#include "vulkan/vulkan_fuchsia.h"
@@ -408,8 +409,8 @@ bool VulkanSurface::SetupSkiaSurface(sk_sp<GrDirectContext> context,
image_info.fSampleCount = 1;
image_info.fLevelCount = image_create_info.mipLevels;
GrBackendRenderTarget sk_render_target(size.width(), size.height(),
image_info);
auto sk_render_target =
GrBackendRenderTargets::MakeVk(size.width(), size.height(), image_info);
SkSurfaceProps sk_surface_props(0, kUnknown_SkPixelGeometry);

View File

@@ -19,6 +19,7 @@
#include "third_party/skia/include/gpu/GrBackendSemaphore.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
#include "third_party/skia/include/gpu/vk/GrVkBackendContext.h"
#include "third_party/skia/include/gpu/vk/GrVkExtensions.h"
#include "third_party/skia/include/gpu/vk/GrVkTypes.h"
@@ -228,7 +229,7 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal(
return false;
}
GrVkImageInfo imageInfo;
if (!backendRT.getVkImageInfo(&imageInfo)) {
if (!GrBackendRenderTargets::GetVkImageInfo(backendRT, &imageInfo)) {
return false;
}
@@ -259,7 +260,8 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal(
1, &image_barrier))
return false;
backendRT.setVkImageLayout(image_barrier.newLayout);
GrBackendRenderTargets::SetVkImageLayout(&backendRT,
image_barrier.newLayout);
if (!command_buffer->End())
return false;