Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
// | .__/|_| \___/_/\_\_|\___|\__,_| |_____| \_/ \___|_| |_|\__|___/
// |_|
void App::surface_created(uint32_t surface_id) {
- surface_id &= id_allocator::id_mask;
+ surface_id >>= id_allocator::id_shift;
logdebug("surface_id is %u", surface_id);
}
void App::surface_removed(uint32_t surface_id) {
- surface_id &= id_allocator::id_mask;
+ surface_id >>= id_allocator::id_shift;
logdebug("surface_id is %u", surface_id);
namespace wm {
struct id_allocator {
- constexpr static unsigned id_shift = 20;
- constexpr static unsigned id_mask = (1 << id_shift) - 1;
+ constexpr static const unsigned id_shift = 22;
+ constexpr static const unsigned id_mask = (1 << id_shift) - 1;
unsigned next = 1;