UPDATE 06/24/2015: As of OS X 10.10.4, this issue has disappeared. Thanks Apple!! I won't be upgrading to 10.11 directly, however. I plan to install OS X 10.11 on a separate partition on my hard drive and test if the issue is still solved. If not, I won't be upgrading.
----------------------------------------
When switching from the Dedicated nVidia graphics card to the Integrated Intel Iris Pro graphics card, the top part of the screen can flicker black. This can be caused by a number of things but most reliably when quitting iPhoto, Final Cut Pro, Logic Pro X, and occasionally Google Chrome. This is primarily because those applications require the Dedicated graphics card as can be seen via Activity Monitor.
All that's required to see the flicker is to set the screen resolution in System Preferences to the highest setting (More Space), and ensure Automatic Graphics Switching is enabled. Then just open any application that requires the Dedicated card and close it - when performed enough times a quick flicker of part of the screen to black is inevitable. A more reliable way to produce this issue is to enable and disable Automatic Graphics Switching once every second. This issue does not occur when the middle screen resolution (Best For Retina) or lower is selected.
I hope Apple can issue an update to fix this.