summaryrefslogtreecommitdiffstats
path: root/o3d/gpu_plugin/command_buffer.cc
Commit message (Collapse)AuthorAgeFilesLines
* Changed O3D to use CommandBuffer in-process. Still not connecting to the GPU ↵apatrick@google.com2009-10-191-0/+6
| | | | | | | | | | | | | | | | | | | | | plugin. I removed all the NaCl dependencies. Synchronous messages are now sent by NPAPI. Removed BufferSyncInterface and replaced it with CommandBuffer. CommandBufferHelper now uses NPAPI. Changed some unsigned ints to int32s because NPAPI doesn't support unsigned int. There are now two subclasses of RendererCB. RendererCBLocal is for use with an in-process CommandBuffer. RendererCBRemote is for use with an out-of-process CommandBuffer. I'm going to rearrange the locations of the source files under gpu_plugin next. CommandBuffer and GPUProcessor probably belong in the command_buffer_service library now. np_utils and system_services should be standalone libraries. TEST=none BUG=none Review URL: http://codereview.chromium.org/266068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29429 0039d316-1c4b-4281-b951-d872f2087c98
* Moved responsibility for creating ring buffer from CommandBuffer to ↵apatrick@google.com2009-10-131-25/+8
| | | | | | | | | | | GPUPluginObject. TEST=none BUG=none Review URL: http://codereview.chromium.org/264041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28858 0039d316-1c4b-4281-b951-d872f2087c98
* Replaced SharedMemory::Map method with NPN_MapMemory.apatrick@google.com2009-10-021-15/+5
| | | | | | | | | | | | | Moved responsibility for mapping ring buffer into GPUProcessor. Removed SharedMemory::SetInt32 and SetFloat. Implemented GetWindowNPObject in WebKitNHPBrowser. TEST=none BUG=none Review URL: http://codereview.chromium.org/246069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27867 0039d316-1c4b-4281-b951-d872f2087c98
* GPUProcessor uses O3D command buffer service to render to a window.apatrick@google.com2009-09-241-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added libraries that contain a subset of the O3D command buffer code independent on NaCl. Extracted Upcall interface from CommandBufferEngine. Now this works in JavaScript to clear the GPU plugin element to a random color: // BEGIN_FRAME sharedMemory.setInt32(putOffset++, 0x00000201); // CLEAR sharedMemory.setInt32(putOffset++, 0x00000408); sharedMemory.setInt32(putOffset++, 7); sharedMemory.setFloat(putOffset++, Math.random()); sharedMemory.setFloat(putOffset++, Math.random()); sharedMemory.setFloat(putOffset++, Math.random()); sharedMemory.setFloat(putOffset++, 1); sharedMemory.setFloat(putOffset++, 0.5); sharedMemory.setInt32(putOffset++, 0); // END_FRAME sharedMemory.setInt32(putOffset++, 0x00000301); TEST=none BUG=none Review URL: http://codereview.chromium.org/234001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27098 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for getting and setting the CommandBuffer token and error.apatrick@google.com2009-09-221-1/+9
| | | | | | | | | | | See o3d/command_buffer/service/cross/cmd_buffer_engine.h. TEST=none BUG=none Review URL: http://codereview.chromium.org/207061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26871 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for registering additional shared memory objects (textures and ↵apatrick@google.com2009-09-221-1/+56
| | | | | | | | | | | buffers etc) with the CommandBuffer. TEST=none BUG=none Review URL: http://codereview.chromium.org/216043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26857 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented get and put offset synchronization via NPObject interface in GPU ↵apatrick@google.com2009-09-211-4/+36
| | | | | | | | | | | | plugin CommandBuffer. Added GPUProcessor which handles commands (currently 4-byte "colors") put into the command buffer. TEST=none BUG=none Review URL: http://codereview.chromium.org/203003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26762 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented shared memory as an NPObject. Using NPObject method to expose ↵apatrick@google.com2009-09-091-11/+15
| | | | | | | | | | | | mapping function rather than NPAPI change. Note that shared memory objects currently lose identity when they cross a process boundary. If an object is sent across a boundary and back, there are now two objects representing the same handle in a single process. This can be fixed. TEST=none BUG=none Review URL: http://codereview.chromium.org/194049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25749 0039d316-1c4b-4281-b951-d872f2087c98
* Replaced BaseNPObject with DefaultNPObject because...apatrick@google.com2009-09-081-7/+7
| | | | | | | | | | | | | | DefaultNPObject can derive from bases other than NPObject, allowing concrete NPObjects to choose their own NPObject subclass. DefaultNPObject does not rely on virtual functions. See change to NPGetClass in np_class.h. Removed count() from MockNPObject because I discovered gmock checks that no mock objects exist after a test completes anyway. TEST=none BUG=none Review URL: http://codereview.chromium.org/196032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25632 0039d316-1c4b-4281-b951-d872f2087c98
* Exracted CommandBuffer class from GPUPluginObject.apatrick@google.com2009-09-031-0/+65
TEST=none BUG=none Review URL: http://codereview.chromium.org/200005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25348 0039d316-1c4b-4281-b951-d872f2087c98