| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/4592001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65266 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/3050038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55114 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/2933007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52095 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/1830004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46268 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/1741009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45723 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/1646016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45069 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/1530042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44665 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|