Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: src/gpu/vk/GrVkMemory.h

Issue 2072763002: Check for some potential subheap allocation failures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add some asserts Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/vk/GrVkMemory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkMemory.h
diff --git a/src/gpu/vk/GrVkMemory.h b/src/gpu/vk/GrVkMemory.h
index 417fb5a1e050c41e552f164cd58a647f4c3a18c5..44c82867218dc189be44458e47cb7ea0b5dc80f8 100644
--- a/src/gpu/vk/GrVkMemory.h
+++ b/src/gpu/vk/GrVkMemory.h
@@ -100,6 +100,7 @@ public:
bool alloc(VkDeviceSize size, VkDeviceSize alignment, uint32_t memoryTypeIndex,
GrVkAlloc* alloc) {
+ SkASSERT(size > 0);
return (*this.*fAllocFunc)(size, alignment, memoryTypeIndex, alloc);
}
bool free(const GrVkAlloc& alloc);
« no previous file with comments | « no previous file | src/gpu/vk/GrVkMemory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698