summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppapi_command_buffer_proxy.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace context parenting by sharing through mailboxespiman@chromium.org2013-06-051-5/+1
| | | | | | | | | | | | | | Instead of tying contexts together through the parenting mechanism, we can allow the client to produce the front buffer of an offscreen context into a mailbox, and use that in the "parent" context. It simplifies the code and the semantics wrt lost contexts, and we want to use mailboxes anyway. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/15798014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204194 0039d316-1c4b-4281-b951-d872f2087c98
* pepper: simplify context creation/initializationpiman@chromium.org2013-05-311-2/+1
| | | | | | | | | | | | | | | This saves a round-trip. We don't need client-side info (e.g. shm buffer) any more before context initialization, so we can do the initialization completely on the renderer side before returning the resource, saving one sync round-trip. A side benefit is that now we can guarantee we only call SetParent after initialization, simplifying transient states. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/15679013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203464 0039d316-1c4b-4281-b951-d872f2087c98
* Move InsertSyncPoint to GLES2Interfacepiman@chromium.org2013-03-081-0/+9
| | | | | | | | | | | | This is needed to allow Pepper to use mailboxes rather than parenting to integrate with the compositor. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/12581004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186869 0039d316-1c4b-4281-b951-d872f2087c98
* Add CommandBuffer::GetLastTokengman@chromium.org2013-01-251-0/+6
| | | | | | | | | | | | | | GetLastToken is potentially more up to date then GetLastState().token but is also potentially slower. Functions that need to know the last token can call GetLastToken. Functions that need to know error/get will still call GetLastState BUG=none Review URL: https://chromiumcodereview.appspot.com/12040090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178763 0039d316-1c4b-4281-b951-d872f2087c98
* Made the registration and deletion of transfer buffers async.apatrick@chromium.org2012-12-211-18/+14
| | | | | | | | | | | | | | Added a thread safe way to duplicate a shared memory handle for the GPU process. Removed synchronous IPC to set the command buffer shared state buffer. Removed CreateTransferBuffer IPC. Removed request_id arg from transfer buffer IPCs. It wasn't being used. BUG=166229 Review URL: https://chromiumcodereview.appspot.com/11640008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 172805apatrick@google.com2012-12-141-14/+18
| | | | | | | | | | | | | | | | | > Made the registration and deletion of transfer buffers async. > > Added an IPC to request multiple transfer buffer IDs up front. > > Every renderer command buffer proxy gets some IPCs immediately after initialization. > > Removed request_id arg from CreateTransferBuffer. It wasn't being used. > > Review URL: https://chromiumcodereview.appspot.com/11308296 TBR=apatrick@chromium.org Review URL: https://codereview.chromium.org/11578020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173018 0039d316-1c4b-4281-b951-d872f2087c98
* Made the registration and deletion of transfer buffers async.apatrick@chromium.org2012-12-131-18/+14
| | | | | | | | | | | | Added an IPC to request multiple transfer buffer IDs up front. Every renderer command buffer proxy gets some IPCs immediately after initialization. Removed request_id arg from CreateTransferBuffer. It wasn't being used. Review URL: https://chromiumcodereview.appspot.com/11308296 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172805 0039d316-1c4b-4281-b951-d872f2087c98
* Fix layering violation where content is included by gpu.ccameron@chromium.org2012-10-281-46/+0
| | | | | | | | | | | | | Make WebGraphicsContext3DCommandBufferImpl aways use CommandBufferProxyImpl instead of the more abstract CommandBufferProxy. Then remove methods used only by WebGraphicsContext3DCommandBufferImpl from CommandBufferProxy. BUG=157175 Review URL: https://chromiumcodereview.appspot.com/11267035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164564 0039d316-1c4b-4281-b951-d872f2087c98
* Don't crash when destoying transfer buffer that isn't mapped.jbauman@chromium.org2012-10-251-4/+5
| | | | | | | | | | | | It's possible GetTransferBuffer was never called, or that it failed due to a GPU process crash, so don't crash when the transfer buffer isn't in the cache. BUG=https://code.google.com/p/chrome-os-partner/issues/detail?id=14476 Review URL: https://chromiumcodereview.appspot.com/11270036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164174 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of code in content\common (as well as a few left in renderer) ↵jam@chromium.org2012-10-221-2/+2
| | | | | | | | to the content namespace. Review URL: https://codereview.chromium.org/11227033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163359 0039d316-1c4b-4281-b951-d872f2087c98
* Put locks around PPB_Graphics3d.nfullagar@chromium.org2012-10-151-0/+2
| | | | | | | | | | | | | | | | | This CL was inherited from dmichael's CL: PPAPI: Lock around GLES2 entry in to the proxy This might not cover all the ways 3D could go wrong in a multithreaded situation (I don't understand it well enough to know). It also probably locks a bit more than is necessary. But so far it works, and makes Var reference counting (and pretty much everything else) usable on background threads. Probably good enough for M23 experimentation. http://codereview.chromium.org/10960046/ BUG=116317, 92909 TEST=build with enable_pepper_threading=1. PPAPI 3D example works. Zombie Track Meat, Tumbler, and other 3d stuff works in the NaCl IPC proxy. Review URL: https://chromiumcodereview.appspot.com/11054024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161956 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generallydmichael@chromium.org2012-08-271-6/+8
| | | | | | | | | | | | | | | | | This does a couple of things: - It defines a new wrapper for passing any kind of handle through the PPAPI proxy (SerializedHandle). - It updates nacl_ipc_adapter to have a more general way to pick apart messages based on their static types (which include the types of all the params). - It adds support for PPB_Graphics2D and PPB_Graphics3D to the NaCl IPC proxy (e.g., NaCl SDK examples pi_generator and tumbler work in the new proxy with this patch). The downside is it requires pulling parts of ppapi/shared_impl and ppapi/proxy in to the NaCl Win64 build. BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10828023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153531 0039d316-1c4b-4281-b951-d872f2087c98
* gpu: add SignalSyncPoint to complement WaitSyncPointpiman@chromium.org2012-06-191-0/+6
| | | | | | | | | | BUG=112299 TEST=None Review URL: https://chromiumcodereview.appspot.com/10541185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142869 0039d316-1c4b-4281-b951-d872f2087c98
* GPU: Adding sync points for cross-channel synchronizationpiman@chromium.org2012-06-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Theory of operation: command buffer 1 calls InsertSyncPoint, it returns an ID, command buffer 2 calls WaitSyncPoint on that ID (even if on another channel). The wait is pipelined. InsertSyncPoint is handled on the IO thread in the GPU process, so it's presumably fast, but its effect is ordered wrt the other messages. Some benefits of the approach: - once InsertSyncPoint returns the ID, the sync point is already enqueued to be eventually retired, so it makes it very hard to cause deadlocks by incorrect operation on the client side. - the wait will return if the command buffer that inserted the sync point gets destroyed. This primitive should be enough for guaranteeing browser->renderer ordering. Additional changes are needed to safely handle renderer->browser ordering (especially in case of buggy/malicious renderer). BUG=112299 TEST=manual (With other patches) Review URL: https://chromiumcodereview.appspot.com/10510013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140653 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Fixed silly typo in PpapiCommandBufferProxy.fsamuel@chromium.org2012-05-221-1/+2
| | | | | | | | | | | | | Accidiently had the wrong number of brackets which did not produce the desired behavior while iterating over previous issue 10387182. This change makes it do the right thing. BUG=none TEST=manually Review URL: https://chromiumcodereview.appspot.com/10421007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138374 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: PpapiCommandBufferProxy should see a lost context if the ↵fsamuel@chromium.org2012-05-191-7/+15
| | | | | | | | | | | | | | | | | | embedder has deleted the PluginInstance In cross-process navigation we swap out PluginInstances and delete the swapped out instance. PpapiCommandBufferProxy is sitting in WebGraphicsContext3DCommandBufferImpl, and is unaware of the destruction. It attempts to talk to the embedder to flush over and over again and hangs the guest renderer. With this change, the renderer's compositor will realize that the context is lost, and will drop it. BUG=none TEST=manually. Review URL: https://chromiumcodereview.appspot.com/10387182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137981 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NOTIMPLEMENTED() from PpapiCommandBufferProxy::Echo because it's toofsamuel@chromium.org2012-05-101-1/+0
| | | | | | | | | | | | spammy when in use with the browser plugin. BUG=none TEST=manually Review URL: https://chromiumcodereview.appspot.com/10384065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136213 0039d316-1c4b-4281-b951-d872f2087c98
* PpapiCommandBufferProxy implements CommandBufferProxy.fsamuel@chromium.org2012-04-021-5/+55
| | | | | | | | | | | | | That way once the refactoring of WebGraphicsContext3DCommandBufferImpl is complete, the guest renderers will be able to use the same class. BUG=120664 TEST=manually Review URL: http://codereview.chromium.org/9904005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130252 0039d316-1c4b-4281-b951-d872f2087c98
* Updated PpapiCommandBufferProxy to take a ChannelError callback (same ↵fsamuel@chromium.org2012-03-281-0/+12
| | | | | | | | | | | | | | | | signature as CommandBufferProxy). Added a ReportChannelError method to call the closure. This is used by the guest renderer to recover from a lost context. BUG=120664 TEST=manually Review URL: http://codereview.chromium.org/9844023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129526 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out the command buffer implementation in ppb_graphics_3d_proxy so ↵fsamuel@chromium.org2012-03-081-0/+210
that it is more general (does not depend on a dispatcher) and can be used elsewhere. BUG=none TEST=manually Review URL: http://codereview.chromium.org/9420028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125596 0039d316-1c4b-4281-b951-d872f2087c98