Refactor glstate blend masks