Per engineer, Google, Facebook, Apple make multiple millions of dollars in profit per fiscal year and yet very, very few engineers make $1m+. Even $500k is out of reach of most non-managerial engineers.
So, no if Google made 2x or 4x the profit with the same engineers, they company would pay them the same exact rate if they could. Often times they do.
The only way to really gain serious income is ownership of a technology that you can sell either directly to the market or to another company.
No matter how much you make, as an employee you are always trading lower risk for lower or linear rewards. The company compensates you for your years of experience at a market rate but, retains the fullest share of the profits that they can. They also own the code of your labor after you leave the company so there's that. You work (especially as a developer) makes the company money even after you've left.
If code wasn't so complex and hard to maintain, there would be even lower salaries (compared to profits) at software-based companies.
Brilliant programming that creates even billions of dollars of value for one of those companies isn't even going to net the engineer 1% of the value they create.
These kinds of profits are only made by teams, and that's why individual programmers only get a fraction of it.
While I am not answering your question directly, Jeff Dean and Shel Kaphan come to mind, in their key, fundamental roles of building massive scalable systems - information search and retail selling, respectively.
http://research.google.com/pubs/jeff.html
http://www.geekwire.com/2011/meet-shel-kaphan-amazoncom-empl...
Neither of us got even a thank you :-(