- const uint32_t DEFAULT_ATLAS_WIDTH( 512u );
- const uint32_t DEFAULT_ATLAS_HEIGHT( 512u );
- const uint32_t DEFAULT_BLOCK_WIDTH( 16u );
- const uint32_t DEFAULT_BLOCK_HEIGHT( 16u );
- const uint32_t SINGLE_PIXEL_PADDING( 1u );
- const uint32_t DOUBLE_PIXEL_PADDING( SINGLE_PIXEL_PADDING << 1 );
- Toolkit::AtlasManager::AtlasSize EMPTY_SIZE;
+const uint32_t DEFAULT_ATLAS_WIDTH(512u);
+const uint32_t DEFAULT_ATLAS_HEIGHT(512u);
+const uint32_t DEFAULT_BLOCK_WIDTH(16u);
+const uint32_t DEFAULT_BLOCK_HEIGHT(16u);
+const uint32_t SINGLE_PIXEL_PADDING(1u);
+const uint32_t DOUBLE_PIXEL_PADDING(SINGLE_PIXEL_PADDING << 1);
+Toolkit::AtlasManager::AtlasSize EMPTY_SIZE;
+
+bool IsBlockSizeSufficient(uint32_t width, uint32_t height, uint32_t requiredBlockWidth, uint32_t requiredBlockHeight)
+{
+ return (width + DOUBLE_PIXEL_PADDING <= requiredBlockWidth) && (height + DOUBLE_PIXEL_PADDING <= requiredBlockHeight);