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
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index 4dbce92..1333b92 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -516,8 +516,9 @@
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;