| 68 | } |
| 69 | |
| 70 | m2::PointU StipplePenTextureSize(size_t patternsCount, uint32_t maxTextureSize) |
| 71 | { |
| 72 | uint32_t const sz = math::NextPowOf2(static_cast<uint32_t>(patternsCount) + kReservedPatterns); |
| 73 | // No problem if assert will fire here. Just pen texture will be 2x bigger :) |
| 74 | // ASSERT_LESS_OR_EQUAL(sz, kMinStippleTextureHeight, (patternsCount)); |
| 75 | uint32_t const stippleTextureHeight = std::min(maxTextureSize, std::max(sz, kMinStippleTextureHeight)); |
| 76 | |
| 77 | return m2::PointU(kStippleTextureWidth, stippleTextureHeight); |
| 78 | } |
| 79 | |
| 80 | m2::PointU ColorTextureSize(size_t colorsCount, uint32_t maxTextureSize) |
| 81 | { |
no test coverage detected