summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/mac/plugin_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Moving o3d up a level, to get it out of chrome checkouts.bradnelson@google.com2011-03-281-717/+0
| | | | | | | | | | BUG=None TEST=None Too large for codereview. Manual review by thaloun and tschelcher. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79609 0039d316-1c4b-4281-b951-d872f2087c98
* Add comment explaining why we don't initializemilligan@google.com2011-03-091-0/+3
| | | | | | | | | breakpad when loaded in the Chrome browser on Mac. Review URL: http://codereview.chromium.org/6639011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77392 0039d316-1c4b-4281-b951-d872f2087c98
* Work around the multiple breakpad issue by nevermilligan@google.com2011-03-091-1/+8
| | | | | | | | | | | initializing o3d's breakpad if loaded in the Chrome Helper process. Hopefully this is temporary and we will revert once we get breakpad working with multiple instances. Review URL: http://codereview.chromium.org/6639006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77390 0039d316-1c4b-4281-b951-d872f2087c98
* O2D Mac: Don't crash if the user tries to go to fullscreen with O2D.tschmelcher@google.com2011-03-091-0/+6
| | | | | | | | | TEST=tried to go fullscreen with O2D on Mac in FF, Chrome, and Sarafi and verified nothing happens BUG=none Review URL: http://codereview.chromium.org/6650012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77389 0039d316-1c4b-4281-b951-d872f2087c98
* Port O2D to Mac, currently just for Core Graphics (the drawing model used in ↵tschmelcher@chromium.org2011-03-031-8/+8
| | | | | | | | | | | Chrome on 10.5). Unfortunately the performance is not yet good enough to prefer it over the CGL + GPU readback + CoreGraphics re-render code path currently in use, so some optimization work will be necessary. TEST=loaded O3D on OSX with RenderMode=Auto and RenderMode=2D in Chrome 9 on 10.5 and 10.6, Safari 4 on 10.5, Safari 5 on 10.6, and FF 3.6 on 10.5 and 10.6 and verified that Auto works everywhere, 2D works in Chrome on 10.5, and 2D fails without crashing in the remaining cases; unit tests BUG=none Review URL: http://codereview.chromium.org/6614005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76839 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ON_DEMAND_RENDER mode on Mac OSX.tschmelcher@chromium.org2010-12-151-3/+5
| | | | | | | | Submitting on behalf of pthatcher@google.com Review URL: http://codereview.chromium.org/5843001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69197 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
* Some changes in RENDERMODE_CONTINUOUS mode when max_fps has been set.zhurunz@google.com2010-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Fixed bug in Core Graphics backend where it was falling through to thekbr@google.com2010-05-281-0/+6
| | | | | | | | | | | | | | 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
* Refactored drawing and event model selection to generalize to morekbr@google.com2010-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | 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-241-5/+128
| | | | | | | | | | | | | | | | | | | | | | 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
* Refactored full-screen code under FullscreenWindowMac base class andkbr@google.com2010-05-191-529/+8
| | | | | | | | | | | | | | | | | 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
* Review URL: http://codereview.chromium.org/577038maf@google.com2010-04-131-0/+11
| | | | 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
* Added support for O3D in Chrome on Mac OS X using CoreGraphics drawingkbr@chromium.org2010-03-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce two new GYP variables:tschmelcher@chromium.org2010-03-051-0/+16
| | | | | | | | | | | | | 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
* New code needs some NULL checks so we don't crash FireFox on 10.6.maf@google.com2009-12-111-5/+9
| | | | | | Review URL: http://codereview.chromium.org/492016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34367 0039d316-1c4b-4281-b951-d872f2087c98
* Don't screw up the retain count on the original WindowRef referenced by the ↵maf@google.com2009-12-101-0/+11
| | | | | | | | | copy we make of the browser NSWindow. We were accidentally disposing the dummy window in the plugin process that Chrome makes. Review URL: http://codereview.chromium.org/486021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34303 0039d316-1c4b-4281-b951-d872f2087c98
* fixed include order issues for osx I introducedgman@google.com2009-10-221-0/+1
| | | | | | | | with last change. Review URL: http://codereview.chromium.org/327002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29838 0039d316-1c4b-4281-b951-d872f2087c98
* Get Mac GYP build compiling.maf@google.com2009-09-031-1/+1
| | | | | | Review URL: http://codereview.chromium.org/172119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25292 0039d316-1c4b-4281-b951-d872f2087c98
* Changes needed to get Mac plugin gyp project build compiling and linking.maf@google.com2009-08-131-21/+27
| | | | | | Review URL: http://codereview.chromium.org/165433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23375 0039d316-1c4b-4281-b951-d872f2087c98
* Add a boolean parameter to Client::RenderClient() to choose whether tomaf@google.com2009-07-231-1/+1
| | | | | | | | | | | | | | make the javascript render callback or not. Generally you want to pass true, but if the render is happening in non-windowed mode (eg on a Mac) and is in response to an update event rather than a timer, it can be useful to pass false to prevent the javascript code triggering another update and causing an infinite calback loop. Case in point is the custom camera example, which modifies some HTML form text fields on render callback, which on Firefox causes a plugin invalidation and round and round we would go. Review URL: http://codereview.chromium.org/159181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21473 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing several problems with the build.gspencer@google.com2009-07-231-2/+3
| | | | | | | | | | | | | - Had to make one line file_path_utils conditional on which build system was building it (because GYP build and scons build use different versions of chrome/base). - Missed a couple instances of "file/" in the path to nixysa. - New version of breakpad has a different API on the Mac. Review URL: http://codereview.chromium.org/160056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21470 0039d316-1c4b-4281-b951-d872f2087c98
* Plugin no longer makes synchronous NPAPI calls from a Windows message ↵apatrick@google.com2009-07-131-12/+13
| | | | | | | | handler. This fixes deadlocks and slowdown in Chrome. The approach is strange. It asynchronously opens the url data:, and then invokes Tick from the finish callback. This is the simplest approach I could think of that hide widespread browser support. NPN_PluginThreadAsyncCall would be ideal but it is supported by all browsers we currently support. Review URL: http://codereview.chromium.org/149415 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20517 0039d316-1c4b-4281-b951-d872f2087c98
* In preparation for becoming an internal plugin in chrome I did these things:apatrick@google.com2009-07-091-19/+24
| | | | | | | | | | | - Move declarations in the global namespace into the o3d namespace to avoid conflicts with Chrome. - Ifdef out code that we do not want to run as an internal plugin (like breakpad, DllMain, etc) - Prevent NP_Initialize, etc from being exported as an internal plugin. Unfortunately I had to move functions around to group them by namespace so the diffs look like there is more change than there actually is. Review URL: http://codereview.chromium.org/149130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20285 0039d316-1c4b-4281-b951-d872f2087c98
* Some refactoring. Move a lot of drawing related but not O3D specific code ↵maf@google.com2009-06-291-114/+29
| | | | | | | | | out of plugin_mac.mm into a new graphics_utils_mac.mm file. Also remove period at end of fullscreen message. Review URL: http://codereview.chromium.org/149052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19537 0039d316-1c4b-4281-b951-d872f2087c98
* New user experience for the fullscreen message on Mac.maf@google.com2009-06-251-55/+138
| | | | | | | It's now a translucent window that slides down into the top right of the screen, hangs around for a while and then slides up up and away. Review URL: http://codereview.chromium.org/147135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19300 0039d316-1c4b-4281-b951-d872f2087c98
* Add Mac support for setting plugin fullscreen area. maf@google.com2009-06-191-26/+46
| | | | | | Review URL: http://codereview.chromium.org/126252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18847 0039d316-1c4b-4281-b951-d872f2087c98
* Make O3D fullscreen mode support resolution switching on Mac.maf@google.com2009-06-101-29/+210
| | | | | | | | First cut - a bit glitchy when leaving fullscreen currently as we get unwanted browser window resizing when the resolution requested is lower than the current window size. Review URL: http://codereview.chromium.org/118471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18013 0039d316-1c4b-4281-b951-d872f2087c98
* This is the O3D source tree's initial commit to the Chromium tree. It gspencer@google.com2009-05-271-0/+822
is not built or referenced at all by the chrome build yet, and doesn't yet build in it's new home. We'll change that shortly. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17035 0039d316-1c4b-4281-b951-d872f2087c98