summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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-221-3/+2
| | | | | | | | | 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
* 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-183-18/+16
| | | | | | | | | | | | 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
* 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
* Further integration of 2D mode. This change supports calltype=v, ↵fransiskusx@google.com2010-09-172-0/+83
| | | | | | | | | | | | | 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
* 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
* Revert 58946 - Further integration of 2D mode. This change supports ↵fbarchard@chromium.org2010-09-092-83/+0
| | | | | | | | | | | | | | | | 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-092-0/+83
| | | | | | | | | | | | | 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
* 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
* Deleting trailing spaces, add ending newline where missing to make lint ↵maf@chromium.org2010-08-063-6/+6
| | | | | | | | happy. Also delete some commented out CSS, etc. Review URL: http://codereview.chromium.org/3083012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55162 0039d316-1c4b-4281-b951-d872f2087c98
* Initial version rendering 2D path for O3D. This will eventually allow O3D ↵fransiskusx@google.com2010-08-051-0/+5
| | | | | | | | | | | | | | apps to fall back to 2D logic on systems without (working) GPUs. Incorporated 2D library Cairo to O3D. 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/2825074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55008 0039d316-1c4b-4281-b951-d872f2087c98
* Ported the Loop/Blinn shaders in samples/o3djs/gpu2d.js to GLSL to addkbr@google.com2010-07-241-0/+4
| | | | | | | | | | | | | | | | antialiasing support. Fixed build problems in GLES2 backend on Mac OS X. Tested updated gpu2d.js in Cg and GLSL versions of plugin. Note that multisampling must be turned on in order for the antialiasing to look good, and in particular O3D's Core Graphics and Core Animation backends on Mac OS X do not currently support this. BUG=none TEST=none TBR=apatrick,gman Review URL: http://codereview.chromium.org/2883038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53564 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Change the generation of the various templated metadata files to ↵tschmelcher@chromium.org2010-07-131-13/+23
| | | | | | | | | | | place them in SHARED_INTERMEDIATE_DIR (build\Debug\obj\global_intermediate) rather than generating them in-place. In-place generation was problematic because the MSVS GYP back-end is bad at re-generating files whose rules have changed (e.g., due to a change in a branding variable), so it is good practice to put all output under build\<mode> so that deleting those directories always ensures a clean build. TEST=built on Windows and installed and tested some samples BUG=none Review URL: http://codereview.chromium.org/2976006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52205 0039d316-1c4b-4281-b951-d872f2087c98
* Parameterize the name of the "O3DExtras" directory with a GYP variable (to ↵tschmelcher@chromium.org2010-07-123-33/+2
| | | | | | | | | | | | | | allow side-by-side installs of differently-branded builds that both include the extras directory). Also move the branding.gypi and version.gypi files from plugin/ to build/, which is a more sensible location. Also delete an extraneous definition of plugin_enable_fullscreen_msg from core.gyp (it's already in common.gypi). TEST=built on Windows, both with and without plugin_extras_directory specified BUG=none Review URL: http://codereview.chromium.org/2893011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52153 0039d316-1c4b-4281-b951-d872f2087c98
* o3d/linux: fix --as-needed for glespiman@chromium.org2010-07-121-14/+25
| | | | | | Review URL: http://codereview.chromium.org/2946005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52108 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix DCHECK failure in Chrome caused by re-entrant rendering. This ↵tschmelcher@chromium.org2010-07-091-0/+2
| | | | | | | | | | | wasn't actually causing problems in release builds (presumably O3D was able to complete the re-entrant render action without problems), but we still don't want to do it. TEST=loaded a debug build repeatedly in Chrome/Linux and verified no DCHECK failure, whereas previously it happened a fair amount BUG=none Review URL: http://codereview.chromium.org/2944006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51999 0039d316-1c4b-4281-b951-d872f2087c98
* Bump O3D version.zhurunz@google.com2010-07-091-1/+1
| | | | | | Review URL: http://codereview.chromium.org/2899012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51986 0039d316-1c4b-4281-b951-d872f2087c98
* Some changes in RENDERMODE_CONTINUOUS mode when max_fps has been set.zhurunz@google.com2010-07-093-7/+7
| | | | | | | | | | | | | | | | | | | | | | | If Renderer::max_fps has been set, rendering is driven by incoming new textures. We draw on each new texture as long as not exceeding max_fps. If we are in RENDERMODE_ON_DEMAND mode, Client::Render() can still set dirty specifically. If we are in ENDERMODE_CONTINUOUS mode, we do NOT set dirty on each tick any more (since it is already driven by new textures.). There is one problem here: what if new texture don't come in for some reason? If that happened, no rendering callback will be invoked and this can cause problem sometimes. For example, some UI may depend on the rendering callback to work correctly. So, in RENDERMODE_CONTINUOUS mode, if we have set max_fps but haven't received any new texture for a while, we draw anyway to trigger the rendering callback. Review URL: http://codereview.chromium.org/2899008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51982 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor AsyncTick to force Chrome through the reentrancy checks formerly in ↵tschmelcher@chromium.org2010-07-082-18/+27
| | | | | | | | | | | | | TickPluginObject, which fixes crashes in Chrome on Windows due to reentrant calls to NPP_URLNotify(). Also fix a bug where pending_ticks_ was not decremented in the reentrancy failure path, which would have caused all future AsyncTick() calls to be ignored. TEST=repeatedly loaded O3D in Chrome on Windows dozens of times and verified no crashes, whereas previously these crashes were frequent on this machine BUG=none Review URL: http://codereview.chromium.org/2824050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51911 0039d316-1c4b-4281-b951-d872f2087c98
* Rolled forward O3D's Chromium DEPS to match the Skia roll-forward inkbr@google.com2010-07-084-37/+55
| | | | | | | | | | | | | the last CL, which broke the Linux build due to version mismatches. Thanks to tschmelcher for help with the Linux changes. Built and tested O3D on Windows, Linux and Mac OS X. BUG=none TEST=none Review URL: http://codereview.chromium.org/2952001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51895 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue where concurrent access to V8 from different threads resulted in ↵tschmelcher@chromium.org2010-06-283-6/+36
| | | | | | | | | | | | | crashes. V8 is not reentrant (yet), so the recommended solution is to globally lock V8 whenever doing anything with it. In practice this was only an issue in IE, perhaps because that is the only browser that uses different threads for different plugin instances within the same process. Also change some unused public methods to private. TEST=concurrent running/loading/playing of the Simple Scene Viewer, checkers.html, 2d.html, box2d-3d, and the pool app, all in both Win IE and Win Chrome BUG=none Review URL: http://codereview.chromium.org/2844026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51073 0039d316-1c4b-4281-b951-d872f2087c98
* Guard against the plugin being deleted unexpectedly.kbr@google.com2010-06-163-2/+17
| | | | | | | | | BUG=none TEST=manually stress tested plugin creation and destruction Review URL: http://codereview.chromium.org/2848004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49869 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed problems with Cocoa full-screen code:kbr@google.com2010-06-153-7/+32
| | | | | | | | | | | | | | | | | | | - Squelch mouse-up events coming from the browser while in full-screen mode. This avoids immediately falling out of full-screen mode in apps which have an icon which toggles between full-screen and windowed mode. - Squelch focus transfer events coming from the browser while in full-screen mode. This avoids immediately falling out of full-screen mode upon entry in some situations. Focus transfers away from the full-screen window continue to work. BUG=none TEST=various full-screen tests Review URL: http://codereview.chromium.org/2837006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49859 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue in Safari 5 on Mac OS X 10.6 on Mac Minis where ↵tschmelcher@chromium.org2010-06-151-7/+9
| | | | | | | | | | | drawInCGLContext/copyCGLContextForPixelFormat are called a second time during shutdown in certain hosting pages, causing an assert due to duplicate creation of the Renderer service. TEST=repeatedly launched/exiting the affected O3D app and verified no crash or other issue BUG=none Review URL: http://codereview.chromium.org/2740011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49835 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent Client::Tick() from causing reentrancy in the plugin on Mac OS X.kbr@google.com2010-06-021-3/+4
| | | | | | | | | | | Tested with client application. BUG=none TEST=none Review URL: http://codereview.chromium.org/2451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48770 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Fix bug that has always existed in the GYP build where O3D.rsrc was an ↵tschmelcher@chromium.org2010-05-281-0/+2
| | | | | | | | | | | empty file with all the data stored in the resource fork (which is lost when zipping). -useDF was in the ancient scons build but was never included in the GYP command. TEST=built on Mac, verified O3D.rsrc file is now correct, and verified it works in various browsers BUG=none Review URL: http://codereview.chromium.org/2384003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48524 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug in Core Graphics backend where it was falling through to thekbr@google.com2010-05-282-32/+39
| | | | | | | | | | | | | | AGL initialization code path in some situations, causing full-screen mode (at least) to break. Also fixed bug causing plugin to become reentrant during event dispatching. BUG=none TEST=none TBR=maf Review URL: http://codereview.chromium.org/2339002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48513 0039d316-1c4b-4281-b951-d872f2087c98
* Sync to latest breakpad which doesn't have deps on libglog.zhurunz@google.com2010-05-281-9/+0
| | | | | | Review URL: http://codereview.chromium.org/2354001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48506 0039d316-1c4b-4281-b951-d872f2087c98
* Accepted mouse moved events in NSWindow used for Cocoa full-screen code path.kbr@google.com2010-05-281-0/+1
| | | | | | | | | | | Verified with manipulators sample modified to support full-screen. BUG=http://code.google.com/p/o3d/issues/detail?id=222 TEST=none Review URL: http://codereview.chromium.org/2347001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48452 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored drawing and event model selection to generalize to morekbr@google.com2010-05-264-101/+72
| | | | | | | | | | | | | | | | | | | | | | | browsers. Tested in the following browsers / operating systems: Mac OS X 10.5: - Safari (QuickDraw drawing model) - Firefox 3.6 (QuickDraw drawing model) - Firefox 2.0.0.20 (QuickDraw drawing model) - Modified Chromium TOT (Core Graphics drawing model) Mac OS X 10.6: - Safari (Core Animation drawing model) - Firefox 3.6.3 (QuickDraw drawing model) - Modified Chromium TOT (Core Animation drawing model) BUG=none TEST=none Review URL: http://codereview.chromium.org/2169002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48236 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented full-screen support for Core Graphics and Core Animationkbr@google.com2010-05-248-147/+615
| | | | | | | | | | | | | | | | | | | | | | rendering models using a top-level NSWindow and rendering to an NSOpenGLContext which shares resources with the CGLContextObj used to render into the plugin region. Synthesizes and dispatches NPCocoaEvents for the mouse, keyboard and focus change events received by the window. Exposed primitives needed to reset state in the OpenGL context and to switch the Renderer's notion of the context. Fixed bug in offscreen rendering support previously added in support of Core Graphics drawing model. Tested with full-screen sample and modified render-mode sample on Mac OS X 10.6 in Safari 4 and on Mac OS X 10.5 with a version of Chromium with the O3D blacklist entry removed. BUG=http://code.google.com/p/o3d/issues/detail?id=221 TEST=none Review URL: http://codereview.chromium.org/2095023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48076 0039d316-1c4b-4281-b951-d872f2087c98
* Add breakpad. zhurunz@google.com2010-05-222-0/+23
| | | | | | Review URL: http://codereview.chromium.org/2092021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47987 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored full-screen code under FullscreenWindowMac base class andkbr@google.com2010-05-1910-569/+861
| | | | | | | | | | | | | | | | | overlay window code into OverlayWindowMac class. This is an intermediate step toward a Cocoa and CGL implementation. Verified that mouse and key events continue to work in full-screen mode with full-screen sample and a modified render-mode.html in Firefox 3.6.3 on Mac OS X, where O3D continues to use the Quickdraw drawing model. BUG=http://code.google.com/p/o3d/issues/detail?id=221 TEST=none Review URL: http://codereview.chromium.org/2129015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47733 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Undo the change in r44662 to use npo3dautoplugin for the default Mac ↵tschmelcher@chromium.org2010-05-111-15/+78
| | | | | | | | | | | bundle name and instead return to using "O3D". TEST=built with default name and with an overridden name, on Mac BUG=none Review URL: http://codereview.chromium.org/2027004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46957 0039d316-1c4b-4281-b951-d872f2087c98
* Axe the o3d_version.py script and turn it into a .gypi file. This fixes a ↵tschmelcher@chromium.org2010-05-063-35/+24
| | | | | | | | | | | | | bug where bumping the version wasn't always picked up by the build slaves because hooks are only re-run when a GYP file changes. Also axe the o3d_kill_version.py and the separate SDK version logic, which was not used anymore. TEST=built on Linux; trybots BUG=none Review URL: http://codereview.chromium.org/2017004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46609 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Use the plugin_npapi_filename variable to choose the bundle name ↵tschmelcher@chromium.org2010-04-153-11/+15
| | | | | | | | | | | (rather than the static "O3D" name) so that differently branded versions can co-exist. This also changes the default name from O3D.plugin to npo3dautoplugin.plugin to harmonize it with the other platforms. TEST=built & tested a rebranded plugin and non-rebranded plugin on Mac BUG=none Review URL: http://codereview.chromium.org/1585034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44662 0039d316-1c4b-4281-b951-d872f2087c98
* Update DEPS to pull in missing Nixysa, and add code to use new Nixysa ↵maf@google.com2010-04-142-10/+9
| | | | | | | | threading support needed for Safari on 10.6. Review URL: http://codereview.chromium.org/1622023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44434 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/577038maf@google.com2010-04-139-46/+390
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44397 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug in size of invalid rect. This slipped through inkbr@chromium.org2010-04-091-2/+2
| | | | | | | | | | | | | | | http://code.google.com/p/o3d/issues/detail?id=215 / http://codereview.chromium.org/669220 because of a last minute change to the NPN_InvalidateRect call. Internal bug ID: http://b/issue?id=2582040 BUG=none TEST=none (ran O3D samples) Review URL: http://codereview.chromium.org/1553020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44032 0039d316-1c4b-4281-b951-d872f2087c98
* Build fixes for case when fullscreen message is disabled, for IMC codekbr@chromium.org2010-04-081-14/+12
| | | | | | | | | | | path, and for effect.js docs. BUG=none TEST=none (built O3D on Mac) Review URL: http://codereview.chromium.org/1512029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43995 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: link with --as-needed to eliminate direct dependencies on 15 shared ↵tschmelcher@chromium.org2010-03-191-6/+20
| | | | | | | | | | | libraries that we don't actually use. TEST=built on Linux and ran it BUG=none Review URL: http://codereview.chromium.org/1072008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42173 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for O3D in Chrome on Mac OS X using CoreGraphics drawingkbr@chromium.org2010-03-117-36/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | model by rendering offscreen, reading back the frame buffer, and drawing the rendering results into the CGContextRef. This code path is currently Chrome-specific, but could be used for any browser with similar characteristics. This will require refactoring of the drawing and event model selection code, which may be done in a subsequent bug. Changed the RenderSurface APIs to allow the Bitmap for readback to be passed in. Added Client::SetOffscreenRenderingSurfaces so that the entry point Client::RenderClient() can be used unchanged. Fixed problem with plugin_enable_fullscreen_msg gyp variable which needs to be in top-level gypi so #define is consistent throughout project. Fixed minor issue in Cocoa key event handling. Fixed log message causing crashes when render target attachment fails. Chrome currently blacklists the O3D plugin's MIME type, so to enable support for O3D this blacklist entry needs to be removed from Chrome. Ran nearly all O3D samples in Chrome on Mac OS X. There are a couple of failures which will be fixed in subsequent bugs. Also ran samples in Safari and Firefox on Mac and verified no performance regressions. BUG=http://code.google.com/p/o3d/issues/detail?id=215 TEST=ran O3D samples in Chrome, Safari and Firefox Review URL: http://codereview.chromium.org/669220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41233 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix build break in r40786 due to file not ending with a newline. ↵tschmelcher@chromium.org2010-03-052-2/+2
| | | | | | | | | | | (Don't know why the trybot didn't catch that ...) Also fix a GCC signedness warning when compiling the domain whitelist code. TEST=built on Linux BUG=none Review URL: http://codereview.chromium.org/669206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40792 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce two new GYP variables:tschmelcher@chromium.org2010-03-0511-6/+292
| | | | | | | | | | | | | 1) plugin_domain_whitelist, which sets an optional domain whitelist. If specified, websites not in the list can't use the plugin. 2) plugin_enable_fullscreen_msg, which can be optionally unset to disable the Win/Mac fullscreen message. Also fix a bug in NPPluginProxy that this uncovered. TEST=built on Windows with a whitelist and without fullscreen message and verified correct behaviour in both IE and FF. Also, the whitelist logic comes almost verbatim from another Google product where it is already well-tested BUG=none Review URL: http://codereview.chromium.org/668078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40786 0039d316-1c4b-4281-b951-d872f2087c98
* Revert my change to the O3D plugin's description format, since it breaks the ↵tschmelcher@chromium.org2010-03-021-1/+1
| | | | | | | | | | | logic in o3djs.util.requiredVersionAvailable(). TEST=built and ran ping pong sample on Linux BUG=none Review URL: http://codereview.chromium.org/660019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40427 0039d316-1c4b-4281-b951-d872f2087c98
* Added the bulk of the algorithm for GPU accelerated 2D vector curvekbr@chromium.org2010-02-262-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendering from "Rendering Vector Art on the GPU" by Loop and Blinn, GPU Gems 3, Chapter 25. The main entry point to the algorithm is the PathProcessor, which takes in a Skia path and converts it to two triangle meshes: one for the exterior region of the shape containing the curve segments, and one for the interior region of the shape which is filled with constant (1.0) alpha. The o3d.ProcessedPath class is the internal object which exposes the needed entry points to JavaScript. However, o3djs.gpu2d is the user-level entry point to the algorithm. This exposes a Path primitive to which line, quadratic curve and cubic curve segments can be added, and simple fills (currently only a solid color). An SVG loader in samples/gpu2d/svgloader.js illustrates how content might be imported at run time. Several samples and regression tests demonstrate the current state of the implementation. More work is planned. Some small generalizations to the O3D code were necessary to support two-dimensional vertices. Note that I plan to submit gpu2d.js and/or svgloader.js for JavaScript readability. I have run both through the JS compiler and have fixed as many of the doc generation errors as possible in svgloader.js without pulling this file into the o3djs namespace. Tested in O3D on Windows and Mac OS X. BUG=none TEST=various SVG based tests Review URL: http://codereview.chromium.org/652016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40079 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: make sure the fullscreen window always gets focustschmelcher@chromium.org2010-02-222-3/+11
| | | | | | | | | TEST=tested fullscreen on Linux with metacity, metacity + focus-follows-mouse, compiz, compiz + focus-follows-mouse BUG=none Review URL: http://codereview.chromium.org/652076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39651 0039d316-1c4b-4281-b951-d872f2087c98