[Impeller] fix missing GPU probe. (flutter/engine#52580)

Fixes https://github.com/flutter/flutter/issues/147723

The test that covers this is the benchmarks in the framework repo. Unfortunately emulators do not support the APIs needed to execute this code in the engine repo.
This commit is contained in:
Jonah Williams 2024-05-06 11:59:12 -07:00 committed by GitHub
parent 8387629491
commit b35cbca6ed

View File

@ -9,6 +9,7 @@
#include "impeller/renderer/backend/vulkan/barrier_vk.h"
#include "impeller/renderer/backend/vulkan/command_buffer_vk.h"
#include "impeller/renderer/backend/vulkan/command_encoder_vk.h"
#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h"
#include "impeller/renderer/backend/vulkan/swapchain/ahb/ahb_formats.h"
#include "impeller/renderer/backend/vulkan/swapchain/surface_vk.h"
#include "impeller/toolkit/android/surface_transaction.h"
@ -130,6 +131,11 @@ bool AHBSwapchainImplVK::Present(
return false;
}
auto context = transients_->GetContext().lock();
if (context) {
ContextVK::Cast(*context).GetGPUTracer()->MarkFrameEnd();
}
if (!texture) {
return false;
}