Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Add Vulkan allocator traces. #43215

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions impeller/renderer/backend/vulkan/allocator_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>

#include "flutter/fml/memory/ref_ptr.h"
#include "flutter/fml/trace_event.h"
#include "impeller/core/formats.h"
#include "impeller/renderer/backend/vulkan/device_buffer_vk.h"
#include "impeller/renderer/backend/vulkan/formats_vk.h"
Expand Down Expand Up @@ -327,6 +328,7 @@ class AllocatedTextureSourceVK final : public TextureSourceVK {
// |Allocator|
std::shared_ptr<Texture> AllocatorVK::OnCreateTexture(
const TextureDescriptor& desc) {
TRACE_EVENT0("impeller", "AllocatorVK::OnCreateTexture");
if (!IsValid()) {
return nullptr;
}
Expand All @@ -348,6 +350,7 @@ std::shared_ptr<Texture> AllocatorVK::OnCreateTexture(
// |Allocator|
std::shared_ptr<DeviceBuffer> AllocatorVK::OnCreateBuffer(
const DeviceBufferDescriptor& desc) {
TRACE_EVENT0("impeller", "AllocatorVK::OnCreateBuffer");
vk::BufferCreateInfo buffer_info;
buffer_info.usage = vk::BufferUsageFlagBits::eVertexBuffer |
vk::BufferUsageFlagBits::eIndexBuffer |
Expand Down