summaryrefslogtreecommitdiffstats
path: root/o3d/core
Commit message (Collapse)AuthorAgeFilesLines
* O2D:tschmelcher@chromium.org2011-01-206-27/+131
| | | | | | | | | | | | | | | | | | | - New APIs: - Add a "visible" property to the Layer class to mimick the visible property of the Transform class. - Add a method to set an affine transform on Pattern objects so that texture patterns can be transformed independently from the Layers that use them. - Add a "paint operators" API for Layers and define four operators (currently only three of them implemented). The previous hard-coded behaviour was equivalent to the BLEND_WITH_TRANSPARENCY operator. - Fixes: - Replace the "mask" nomenclature with "clip", which is a more standard name. - Don't clip alpha-blended layers. - Restrict Layer painting to the rectangle defined by the attributes. - Set default alpha value to 0.0 instead of 1.0 to match what JavaScript expects. TEST=loaded O2D and verified all new functionality is working BUG=none Review URL: http://codereview.chromium.org/6255003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72006 0039d316-1c4b-4281-b951-d872f2087c98
* O2D:tschmelcher@chromium.org2011-01-191-3/+8
| | | | | | | | | | | | - Fix graphical artifacting for images downloaded from the Internet caused by overwriting them with their own mip-maps. This resulted in each image being rendered with copies of itself of decreasing size in one of the corners. Cairo does not support/need mip-maps, so we now just ignore the calls to set the mip-maps. - Do not alpha-blend new texture content with the old texture content, which is wrong and would have been wasting a bit of CPU too. TEST=loaded O2D and verified the artifacting is fixed BUG=none Review URL: http://codereview.chromium.org/6268006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71819 0039d316-1c4b-4281-b951-d872f2087c98
* O2D: Several (unrelated) improvements:tschmelcher@chromium.org2011-01-144-19/+59
| | | | | | | | | | | | | - Use Cairo double-buffering (prevents flickering when there is translucency). - Add an API to allow JS to indicate the stacking order of layers. (Previously it was the arbitrary order of their creation!) - Delete layer objects that have been discarded by the JS via Pack::RemoveObject(). TEST=loaded O2D and verified no significant change in perf as a result of double-buffering (~70% of a core before and ~72% of a core after) BUG=none Review URL: http://codereview.chromium.org/6320002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71475 0039d316-1c4b-4281-b951-d872f2087c98
* Change #ifdef _DEBUG test to #ifndef NDEBUG test.tfarina@chromium.org2011-01-103-6/+6
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/5991010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70956 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting the o3d parts of: 70009 70345 70353bradnelson@google.com2011-01-041-6/+6
| | | | | | | | | | | | | | O3D is frozen on an old version of base, so I believe you want to avoid updating it in future base changes. BUG=None TEST=None Review URL: http://codereview.chromium.org/6075009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70450 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/lock and base/condition_variable to base/synchronization/brettw@chromium.org2011-01-011-6/+6
| | | | | | | | | | | I kept a base/lock.h in place with a using statement to avoid updating all callers in one CL. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6018013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ON_DEMAND_RENDER mode on Mac OSX.tschmelcher@chromium.org2010-12-152-0/+7
| | | | | | | | 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
* Add an API to allow JavaScript to determine the framerate of individual ↵tschmelcher@chromium.org2010-12-066-29/+101
| | | | | | | | | | | dynamic textures. TEST=loaded O3D on a test page on Linux and used the new API to display the framerate BUG=none Review URL: http://codereview.chromium.org/5591006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68379 0039d316-1c4b-4281-b951-d872f2087c98
* O2D:tschmelcher@chromium.org2010-11-248-84/+285
| | | | | | | | | | | | | | | | | | | | | (1) De-couple the Layer abstraction from the implementations details of Texture, giving JavaScript more control over the scene: - Create a Pattern class backed by Cairo's cairo_pattern_t types (which we were already using implicitly) to represent a particular pattern to paint on a layer (think of it like a brush in PhotoShop/GIMP). A Pattern can be created from either a Texture or a solid colour. This will later allow us to move the PaintBackground() method out in to JS-space. - Axe the overloaded Layer scaling parameters (which were used to represent both the width/height of the Layer and the scaling applied to the Texture), and replace them with separate width/height parameters to describe the Layer dimensions and scale_x/scale_y parameters to describe the scaling applied to the Pattern. (2) Code clean-up: - Use properties instead of functions in the Layer class. - Use double instead of float. - Get rid of unnecessary inheritance of Layer from ParamObject. - Get rid of many unnecessary #include directives in layer.h. - Get rid of super-spammy log message in RendererCairo::Paint(). - Improve comments. TEST=compiled and loaded on Linux in both GL mode and Cairo mode with simple test scenes BUG=none Review URL: http://codereview.chromium.org/5276006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67335 0039d316-1c4b-4281-b951-d872f2087c98
* 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
* 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
* Further integration of 2D mode. This change supports calltype=v, ↵fransiskusx@google.com2010-09-179-57/+393
| | | | | | | | | | | | | 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
* Revert 58946 - Further integration of 2D mode. This change supports ↵fbarchard@chromium.org2010-09-099-393/+57
| | | | | | | | | | | | | | | | 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-099-57/+393
| | | | | | | | | | | | | 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
* 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
* Deleting trailing spaces, add ending newline where missing to make lint ↵maf@chromium.org2010-08-064-4/+4
| | | | | | | | 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
* o3d: create a gles v2 context for the native gles2 backendpiman@chromium.org2010-08-051-1/+7
| | | | | | Review URL: http://codereview.chromium.org/3050038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55114 0039d316-1c4b-4281-b951-d872f2087c98
* Initial version rendering 2D path for O3D. This will eventually allow O3D ↵fransiskusx@google.com2010-08-058-0/+925
| | | | | | | | | | | | | | 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
* Gut the temp file flushing feature of RawData, because it is a security ↵tschmelcher@chromium.org2010-08-031-1/+2
| | | | | | | | | | | risk. The OS should automatically flush the pages from physical memory anyways. TEST=(Linux FF 3.0) ping pong, beach demo, prince IO, stenciled teapot, simple scene viewer, sobel edge detection shader BUG=none Review URL: http://codereview.chromium.org/3064028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54640 0039d316-1c4b-4281-b951-d872f2087c98
* Ported the Loop/Blinn shaders in samples/o3djs/gpu2d.js to GLSL to addkbr@google.com2010-07-243-0/+25
| | | | | | | | | | | | | | | | 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
* Parameterize the name of the "O3DExtras" directory with a GYP variable (to ↵tschmelcher@chromium.org2010-07-122-12/+8
| | | | | | | | | | | | | | 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
* Improvement from codereview http://codereview.chromium.org/2899008/showzhurunz@google.com2010-07-121-12/+9
| | | | | | Review URL: http://codereview.chromium.org/2933007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52095 0039d316-1c4b-4281-b951-d872f2087c98
* Some changes in RENDERMODE_CONTINUOUS mode when max_fps has been set.zhurunz@google.com2010-07-093-3/+53
| | | | | | | | | | | | | | | | | | | | | | | 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
* Rolled forward O3D's Chromium DEPS to match the Skia roll-forward inkbr@google.com2010-07-081-0/+1
| | | | | | | | | | | | | 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
* Made code which determines which side of contours to fill more robustkbr@google.com2010-07-071-55/+81
| | | | | | | | | | | | | | | | | | using new outgoing "ambiguous" parameter added to Skia XRay queries. Rolled forward Skia dependency to latest revision. With these changes the SVG butterfly renders correctly in O3D. Boosted polygon offsets again to avoid pixel dropouts. Also tested O3D canvas demos to verify no breakage with Skia roll-forward. BUG=none TEST=none Review URL: http://codereview.chromium.org/2813049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51791 0039d316-1c4b-4281-b951-d872f2087c98
* Changed definition of IntervalTree to contain closed, rather thankbr@google.com2010-07-062-12/+14
| | | | | | | | | | | | | | open, intervals, and changed back PathProcessor's AllSegmentsOverlappingY debug routine to report closed intervals. This fixes more rendering issues with the SVG butterfly. BUG=none TEST=samples/gpu2d/regression-tests/orientation-bug-3.html TBR=apatrick Review URL: http://codereview.chromium.org/2847049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51670 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed mismatch in fast and slow queries in overlap tests duringkbr@google.com2010-07-051-6/+99
| | | | | | | | | | | | | | | orientation determination which was causing assertion failures on some inputs. Avoided ray casting tests where results will not change decision of which side to fill. SVG butterfly is closer to rendering correctly with these changes but is still not 100% correct. BUG=none TEST=samples/gpu2d/regression-tests/orientation-bug-2.html TBR=apatrick Review URL: http://codereview.chromium.org/2862045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51643 0039d316-1c4b-4281-b951-d872f2087c98
* Guard against the plugin being deleted unexpectedly.kbr@google.com2010-06-161-0/+10
| | | | | | | | | 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
* Prevent Client::Tick() from causing reentrancy in the plugin on Mac OS X.kbr@google.com2010-06-022-0/+12
| | | | | | | | | | | 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-282-0/+9
| | | | | | | | | | | | | | 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
* In some circumstances the O3D plugin is briefly resized to zero height,kbr@google.com2010-05-281-1/+1
| | | | | | | | | | | | | | causing the Core Graphics rendering backend to request a zero-height render target. base::bits::Log2Ceiling returns -1 for a zero input which was being translated to a huge unsigned integer value, leading to an assertion failure. Verified with submitter's use case. BUG=none TEST=none Review URL: http://codereview.chromium.org/2377002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48507 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented full-screen support for Core Graphics and Core Animationkbr@google.com2010-05-242-41/+87
| | | | | | | | | | | | | | | | | | | | | | 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
* Fixed crash on Mac OS X introduced inkbr@google.com2010-05-211-7/+8
| | | | | | | | | | | | | | | | http://codereview.chromium.org/1627007 / http://codereview.chromium.org/1527030 . Ensure the renderer is initialized before attempting to use it. Only enable new code path if actually uploading textures via IMC. Tested in Safari 4 on Mac OS X 10.6. BUG=none TEST=none Review URL: http://codereview.chromium.org/2103014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47924 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-061-4/+5
| | | | | | | | | | | | | 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
* Flush GL errors before any operation that checks for GL errors afterwards, ↵tschmelcher@chromium.org2010-05-056-26/+71
| | | | | | | | | | | so as to prevent operations from spuriously failing due to previous unrelated errors. Fixes a bug on Linux T400s with AMD graphics where we "failed" to create the error texture because of a previous non-fatal error that hadn't been reaped. TEST=ran a debug build on a Linux T400 with AMD graphics BUG=none Review URL: http://codereview.chromium.org/1912001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46418 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed renderer_test.cc for GLES2.amarinichev@chromium.org2010-05-032-0/+11
| | | | | | Review URL: http://codereview.chromium.org/1830004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46268 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled changes from issue 669220 to fix building with renderer=gles2.amarinichev@chromium.org2010-04-273-8/+10
| | | | | | Review URL: http://codereview.chromium.org/1741009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45723 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented DX clipping rules to match CG version. Uses dx_clipping varying.amarinichev@chromium.org2010-04-204-2/+31
| | | | | | Review URL: http://codereview.chromium.org/1646016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45069 0039d316-1c4b-4281-b951-d872f2087c98
* Added --convert-dds-to-png command line option to the COLLADA converter,kbr@google.com2010-04-202-0/+20
| | | | | | | | | | | | | | | | | | | which causes all DDS textures to be outputted as PNGs. This required changes to the serialization code to reconstitute cube map textures from six separate images. Some bugs in the plugin were uncovered with this change which have been worked around for the time being. Pulled in libtxc_dxtn library for decompressing DXTn textures. Tested by converting teapot with --convert-dds-to-png and running helloworld.html and render-mode.html. BUG=none TEST=none Review URL: http://codereview.chromium.org/1677002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45014 0039d316-1c4b-4281-b951-d872f2087c98
* Use the correct target when binding a cubemap texture.amarinichev@chromium.org2010-04-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1530042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44665 0039d316-1c4b-4281-b951-d872f2087c98
* Send bool response on message SET_MAX_FPSzhurunz@google.com2010-04-143-8/+1
| | | | | | | | Enable build flag O3D_PLUGIN_SUPPORT_SET_MAX_FPS Review URL: http://codereview.chromium.org/1527030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44550 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed stream-attribute matching. Autoconverted teapot shader works ↵amarinichev@chromium.org2010-04-132-8/+8
| | | | | | | | correctly now. Review URL: http://codereview.chromium.org/1599025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44391 0039d316-1c4b-4281-b951-d872f2087c98
* Build fixes for case when fullscreen message is disabled, for IMC codekbr@chromium.org2010-04-081-1/+2
| | | | | | | | | | | 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
* Add a new message to allow draw on every new texture within given fps ↵tschmelcher@chromium.org2010-04-087-4/+107
| | | | | | | | | limitation. Submitting on behalf of zhurunz. Original issue @ http://codereview.chromium.org/1627007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43978 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for O3D in Chrome on Mac OS X using CoreGraphics drawingkbr@chromium.org2010-03-1111-30/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-2/+35
| | | | | | | | | | | | | 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
* When an o3d window does not belong to any monitor (off screen), instead of ↵zmo@google.com2010-03-011-7/+1
| | | | | | | | failing, use the default monitor/adapter instead. Review URL: http://codereview.chromium.org/661300 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40311 0039d316-1c4b-4281-b951-d872f2087c98
* Incorporating change missed in previous CLkbr@chromium.org2010-02-271-2/+2
| | | | | | | | (http://codereview.chromium.org/652016). Review URL: http://codereview.chromium.org/661232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40191 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed uninitialized variables breaking Linux build after checkin ofkbr@google.com2010-02-261-3/+3
| | | | | | | | | | | | http://codereview.chromium.org/652016 . BUG=none TEST=built and tested on Linux TBR=gman Review URL: http://codereview.chromium.org/661143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40084 0039d316-1c4b-4281-b951-d872f2087c98
* Added the bulk of the algorithm for GPU accelerated 2D vector curvekbr@chromium.org2010-02-2611-22/+2052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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