All - sorry to see you have had this issue. I have had the exact same problem with my late 2011 MBP (i7, 8 GB's RAM, running 10.10). Firstly below I'll write my solution and then a description of all the symptoms my problem had shown for comparison to yours (petty identical though!)
SOLUTION -
This is painful and time consuming but if you have a Time Machine back-up this could solve it. In short - reformat your start up drive through the Disk Utility and do a complete re-install of OSX (mine allowed a reinstall of 10.9 and then from there I could update to 10.10). From there you can begin the long process of reinstalling your applications either via the App Store or via physical media you may have (you can't drag and drop them over from a back-up) and restoring your personal documents, folders and files (such as iTunes music and iPhoto pictures) by dragging and dropping from the time machine back-up into the relevant Home folder on your reformatted Mac.
Trust me, this was a last resort and I really did not want to do this but (as your see from the description below) I had no choice and (most importantly) IT WORKS! So far my MBP has been up and running for 24 hours with no shutting down, slowing down or graphical artefacts of any sort.
DESCRIPTION OF ISSUES -
Starting about 12 months ago when running 10.9 I noticed There would often be graphical artefacts on start-up and every now and again the MBP would restart randomly (when on battery power usually at about 60% for some reason). I took it into my local re-seller who I got it from who did a full diagnostic and said there were no issues either with hardware or the battery. I then later took it Ito an Apple Store and a Genius said the same - no hardware issues at all.
6 Months later the problem got worse and after updating to 10.10 my MBP slowed to a crawl and more frequently turned off at random. I repaired permissions and verified the disk using Disk Utility (all fine) but a few days ago it became apparent it wouldnt stay on for more than 5 minutes at a time. Then it had a complete meltdown.
it wouldn't get passed the start-up screen 9/10 times and when it did an error stating 'A Graphics Error has been detected' and would restart after about 2 minutes. I managed to get into there diagnostic screen and ran a full report - no hardware issues Thank God. The MBP would not boot into Safe Mode but I could control + V at start up to see the boot log and it was clear there were errors causing what I can only assume was a kernel panic killing start up.
biting the bullet I decided to reformat using the Recover Disk (Options key at start-up) which allowed me to get to Disk Utility and implement my solution above. Incidentally the first 5 attempts at this resulted in a soul destroying Blue Screen but it did finally work. All I can suggest if this is happening to you (as some have reported) is to keep trying and hopefully you'll get lucky as I did.
As the solution above states this worked and so far so good - Diagnostic Test confirms no hardware issues and Disk Utility reports all fine (although advised to run a test of disk permissions straight after re-install of the OS).
Good luck with this issue. If it comes to it a full restore like I did might save your comp and sanity. For those running older machines maybe just sticking to 10.9 would be the safest choice once you have gone back to scratch.