Implement CopyTo via LockRect instead of GetRenderTargetData.
Implement CopyTo via LockRect instead of GetRenderTargetData.

Empirical evidence seems to suggest that LockRect and memcpy are faster
than would be GetRenderTargetData to an offscreen surface wrapping *buf.
I see 21% improvement on a fast Win7 machine (Z620 with nvidia graphics),
and a 27% improvement on a slow Win7 machine (lenovo X61 laptop with intel
graphics).

BUG=145587

Review URL: https://codereview.chromium.org/11348084

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@169788 0039d316-1c4b-4281-b951-d872f2087c98

Pluto-tv/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,Chilledheart/chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,patrickm/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Chilledheart/chromium,anirudhSK/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,ltilve/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,M4sse/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,markYoungH/chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,Chilledheart/chromium,markYoungH/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,littlstar/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,patrickm/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,Just-D/chromium-1,jaruba/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,Jonekee/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,hujiajie/pa-chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,Jonekee/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,dushu1203/chromium.src,ltilve/chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,patrickm/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,M4sse/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,anirudhSK/chromium,fujunwei/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,patrickm/chromium.src,Just-D/chromium-1,mogoweb/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,zcbenz/cefode-chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,jaruba/chromium.src,markYoungH/chromium.src,patrickm/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,dushu1203/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,markYoungH/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,Just-D/chromium-1,Just-D/chromium-1,mogoweb/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,jaruba/chromium.src,littlstar/chromium.src