Merge "Move adapter2D to a derived class from Allocation."