Unified handling of graphics devices