summaryrefslogtreecommitdiffstats
path: root/o3d/gpu_plugin
Commit message (Collapse)AuthorAgeFilesLines
* Recomitting 31676 with fix.apatrick@google.com2009-11-1148-5858/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31692 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 31676.apatrick@google.com2009-11-1148-0/+5858
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31682 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganized command buffer and GPU plugin code into following structure:apatrick@google.com2009-11-1148-5858/+0
| | | | | | | | | | | | gpu/gpu.gyp gpu/command_buffer/... gpu/gpu_plugin/... gpu/np_utils/... And fixed up paths and header sentry macros. Also merged command_buffer.gyp into gpu.gyp. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31676 0039d316-1c4b-4281-b951-d872f2087c98
* Moved platform specific out of platform directories. This is the Chrome ↵apatrick@google.com2009-11-102-6/+6
| | | | | | | | convention. Review URL: http://codereview.chromium.org/372077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31570 0039d316-1c4b-4281-b951-d872f2087c98
* Switched from NPObject shared memory wrapper to Chrome shared memory in ↵apatrick@google.com2009-11-1022-544/+195
| | | | | | | | | | | preparation for moving from NPAPI to Chrome IPC for synchronous messages. Started work on an O3D configuration that will use Pepper 3D to connect to a remote GPU plugin. This is not building yet. Updated to latest NPAPI from nixysa. Review URL: http://codereview.chromium.org/371074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31519 0039d316-1c4b-4281-b951-d872f2087c98
* Moved command_buffer and gpu_plugin code out of o3d namespace.apatrick@google.com2009-11-0549-144/+46
| | | | | | | | | Changed header guard macros in preparation for move to Chrome gpu directory. Added svn:eol LF property. Review URL: http://codereview.chromium.org/375004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31171 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed gpu_plugin and added to o3d_all.gyp so it gets built on buildbot.apatrick@google.com2009-11-046-100/+63
| | | | | | Review URL: http://codereview.chromium.org/361012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31037 0039d316-1c4b-4281-b951-d872f2087c98
* Removed command_buffer dependency on vectormath (indirectly via core/types.h).apatrick@google.com2009-11-043-7/+1
| | | | | | | | Changed common.gypi to automatically select cb_service of d3d9 pr gl in chrome builds. Review URL: http://codereview.chromium.org/360018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30987 0039d316-1c4b-4281-b951-d872f2087c98
* GPUPluginObject has methods to query its current window size.apatrick@google.com2009-10-273-0/+96
| | | | | | | | | | GPUPluginObject sends event to client process when its window is resized. TEST=none BUG=none Review URL: http://codereview.chromium.org/344001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30223 0039d316-1c4b-4281-b951-d872f2087c98
* move all O3D specific command buffer stuff to command_buffer::o3dgman@google.com2009-10-262-6/+6
| | | | | | | | | namespace. That's so I can add command_buffer::xxx namespace for different command buffer. Review URL: http://codereview.chromium.org/332036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30118 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to get renderer=cb cb_service=gl to compilegman@google.com2009-10-223-11/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | again. I was working on spliting some of the command buffer code in preparation for GL command buffers so those changes are in there as well. I didn't realize the gl command buffers were broken. I'm planning on sharing some of the command buffer code and commands so I thought about making the command buffers into 2 parts. The first N (256?) commands are common commands. Noop, SetToken, Jump Gosub. Those will be handled by common code. After that come the O3D or GL command buffer commands. I'm not sure that's a good idea but there is a significant amount of code in managing tokens and parsing etc and it seems like it would be nice to share it until/if we delete the O3D command buffers. Note: You'll see that SetToken is hardcoded to 1. I plan to fix that in the next CL when I split the command into shared vs specific. Review URL: http://codereview.chromium.org/307043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29831 0039d316-1c4b-4281-b951-d872f2087c98
* Added CommandBuffer::GetStatus so remote processes can query whether the ↵apatrick@google.com2009-10-228-74/+246
| | | | | | | | | | | | | plugin has a window handle. Refactored GPUPluginObject so its CommandBuffer and GPUProcessor can be mocked. Added some new tests using these mock objects. TEST=none BUG=none Review URL: http://codereview.chromium.org/309005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29811 0039d316-1c4b-4281-b951-d872f2087c98
* Forgot to commit a file.apatrick@google.com2009-10-191-0/+8
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29456 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed gpu_plugin to build in the Chrome tree.apatrick@google.com2009-10-192-19/+19
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/302009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29455 0039d316-1c4b-4281-b951-d872f2087c98
* Changed O3D to use CommandBuffer in-process. Still not connecting to the GPU ↵apatrick@google.com2009-10-1910-207/+98
| | | | | | | | | | | | | | | | | | | | | 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-136-134/+164
| | | | | | | | | | | 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
* Separated CommandBuffer and GPUProcessor into separate static library so O3D ↵apatrick@google.com2009-10-121-32/+38
| | | | | | | | | | | can link against it in the interim. TEST=none BUG=none Review URL: http://codereview.chromium.org/255098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28740 0039d316-1c4b-4281-b951-d872f2087c98
* Add comments setting emacs and vim tab width and expansion variables.sgk@google.com2009-10-061-0/+6
| | | | | | | | BUG=none TEST=successful builds Review URL: http://codereview.chromium.org/256059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28089 0039d316-1c4b-4281-b951-d872f2087c98
* Replaced SharedMemory::Map method with NPN_MapMemory.apatrick@google.com2009-10-0225-324/+203
| | | | | | | | | | | | | 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
* Diabolic hackery to work around differing NPAPI headers and definitions ↵apatrick@google.com2009-09-2814-23/+53
| | | | | | | | | | | between Chromium and O3D. TEST=none BUG=none Review URL: http://codereview.chromium.org/242042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27430 0039d316-1c4b-4281-b951-d872f2087c98
* GPUProcessor uses NPN_PluginThreadAsyncCall to schedule future command ↵apatrick@google.com2009-09-257-6/+36
| | | | | | | | | | | | | processing instead of Chromium MessageLoop. Now it'll work in other browsers. TEST=none BUG=none Review URL: http://codereview.chromium.org/219041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27223 0039d316-1c4b-4281-b951-d872f2087c98
* GPUProcessor uses O3D command buffer service to render to a window.apatrick@google.com2009-09-2414-209/+650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-223-1/+64
| | | | | | | | | | | 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-224-3/+161
| | | | | | | | | | | 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-2116-46/+586
| | | | | | | | | | | | 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-0918-124/+546
| | | | | | | | | | | | 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-0827-657/+535
| | | | | | | | | | | | | | 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-039-120/+314
| | | | | | | | | 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
* Wrote tests for GPUPluginObject::OpenCommandBuffer.apatrick@google.com2009-09-0214-58/+498
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/188015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25244 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes for accidental early commit reviewed at URL below.apatrick@google.com2009-09-026-6/+91
| | | | | | | | | | http://codereview.chromium.org/177060 TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25203 0039d316-1c4b-4281-b951-d872f2087c98
* GPU plugin object can create a command buffer via a V8 extension in Chromium ↵apatrick@google.com2009-09-0235-962/+1707
| | | | | | | | | | | | and return it via NPAPI. Introduced NPBrowser class to abstract functions provided by browser to plugin, including Chromium extensions. NPBrowser is stubbed for tests. TEST=none BUG=none Review URL: http://codereview.chromium.org/177060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25135 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU plugin object, an NPObject to which a plugin instance's NPP calls ↵apatrick@google.com2009-08-2522-354/+1183
| | | | | | | | | | | are forwarded. TEST=none BUG=none Review URL: http://codereview.chromium.org/173386 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24364 0039d316-1c4b-4281-b951-d872f2087c98
* Added DispatchedNPObject.apatrick@google.com2009-08-2418-23/+1671
| | | | | | | | | | | | Automatically invokes member functions on C++ NPObjects for NPAPI methods. See comment in DispatchedNPObject. Utilities for invoking the methods of an NPAPI object using C++ typed arguments and return values. BUG=none TEST=none Review URL: http://codereview.chromium.org/173237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24177 0039d316-1c4b-4281-b951-d872f2087c98
* Added NPObjectBase, a base class for NPObject that forwards NPObject calls ↵apatrick@google.com2009-08-206-3/+489
| | | | | | | | | | | through to virtual functions in the subclass. BUG=none TEST=none Review URL: http://codereview.chromium.org/174180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23912 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU rendering plugin, an internal out-of-process plugin for rendering ↵apatrick@google.com2009-08-204-0/+230
3D graphics with the GPU. Does nothing at all yet. Only enabled if --enable-gpu-plugin is on the command line and only in Windows build. GPU plugin builds on Linux and Mac but is not functional or enabled yet. BUG=none TEST=none Review URL: http://codereview.chromium.org/174158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23874 0039d316-1c4b-4281-b951-d872f2087c98