summaryrefslogtreecommitdiffstats
path: root/content/renderer
Commit message (Collapse)AuthorAgeFilesLines
* reland patch http://codereview.chromium.org/7204008 after webrtc build has ↵wjia@chromium.org2011-07-2014-81/+1186
| | | | | | | | | | been fixed. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/7458006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93235 0039d316-1c4b-4281-b951-d872f2087c98
* Add some trace events so that all causes of DoDeferredUpdate are shown in ↵jbates@chromium.org2011-07-201-1/+6
| | | | | | | | the trace. Review URL: http://codereview.chromium.org/7379008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93209 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CommandLine::GetCommandLineString().msw@chromium.org2011-07-201-1/+1
| | | | | | | | | | | | Fix string hackery in net/tools/dump_cache/dump_cache.cc Fix const casts in chrome/installer/util/product.cc and base/process_util_win.cc. BUG=73195 TEST=none Review URL: http://codereview.chromium.org/7386002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93165 0039d316-1c4b-4281-b951-d872f2087c98
* Removing CreateFrameExternal(), CreateFrameGl(), and SurfaceType from ↵scherkus@chromium.org2011-07-201-2/+0
| | | | | | | | | | VideoFrame. They've never been used. Review URL: http://codereview.chromium.org/7439007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93145 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93066 - Execute all GL commands up to the put offset reported by a ↵apatrick@chromium.org2011-07-203-5/+11
| | | | | | | | | | | each flush.This means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous.The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling.I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress. Review URL: http://codereview.chromium.org/7253052 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7458010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93143 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-194-4/+4
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Reparenting of RendererGLContexts supports going from no parent to having a ↵apatrick@chromium.org2011-07-193-20/+13
| | | | | | | | | | | parent. RendererGLContext::SetParent is a no-op if the parent did not change to avoid a redundant sync IPC. Added SetParentContext to WebGraphicsContext3DCommandBufferImpl. WebKit change to follow. Review URL: http://codereview.chromium.org/7237009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93106 0039d316-1c4b-4281-b951-d872f2087c98
* Execute all GL commands up to the put offset reported by a each flush.This ↵apatrick@chromium.org2011-07-193-11/+5
| | | | | | | | means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous.The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling.I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress. Review URL: http://codereview.chromium.org/7253052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93066 0039d316-1c4b-4281-b951-d872f2087c98
* Move MHTML code to content, now that download code is moving there.jam@chromium.org2011-07-193-0/+99
| | | | | | | BUG=82782 Review URL: http://codereview.chromium.org/7396029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93041 0039d316-1c4b-4281-b951-d872f2087c98
* Remove redundant size and type information from VideoDecode PPAPIvrk@google.com2011-07-194-31/+20
| | | | | | | | | | | | | | | | | | | The visible size of the video frame is determined at Create stage. The type of buffer (from system memory or texture-backed via GLES) is decided by the plugin when it calls AssignGLESBuffers or AssignSysmemBuffers in response to ProvidePictureBuffers. The decoded size will be the same as the size requested in ProvidePictureBuffers. Thus these values specified anywhere else is redundant, and introduces a place to have inconsistency. BUG=NONE TEST=ovda unittest passes; gles2 runs w/o crashing Review URL: http://codereview.chromium.org/7021020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93031 0039d316-1c4b-4281-b951-d872f2087c98
* Remove --enable-p2papi flag.sergeyu@chromium.org2011-07-191-2/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7399030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92940 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up VideoFrame::CreateXXX and VideoFrame::AllocXXX methods.scherkus@chromium.org2011-07-181-38/+7
| | | | | | | | No need to confuse people with potentially-NULL pointers due to out-of-memory conditions. Review URL: http://codereview.chromium.org/7396007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92917 0039d316-1c4b-4281-b951-d872f2087c98
* NULL-check video_decoder_host_ in CommandBufferProxy::OnChannelErrorjamesr@chromium.org2011-07-181-1/+2
| | | | | | | | | | BUG=89391 TEST=load page with compositor, kill GPU process, verify renderer process doesn't crash Review URL: http://codereview.chromium.org/7400012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92882 0039d316-1c4b-4281-b951-d872f2087c98
* Fix media code to use initializer-list style for inheritance.scherkus@chromium.org2011-07-183-10/+13
| | | | | | Review URL: http://codereview.chromium.org/7400013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92826 0039d316-1c4b-4281-b951-d872f2087c98
* [Reverted due to check_deps failure]zea@chromium.org2011-07-155-130/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert 92749 - Fix problem when 'ended' event was fired before stream really ended. That caused impression that rewind does not work. With that change small JS program var a = new Audio("file:///home/enal/temp/click2/click2.wav"); var num_played = 0; a.addEventListener('canplaythrough', function() { a.play(); }); a.addEventListener('ended', function() { num_played ++; if (num_played < 10) { a.currentTime = 0; a.play(); } }); works correctly, you hear 10 clicks one after another, and it takes ~1.5 seconds to play all 10 sounds (one click is 146ms). Current Chrome plays only beginnings of the first 9 clicks and then entire 10th click -- 'ended' event fires too early, so rewind stops audio playback for all clicks but last one. With that fix you can easily create pool of audio objects -- on 'ended' event just add audio object to the pool. Fix consists of 3 parts: 1) For low-latency code path pass entire "audio state" object to the renderer process. That allows renderer take into account number of pending bytes in the buffer. 2) When using low-latency code path renderer not only fills the buffer with data, but also writes length of data into first word of the buffer. That allows host process to pass correct byte counts to renderer. 3) Renderer now keeps track of the earliest time playback can end based on the number of rendered bytes, and will not call 'ended' callback till that time. BUG=http://code.google.com/p/chromium/issues/detail?id=78992 http://codereview.chromium.org/7328030 Review URL: http://codereview.chromium.org/7328030 TBR=enal@chromium.org Review URL: http://codereview.chromium.org/7395014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92753 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem when 'ended' event was fired before stream really ended.enal@chromium.org2011-07-155-34/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That caused impression that rewind does not work. With that change small JS program var a = new Audio("file:///home/enal/temp/click2/click2.wav"); var num_played = 0; a.addEventListener('canplaythrough', function() { a.play(); }); a.addEventListener('ended', function() { num_played ++; if (num_played < 10) { a.currentTime = 0; a.play(); } }); works correctly, you hear 10 clicks one after another, and it takes ~1.5 seconds to play all 10 sounds (one click is 146ms). Current Chrome plays only beginnings of the first 9 clicks and then entire 10th click -- 'ended' event fires too early, so rewind stops audio playback for all clicks but last one. With that fix you can easily create pool of audio objects -- on 'ended' event just add audio object to the pool. Fix consists of 3 parts: 1) For low-latency code path pass entire "audio state" object to the renderer process. That allows renderer take into account number of pending bytes in the buffer. 2) When using low-latency code path renderer not only fills the buffer with data, but also writes length of data into first word of the buffer. That allows host process to pass correct byte counts to renderer. 3) Renderer now keeps track of the earliest time playback can end based on the number of rendered bytes, and will not call 'ended' callback till that time. BUG=http://code.google.com/p/chromium/issues/detail?id=78992 http://codereview.chromium.org/7328030 Review URL: http://codereview.chromium.org/7328030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92749 0039d316-1c4b-4281-b951-d872f2087c98
* Keep track of the history's page IDs to avoid navigating to a stale entry.creis@chromium.org2011-07-153-7/+149
| | | | | | | | | | | | | This ensures that a race between an asynchronous back/forward and a navigation in the renderer doesn't confuse NavigationController. BUG=86758 TEST=RenderViewTest.IgnoreStaleNavigations TEST=NavigationControllerTest.InPage_Replace Review URL: http://codereview.chromium.org/7327014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92748 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid leaking file handles.yzshen@chromium.org2011-07-151-3/+13
| | | | | | | | | | | | | | AsyncOpenFileCallback: fix the issue that file handle is leaked if the file handle arrives after the requester has died. This change also fixes test_file_system. BUG=79820 TEST=FileIO/FileRef/FileSystem tests in ppapi_tests: Reload the test page, the test still passes. The output files can be deleted when any of these tests finishes running, no matter the test page is still open or not. Review URL: http://codereview.chromium.org/7327025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92727 0039d316-1c4b-4281-b951-d872f2087c98
* Enable fire-and-forget Destroy of HW video decoder, and misc other improvements.fischman@chromium.org2011-07-157-115/+18
| | | | | | | | | | | | | | | | | | | | | | | - Instead of requiring the client to wait for NotifyDestroyDone we do the asynchronous OMX teardown dance on the client's behalf. - Prettify/simplify error handling in OVDA for easier matching of errors to OMX_Core.h and to remove redundant information. - Enable previously-DISABLED_ early-teardown unittests! - Remove passing VideoDecoder_Dev object in PPP_VideoDecoder_Dev calls, because it was unnecssary, and because the ~VideoDecoder_Dev dtor is now not a no-op so we don't want to call it spuriously. - Remove accidentally re-added gpu_video_service_host.cc (originally removed in 92251, accidentally reintroduced by a bad rebase in 92383). BUG=none TEST=ovdatest passes (incl. early-teardown tests) and gles2 works (including reload and EOS handling, no crashes) Review URL: http://codereview.chromium.org/7361010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92704 0039d316-1c4b-4281-b951-d872f2087c98
* Implements an external AudioDeviceModule for WebRTC. henrika@chromium.org2011-07-152-0/+1013
| | | | | | | | | | | | | | | | | | | | | | | | | A RendererWebRtcAudioDeviceImpl instance implements the abstract interface webrtc::AudioDeviceModule which makes it possible for a user (e.g. webrtc:: VoiceEngine) to register this class as an external AudioDeviceModule. The user then call RendererWebRtcAudioDeviceImpl::StartPlayout() and RendererWebRtcAudioDeviceImpl::StartRecording() from the render process to initiate and start audio rendering and capturing in the browser process. IPC is utilized to set up the media streams. This CL is a restart of a closed CL (http://codereview.chromium.org/7010005/). What has changed since the previous CL was discussed? 1) WebRTC has been added to Chrome (DEPS) => no longer need for controversal dummy header. 2) This implementation has moved from content/renderer to content/renderer/media BUG=none TEST=Tested on Windows using a separate test method which is not added to this CL. Please contact henrika@chromium.org for more details. Review URL: http://codereview.chromium.org/7353016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92682 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92590 - add CaptureVideoDecoder for local preview and ↵sky@chromium.org2011-07-1414-1200/+81
| | | | | | | | | | | | | VideoCaptureModuleImpl for rtc encoding channel. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/7204008 TBR=wjia@chromium.org Review URL: http://codereview.chromium.org/7375007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92592 0039d316-1c4b-4281-b951-d872f2087c98
* add CaptureVideoDecoder for local preview and VideoCaptureModuleImpl for rtc ↵wjia@chromium.org2011-07-1414-81/+1200
| | | | | | | | | | encoding channel. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/7204008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92590 0039d316-1c4b-4281-b951-d872f2087c98
* Detect and expose loss of OpenGL context using GL_ARB_robustness.kbr@chromium.org2011-07-148-16/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This CL was originally reviewed under http://codereview.chromium.org/7331020/ . The only difference is the removal of an #include from command_buffer.h that was accidentally left in and which caused a significant increase in the number of files containing static initializers, presumably because of the dependent #include of <iostream>.) This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) R=gman,apatrick,piman Review URL: http://codereview.chromium.org/7362005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92453 0039d316-1c4b-4281-b951-d872f2087c98
* Coding style update.ronghuawu@google.com2011-07-131-1/+1
| | | | | | | | | | | patch by ronghuawu@google.com BUG=none TEST=unit_tests, media_unittests Review URL: http://codereview.chromium.org/7355023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92441 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92429 - Detect and expose loss of OpenGL context using ↵kbr@chromium.org2011-07-138-93/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL_ARB_robustness. (Regressed static initalizer size on Linux -- will need to reexamine code to understand why.) This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) Review URL: http://codereview.chromium.org/7331020 TBR=kbr@chromium.org Review URL: http://codereview.chromium.org/7346032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92434 0039d316-1c4b-4281-b951-d872f2087c98
* Detect and expose loss of OpenGL context using GL_ARB_robustness.kbr@chromium.org2011-07-138-16/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) Review URL: http://codereview.chromium.org/7331020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92429 0039d316-1c4b-4281-b951-d872f2087c98
* Roll new libjingle with asynchronous NetworkManager.sergeyu@chromium.org2011-07-134-39/+106
| | | | | | | | | BUG=84243 TEST=Unittests Review URL: http://codereview.chromium.org/7338003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92384 0039d316-1c4b-4281-b951-d872f2087c98
* Overhauled OmxVideoDecodeAccelerator's state machine implementation and ↵fischman@chromium.org2011-07-135-53/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | related code. This implementation makes explicit the transitions being effected and the states expected to be involved in each transition, instead of the previous implementation's use of implicit information (e.g. "we just went from Idle to Loaded, therefore we must be Abort()'ing"). This is not only much more readable but also enables implementation of Reset() (for Seek) and replaces Abort() (which never had a well-defined purpose that was consistent in documentation and implementation, nor a customer use-case). DID some TODOs in OmxVideoDecodeAccelerator: - Replaced error-code checking boilerplate w/ a failure-handling macro. - Simplified the component-name-getting dance in CreateComponent(). Updated the PPAPI interface: - Removed GetConfigs & AssignSysmemBuffers (neither of which ever came into its own) - Replaced Abort with Reset, and added Destroy (which still nobody calls, but that'll change shortly). - Cleaned up the interface's documentation. BUG=86122 TEST=OVDATest, gles2 sample plugin Review URL: http://codereview.chromium.org/7338010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92383 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: add initial support for shared workers debugging.yurys@chromium.org2011-07-131-2/+1
| | | | | | | | | | | | | | | WorkerDevToolsManager is a service that is used for managing DevTools connections to DevTools agents in shared workers. It operates on the IO thread. Each debugged shared worker instance has unique devtools id which is used for addressing workers when passing messages between WorkerDevToolsManager and DevToolsManager. WorkerDevToolsManager translates those ids into WorkerProcessHost and worker_routing_id and back. WorkerDevToolsMessageFilter passes worker messages to the WorkerDevToolsManager which in turn forwards them to DevToolsManager on the UI thread where they are dispatched to corresponding DevTools window. Messages from DevTools frontend go through the DevToolsManager which forwards them to WorkerDevToolsManager on the IO thread where they are sent by means of corresponding WorkerProcessHost to the corresponding WorkerDevToolsAgent. BUG=None TEST=None Review URL: http://codereview.chromium.org/7248076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92346 0039d316-1c4b-4281-b951-d872f2087c98
* Getting form value from NPAPI plugins.bashi@chromium.org2011-07-132-0/+7
| | | | | | | | | | | | | | Adds/implements a plugin IPC message which allows to get form value from plugins. We need to implement the interface on WebKit side to make this work so the CL won't affect the chromium's behavior for now. BUG=88896 TEST=compiled Review URL: http://codereview.chromium.org/7335004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92315 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GpuVideoServiceHost and move ownership of GVDAHosts to ↵vrk@google.com2011-07-1212-274/+122
| | | | | | | | | | | | | | CommandBufferProxies Now communication between GpuVideoDecodeAccelerator and its host should be more or less symmetric, at least for creation. BUG=none TEST=none Review URL: http://codereview.chromium.org/7329012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92251 0039d316-1c4b-4281-b951-d872f2087c98
* Convert ViewMsg_NetworkStateChanged from routed -> control,adamk@chromium.org2011-07-124-8/+9
| | | | | | | | | | | | | | | | | | | minimizing the number of required IPCs (since the online state is a per-WebKit singleton). In doing so, I've disentangled online state management from TabContents: it now resides off by itself in BrowserOnlineStateObserver, a tiny class owned by BrowserProcessImpl. This is an attempt to re-land r91390 without the OnProcessLaunched IPC (since r92062 solved that in a different way by using WebPreferences). The previous commit was reverted due to missing message_loop.h includes. R=darin@chromium.org Review URL: http://codereview.chromium.org/7343011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92233 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/values.h into the base namespace. This includes a cros DEPS rolldmazzoni@chromium.org2011-07-121-11/+13
| | | | | | | | | | with a minor change to that code since libcros also uses base/values.h. BUG=88666 TEST=none Review URL: http://codereview.chromium.org/7259019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the rtc_video_render as the libjingle cricket::VideoRenderer. ↵ronghuawu@google.com2011-07-124-72/+38
| | | | | | | | | | | | | Because the rtc_video_render will eventually be used by libjingle as the video renderer. patch by ronghuawu@google.com BUG=none TEST=unit_tests, media_unittests Review URL: http://codereview.chromium.org/7336003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92203 0039d316-1c4b-4281-b951-d872f2087c98
* Ensures that AudioMessageFilter now lives on the main render thread.henrika@chromium.org2011-07-1217-383/+548
| | | | | | | | | | In addition, removes usage of routing ID by utilizing control messages instead of routed messages. BUG=none TESTS=none Review URL: http://codereview.chromium.org/7157001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92138 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure webkit compositor is not using ppapi backing texture ID after it ↵reveman@google.com2011-07-122-7/+17
| | | | | | | | | | | | | | has been destroyed. Set backing texture ID to 0 before destroying ppapi context and finish parent context before texture ID is freed. BUG=chromium-os:16976 TEST=manual Review URL: http://codereview.chromium.org/7327011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92095 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid calling AudioDevice::Stop() multiple times.crogers@google.com2011-07-122-3/+11
| | | | | | | | | BUG=http://code.google.com/p/chromium/issues/detail?id=88740 TEST=none (tested locally) Review URL: http://codereview.chromium.org/7285049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92085 0039d316-1c4b-4281-b951-d872f2087c98
* Fix num_swapbuffers_complete_pending_ accounting.piman@google.com2011-07-117-12/+32
| | | | | | | | | | | | Move the accounting into the context itself, which knows accurately when a swapbuffers is sent. This fixes issues with the GPU process dying while an active tab is in the background. BUG=chromium-os:16960 TEST=Go to youtube with Pepper Flash, switch to a different tab, kill GPU process, go to youtube tab, check that it still displays. Do it again twice. Review URL: http://codereview.chromium.org/7313033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92080 0039d316-1c4b-4281-b951-d872f2087c98
* Fix surface destruction, broken by r90096piman@google.com2011-07-091-2/+2
| | | | | | | | | | | Also, initialize parameter passed to GetShaderiv/GetProgramiv that trigger asserts in debug. BUG=chromium-os:17082 TEST=youtube with pepper flash, go fullscreen and back. Review URL: http://codereview.chromium.org/7328012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91934 0039d316-1c4b-4281-b951-d872f2087c98
* We were synchronously destroying the RendererGlContext transfer buffers ↵jbates@chromium.org2011-07-071-20/+18
| | | | | | | | | | | | | while commands may still be pending in the command buffer that use them. This generated spurious kOutOfBounds errors. kOutOfBounds errors cause us to kill the associated GpuChannel. That leads to lots of bad behavior, such as failing to reload certain WebGL demos. This change simply lets the command buffer destroy the shared memory in its destructor instead of destroying them explicitly. The GPU-side resources are cleaned up when the command buffer is destroyed. BUG=88115 TEST=Open NVIDIA Command Buffer Object WebGL demo; Refresh; Verify successful refresh. Review URL: http://codereview.chromium.org/7301010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91747 0039d316-1c4b-4281-b951-d872f2087c98
* Delete GpuVideoService and move GpuVideoDecodeAccelerator ownership to stubsvrk@google.com2011-07-073-28/+10
| | | | | | | | | | | | This CL divvies up the GpuVideoService functionality among the relevant classes. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7292010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91742 0039d316-1c4b-4281-b951-d872f2087c98
* Change audio renderer to communicate with host using low latency codepath.enal@chromium.org2011-07-073-31/+188
| | | | | | | | | | | | | | | | | | | | | | I.e. now host signals that it is ready to accept new data using sockets, not IPC messages. That should reduce audio latency. Right now we are using high latency code path by default, low latency would be used only when flag --enable-low-latency-audio is specified. Changed unit tests to test low latency code path, as it should become default soon. http://codereview.chromium.org/7253003 BUG=http://code.google.com/p/chromium/issues/detail?id=87640 TEST=Everything should just work. I changed audio_renderer_impl_unittest.cc to explicitly force low latency code path. Review URL: http://codereview.chromium.org/7253003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91727 0039d316-1c4b-4281-b951-d872f2087c98
* The RTCVideoDecoder will eventially need to depend on third_party lib ↵wjia@chromium.org2011-07-074-0/+550
| | | | | | | | | | | | (webrtc, libjinle etc), which is not allowed in media. So move rtc_video_decoder* from media/filter/ to content/renderer/media/. patch by ronghuawu@google.com BUG=none TEST=unit_tests, media_unittests Review URL: http://codereview.chromium.org/7193001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91721 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 91390 (build breakage) - Convert ViewMsg_NetworkStateChanged from ↵adamk@google.com2011-07-024-9/+8
| | | | | | | | | | | | | | | | | | | | routed -> control allowing it to be sent from BrowserRenderProcessHost::OnProcessLaunched and minimizing the number of required IPCs (since the online state is a per-WebKit singleton). In doing so, I've disentangled online state management from TabContents: it now resides off by itself in BrowserOnlineStateObserver, a tiny class owned by BrowserProcessImpl. BUG=7469,86538 TEST=begin with network disconnected, open new tab, load test page attached to 7469, then re-connect network Review URL: http://codereview.chromium.org/7259004 TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/7300018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91392 0039d316-1c4b-4281-b951-d872f2087c98
* Convert ViewMsg_NetworkStateChanged from routed -> controladamk@google.com2011-07-014-8/+9
| | | | | | | | | | | | | | | allowing it to be sent from BrowserRenderProcessHost::OnProcessLaunched and minimizing the number of required IPCs (since the online state is a per-WebKit singleton). In doing so, I've disentangled online state management from TabContents: it now resides off by itself in BrowserOnlineStateObserver, a tiny class owned by BrowserProcessImpl. BUG=7469,86538 TEST=begin with network disconnected, open new tab, load test page attached to 7469, then re-connect network Review URL: http://codereview.chromium.org/7259004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91390 0039d316-1c4b-4281-b951-d872f2087c98
* Printing: Pass the context menu WebNode to WebFrame::executeCommand, as thejhawkins@chromium.org2011-06-291-1/+2
| | | | | | | | | | | | | | | | node may be an embedded plugin not contained in a WebPluginDocument (and thus not able to be copied from). Depends on WebKit r89939. BUG=84511 TEST=none R=darin@chromium.org Review URL: http://codereview.chromium.org/7280001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91033 0039d316-1c4b-4281-b951-d872f2087c98
* Implement proper synchronization between HW video decode IPC and CommandBuffer.fischman@chromium.org2011-06-299-159/+189
| | | | | | | | | | | | | | | | | This is done by inserting tokens into the command-buffer stream when synchronization is needed, and adding a last-read/last-written token pair to each IPC message. This allowed me to remove the bogus FinishGL() calls from the gles2 sample pepper plugin. As part of this CL, the return value for VideoDecodeAccelerator::{Decode,Flush,Abort} changed from bool to void. These are all async methods so errors ought to be signaled using callbacks. BUG=none TEST=gles2 works, no crashes; trybots Review URL: http://codereview.chromium.org/7260008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90971 0039d316-1c4b-4281-b951-d872f2087c98
* Make all content client interfaces pure virtual.joi@chromium.org2011-06-294-120/+183
| | | | | | | | | BUG=87332 TEST=existing Review URL: http://codereview.chromium.org/7242016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90910 0039d316-1c4b-4281-b951-d872f2087c98
* File upload API in chromedriverhnoda@google.com2011-06-281-0/+2
| | | | | | | | | | | | Added support for file upload API in /session/:sessionId/element/:id/value. If the given element is a file upload control, the file paths are set to the file upload control using drag and drop emulation. BUG=none TEST=none Review URL: http://codereview.chromium.org/7055004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90785 0039d316-1c4b-4281-b951-d872f2087c98
* MediaStreamDispatcher perkj@google.com2011-06-284-0/+493
| | | | | | | | | | | | | This is the second Chromium patch needed to support media streams http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication. The first patch is here http://codereview.chromium.org/7192007/. The patch contain types needed in both the render and browser process and MediaStreamDispatcher that is used for sending request from the render process to the browser process for granting a webpage access to audio input and video capture devices. BUG=none TEST=none Review URL: http://codereview.chromium.org/7184010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90752 0039d316-1c4b-4281-b951-d872f2087c98