summaryrefslogtreecommitdiffstats
path: root/o3d
Commit message (Collapse)AuthorAgeFilesLines
* O2D:tschmelcher@chromium.org2010-11-196-85/+113
| | | | | | | | | | | | | | | - Save textures in memory rather than reading them directly from the SetRect() source, which is an unsafe hack. This fixes a crash when a texture was painted after the shared memory was unregistered, or if a texture was painted that was created from a static image downloaded from the net. This is a perf regression due to the extra copy, but we can add a special shared memory texture class later. This also regresses the functionality because SetRect() updates only a portion of the texture but RendererCairo paints the entire texture. An upcoming CL will add an API to define the region to paint. - Remove unused weak pointer tracker from Layer class. - Create textures of the requested image format rather than hard-coding ARGB8, and fail for formats not supported by Cairo. - Fix a couple crashes caused by missing refcounts. - Fix crash when trying to render a Layer that has no assigned texture. TEST=loaded O2D many times BUG=none Review URL: http://codereview.chromium.org/5134005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66807 0039d316-1c4b-4281-b951-d872f2087c98
* Bump O3D version (before integrate into ChromeOS)zhurunz@google.com2010-11-171-1/+1
| | | | | | Review URL: http://codereview.chromium.org/5147002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66523 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash in Chrome where the value of location.href is sometimes a "void" ↵tschmelcher@chromium.org2010-11-171-33/+58
| | | | | | | | | | | | | NPVariant instead of a string, causing us to construct a std::string from an invalid pointer and length. This may have previously been "hidden" by a coincidence of stack layout that made the uninitialized length be 0, but it is now very reproducible. Also fix a leaked ref count on the location object. TEST=repro'ed the void location.href issue in Chrome 8.0.552.200 on Windows and verified no crash BUG=none Review URL: http://codereview.chromium.org/5092005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66522 0039d316-1c4b-4281-b951-d872f2087c98
* - Check for a NULL PluginObject at all NPAPI entry points. This fixes a ↵tschmelcher@chromium.org2010-11-176-462/+453
| | | | | | | | | | | | | crash in Chrome where the browser foolishly calls NPP_SetWindow with instance->pdata == NULL. - Factor out obscene amounts of redundancy from main_<platform>.(cc|mm) into main.cc. This makes no change to the functionality, except that NP_Initialize on Linux now has HANDLE_CRASHES whereas before it did not. TEST=built on Linux, Mac, and Windows; installed and loaded O3D on each platform and made sure it worked; repeatedly loaded on Mac & Win in Chrome 8.0.552.200 and verified no crashes; inspected "svn diff" output manually and verified that the code and order of execution of that code is unchanded for each platform BUG=none Review URL: http://codereview.chromium.org/4957002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66344 0039d316-1c4b-4281-b951-d872f2087c98
* Allows one mousemove event per N ticks.zhurunz@google.com2010-11-052-0/+22
| | | | | | Review URL: http://codereview.chromium.org/4592001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65266 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt at fixing leaks from SetProp. Apparently there is a finitesky@chromium.org2010-11-012-0/+2
| | | | | | | | | | | | | | | | | | amount of memory reserved for properties and Windows doesn't always automatically free up the memory if the window is deleted without an explicit remove. For the time being I've made it easier to track SetProp leaks, but we may want to move to using something other than SetProp in the future that isn't as fragile. I didn't fix a couple of places that were trickier. I'm going to file separate bugs on them. BUG=44991 TEST=none Review URL: http://codereview.chromium.org/4195003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64619 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Update DEPS to pick up statically linked libGLEW.tschmelcher@chromium.org2010-10-223-6/+25
| | | | | | | | | BUG=none TEST=built and ran O3D on Linux (64-bit) Review URL: http://codereview.chromium.org/3978003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63452 0039d316-1c4b-4281-b951-d872f2087c98
* Cut some obsolete dependencies from O3D: scons, grit, and data_pack.tschmelcher@chromium.org2010-10-213-844/+0
| | | | | | | | | BUG=none TEST=built on Linux; Win & Mac trybots Review URL: http://codereview.chromium.org/4014004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63443 0039d316-1c4b-4281-b951-d872f2087c98
* Fix GCC 4.3.4 Release build failure due to warning about potentially ↵tschmelcher@chromium.org2010-10-191-12/+10
| | | | | | | | | | | uninitialized variable. (It's actually guaranteed to be initialized, but the code made that hard for the compiler to infer.) TEST=built on Linux with GCC 4.3.4 BUG=none Review URL: http://codereview.chromium.org/3750019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62994 0039d316-1c4b-4281-b951-d872f2087c98
* Override the ANTLR NFA conversion timeout to fix non-deterministic build ↵tschmelcher@chromium.org2010-10-181-0/+1
| | | | | | | | | | | | | failures on slow or heavily loaded machines (specifically the Windows build slaves). The default is 1 second, which is too low for our grammar. 30 seconds should be plenty. See http://www.antlr.org/pipermail/antlr-interest/2009-September/035955.html BUG=none TEST=built on my Linux workstation with timeout of 150ms and verified that it reproduces the same error as seen on the Windows build slaves, then changed to 30000 and verified the problem goes away Review URL: http://codereview.chromium.org/3784007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62985 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash on Linux when run by nspluginwrapper due to mismatched width for ↵tschmelcher@chromium.org2010-10-181-4/+9
| | | | | | | | | | | NPAPI booleans. BUG=none TEST=ran O3D on Linux with nspluginwrapper Review URL: http://codereview.chromium.org/3801007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62970 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate new nixysa rev with work around for Safari 5.0+ crash.tschmelcher@chromium.org2010-10-184-19/+17
| | | | | | | | | | | | Also ensures all NPN_PluginThreadAsyncCall() uses are guarded by IsPluginThreadAsyncCallSupported(). Also fix-up indenting in o3d_layer.mm. BUG=none TEST=repeated loading of O3D in Safari 5.0.2 on Mac Review URL: http://codereview.chromium.org/3677002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62969 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: Fix closure compiler errors.pathorn@chromium.org2010-10-153-2/+3
| | | | | | Review URL: http://codereview.chromium.org/3769001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62680 0039d316-1c4b-4281-b951-d872f2087c98
* Multiple simple lights, and a new demo.pathorn@chromium.org2010-09-295-54/+544
| | | | | | Review URL: http://codereview.chromium.org/3358020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60900 0039d316-1c4b-4281-b951-d872f2087c98
* Bump version before I snapshot into ChromeOS.zhurunz@google.com2010-09-241-1/+1
| | | | | | Review URL: http://codereview.chromium.org/3479015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60542 0039d316-1c4b-4281-b951-d872f2087c98
* Fix fullscreen on ChromeOS.zhurunz@google.com2010-09-241-1/+2
| | | | | | Review URL: http://codereview.chromium.org/3386029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60535 0039d316-1c4b-4281-b951-d872f2087c98
* Changed code to eliminate ibeam cursor to only affect the canvas itself (not ↵petersont@google.com2010-09-221-25/+70
| | | | | | | | the whole document) and made option to leave ibeam cursor alone part of a new options argument to o3djs.webgl.makeClients / o3djs.webgl.createClients which replaces opt_features (which wasn't doing anything in o3d-webgl anway) and contains options on the client itself. Review URL: http://codereview.chromium.org/3358002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60219 0039d316-1c4b-4281-b951-d872f2087c98
* Further integration of 2D mode. This change supports calltype=v, ↵fransiskusx@google.com2010-09-1713-57/+484
| | | | | | | | | | | | | transparancy, and image transformation. Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/3315023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59811 0039d316-1c4b-4281-b951-d872f2087c98
* Tidied up types to appease doc generator script for new version of ↵petersont@google.com2010-09-165-198/+207
| | | | | | | | o3djs/math.js. I think this should also fix the currently broken tree. Review URL: http://codereview.chromium.org/3443007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59745 0039d316-1c4b-4281-b951-d872f2087c98
* Prevents changing the stored tab handle at switching tabs. This fixes a bug ↵geer@google.com2010-09-163-8/+10
| | | | | | | | | | where O3D would keep rendering on another tab in Safari on OSX 10.5.8. When the area had been clicked before switching tabs, a lost focus event just before switching would reset the stored handle to the new, non-O3D tab. Also fixes the tab detection after the o3d page has been dragged to another window. Review URL: http://codereview.chromium.org/3317018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59628 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: Recommit effect.js for skinning shader.pathorn@chromium.org2010-09-152-9/+86
| | | | | | | | Also fixes skinning error in FF4 when getParameter(MAX_VERTEX_UNIFORM_VECTORS) gives GL_INVALID_ENUM. Review URL: http://codereview.chromium.org/3348006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59469 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: usePluginMath should be false, only set if o3djs.math is defined.pathorn@chromium.org2010-09-141-8/+8
| | | | | | | TBR=petersont Review URL: http://codereview.chromium.org/3411002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59332 0039d316-1c4b-4281-b951-d872f2087c98
* Replaces matrix math functions in o3d-webgl with a new library that uses ↵petersont@google.com2010-09-1325-2053/+5513
| | | | | | | | | | 1-dimensional arrays to represent matrices instead of 2-dimensional arrays. This is a duplicate of Daniel Horn's change http://codereview.chromium.org/3072008 for committal. Review URL: http://codereview.chromium.org/3273004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59268 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58946 - Further integration of 2D mode. This change supports ↵fbarchard@chromium.org2010-09-0913-478/+64
| | | | | | | | | | | | | | | | calltype=v, transparancy, and image transformation. Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/3272003 TBR=fransiskusx@google.com Review URL: http://codereview.chromium.org/3366019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58988 0039d316-1c4b-4281-b951-d872f2087c98
* Further integration of 2D mode. This change supports calltype=v, ↵fransiskusx@google.com2010-09-0913-64/+478
| | | | | | | | | | | | | transparancy, and image transformation. Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/3272003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58946 0039d316-1c4b-4281-b951-d872f2087c98
* Second try at adding conditional for fixing mac gtv-o3d targets.thaloun@google.com2010-09-031-2/+5
| | | | | | | | BUG="" TESTED= Review URL: http://codereview.chromium.org/3326012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58552 0039d316-1c4b-4281-b951-d872f2087c98
* Roll back Issue 3322012 (revision 58540). Built locally but fails on the ↵thaloun@google.com2010-09-031-2/+2
| | | | | | | | server. Review URL: http://codereview.chromium.org/3327010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58542 0039d316-1c4b-4281-b951-d872f2087c98
* Potentially o3d mac-gtv targets. When I kick off try runs I get unrelated ↵thaloun@google.com2010-09-031-2/+2
| | | | | | | | | | failures, unfortunately so I haven't been able to test. BUG=none TEST=none Review URL: http://codereview.chromium.org/3322012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58540 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the process' default directory for the logfile. Use the temp ↵thaloun@google.com2010-09-033-3/+21
| | | | | | | | | | directory instead. Sending now, while I set up my windows build to test across a couple platforms. Review URL: http://codereview.chromium.org/3303006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58501 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Assume 4 in case Float32Array is missing BYTES_PER_ELEMENT.pathorn@chromium.org2010-09-031-1/+2
| | | | | | | | BUG=233 TEST=Examples which use primitives work in FF4b4 Review URL: http://codereview.chromium.org/3349004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58462 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes the build for o3d.gman@chromium.org2010-08-313-2/+3
| | | | | | | | | TEST=it builds BUG=none Review URL: http://codereview.chromium.org/3217016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58073 0039d316-1c4b-4281-b951-d872f2087c98
* This is a change that Daniel Horn did as part of this: petersont@google.com2010-08-291-34/+25
| | | | | | | | | | http://codereview.chromium.org/3072008 I don't see why it can't be a separate, short changelist. Review URL: http://codereview.chromium.org/3215005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57810 0039d316-1c4b-4281-b951-d872f2087c98
* Added createDrawElements to Transform class. One more function in the API.petersont@google.com2010-08-291-2/+10
| | | | | | Review URL: http://codereview.chromium.org/3167046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57809 0039d316-1c4b-4281-b951-d872f2087c98
* Added capability for an error (default) cube map texture, so if a cube ↵petersont@google.com2010-08-297-121/+308
| | | | | | | | sampler doesn't have a texture associated with it, it doesn't choke WebGL. Review URL: http://codereview.chromium.org/3162048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57808 0039d316-1c4b-4281-b951-d872f2087c98
* Determines which shading language o3djs should use once when the client is ↵petersont@google.com2010-08-297-395/+137
| | | | | | | | installed, sets things appropriately in effect.js and other files which generate shaders appeal to effect.js to determine how to generate the right shader. Review URL: http://codereview.chromium.org/3166038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57807 0039d316-1c4b-4281-b951-d872f2087c98
* When the client is created, it sets a couple event callbacks to an empty ↵petersont@google.com2010-08-291-0/+8
| | | | | | | | function so that when you click and drag on the HTML canvas, it doesn't act like you're selecting text. Review URL: http://codereview.chromium.org/3106029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57806 0039d316-1c4b-4281-b951-d872f2087c98
* Added getter for field params on param object. (Just one more function in ↵petersont@google.com2010-08-291-0/+11
| | | | | | | | the API that got left behind) Review URL: http://codereview.chromium.org/3108052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57803 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a few minor issues.gman@chromium.org2010-08-271-5/+10
| | | | | | | | | | | | | | | | | | | | 1 is that Client objects are added to the global list of clients before they are ready. I just added a check that they are ready with if (this.gl) although we could change the code so they don't get added in the constructor but instead in initWithCanvas. Also added "webgl" as a context name. TEST=none BUG=none Review URL: http://codereview.chromium.org/3164044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57613 0039d316-1c4b-4281-b951-d872f2087c98
* Change the URL for when there is no WebGLgman@chromium.org2010-08-263-31/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an "official" url now. Over time it is supposed to be updated to auto redirect depending on the browser so Firefox would redirect to a Firefox upgrade page, Safari to a Safari upgrade page etc.. Also, make o3d-webgl run in IE6/7/8/9 at least to the point that it comes up with the message to get a browser that supports WebGL Also also note: There a 3 or more cases that need to be covered for WebGL apps Case #1: canvas doesn't exist at all. (IE6/7/8) Case #2: canvas does exist but there's no WebGL Case #3: canvas does exist, WebGL exists and should run but can't. (ie, don't tell the user to get new browser in this case) WebGL is being updated to give info so case #3 can be handled so we can update o3d-webgl when that's available. TEST=none BUG=none Review URL: http://codereview.chromium.org/3204014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57603 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Shader support for skinning.pathorn@chromium.org2010-08-1810-45/+469
| | | | | | | | | | Requires setting skinning in properly in o3djs/effect.js BUG=none TEST=o3d-webgl-samples/skinning.html runs much faster. Review URL: http://codereview.chromium.org/2873071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56558 0039d316-1c4b-4281-b951-d872f2087c98
* Whitespace to trigger bots one more time...bradnelson@google.com2010-08-181-0/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56551 0039d316-1c4b-4281-b951-d872f2087c98
* Another whitespace change to trigger the o3d bots....bradnelson@google.com2010-08-181-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56467 0039d316-1c4b-4281-b951-d872f2087c98
* Whitespace to trigger the bots.... (o3d only)bradnelson@google.com2010-08-181-0/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56464 0039d316-1c4b-4281-b951-d872f2087c98
* Converted o3d to use new types for floating point and integer arrays: ↵petersont@google.com2010-08-173-12/+9
| | | | | | | | Float32Array, Uint16Array et cetera. Review URL: http://codereview.chromium.org/3184007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56453 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: vangelispiman@chromium.org2010-08-171-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56285 0039d316-1c4b-4281-b951-d872f2087c98
* o3d: Use nacl from o3d codesitepiman@chromium.org2010-08-161-3/+2
| | | | | | Review URL: http://codereview.chromium.org/3150001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56221 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adding preliminary files for 'bubble blaster' demo.luchen@chromium.org2010-08-1313-0/+1735
| | | | | | Review URL: http://codereview.chromium.org/3123017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56110 0039d316-1c4b-4281-b951-d872f2087c98
* o3d: gles2/desktop_gl: use ARB_shader_objects/ARB_vertex_shader functions ↵piman@chromium.org2010-08-131-0/+61
| | | | | | | | | | instead of the GL2 ones This is to support GL drivers that are 1.4+ARB_so/ARB_vs, like i915 linux drivers (with mesa's glsl2 branch). Tested on NVIDIA (it works), and i915 experimental driver (it doesn't crash but geometry isn't rendered). Review URL: http://codereview.chromium.org/3162006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56077 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/3164012luchen@chromium.org2010-08-134-44/+111
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56071 0039d316-1c4b-4281-b951-d872f2087c98
* Adding implementations to two methods in texture.js and fixing a small typo/bug.luchen@chromium.org2010-08-121-32/+96
| | | | | | | I hacked two of the existing demos as a test to ensure the two new methods work (adding a small chunk of new code to them). Should these be included as brand new demos, or added to the existing demo (with a var doExtra = true/false switch), or should I try to make a brand new demo that exercises these methods? Review URL: http://codereview.chromium.org/3129010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55954 0039d316-1c4b-4281-b951-d872f2087c98