Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vars = {
'llvm_git': 'https://llvm.googlesource.com',
# OCMock is for testing only so there is no google clone
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
'skia_revision': '971c342c30304ef6048384595b073b67d618b417',
'skia_revision': '280ac8882cffff56e83d5a3af6de903b5fcc87ac',

# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/licenses_skia
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: 734f452db823000268dff4a6e6d2e13e
Signature: b1c69055420e97d4bd0f5d5d85ca9776

UNUSED LICENSES:

Expand Down
12 changes: 4 additions & 8 deletions flutter_vma/flutter_skia_vma.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,12 @@ VkResult FlutterSkiaVulkanMemoryAllocator::invalidateMemory(
return vmaInvalidateAllocation(allocator_, allocation, offset, size);
}

uint64_t FlutterSkiaVulkanMemoryAllocator::totalUsedMemory() const {
std::pair<uint64_t, uint64_t>
FlutterSkiaVulkanMemoryAllocator::totalAllocatedAndUsedMemory() const {
VmaTotalStatistics stats;
vmaCalculateStatistics(allocator_, &stats);
return stats.total.statistics.allocationBytes;
}

uint64_t FlutterSkiaVulkanMemoryAllocator::totalAllocatedMemory() const {
VmaTotalStatistics stats;
vmaCalculateStatistics(allocator_, &stats);
return stats.total.statistics.blockBytes;
return {stats.total.statistics.blockBytes,
stats.total.statistics.allocationBytes};
}

} // namespace flutter
3 changes: 1 addition & 2 deletions flutter_vma/flutter_skia_vma.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class FlutterSkiaVulkanMemoryAllocator : public skgpu::VulkanMemoryAllocator {
VkDeviceSize offset,
VkDeviceSize size) override;

uint64_t totalUsedMemory() const override;
uint64_t totalAllocatedMemory() const override;
std::pair<uint64_t, uint64_t> totalAllocatedAndUsedMemory() const override;

private:
FlutterSkiaVulkanMemoryAllocator(
Expand Down