How would you update this custom view to make it better?
Implement a function that identifies which custom view items require redrawing after a state update. Each item has a unique ID and rendering properties: position, size, and color. Return changed, added, and removed IDs in deterministic order.
Input: two lists of item dictionaries. Output: a list of dirty IDs, with updated items first and removed items afterward.
def dirty_view_items(old_items, new_items):