Remove instanceof from gfx and rename nativeImageData to context