changeset 2542:7507d0eacf70

RT-28274: Open Source Decora Projects Summary: Moved Decora to open source
author rbair
date Thu, 07 Feb 2013 13:14:03 -0800
parents ee1e4c0502d4
children 14da6e9bbcfe
files build-decora.xml build.gradle decora-d3d/build.xml decora-d3d/decora-d3d.iml decora-d3d/nbproject/project.xml decora-d3d/project.properties decora-d3d/src/com/sun/scenario/effect/impl/hw/d3d/D3DShaderSource.java decora-es2/build.xml decora-es2/decora-es2.iml decora-es2/nbproject/project.xml decora-es2/project.properties decora-es2/src/com/sun/scenario/effect/impl/es2/ES2ShaderSource.java decora-jsw/build.xml decora-jsw/decora-jsw.iml decora-jsw/nbproject/project.xml decora-jsw/project.properties decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWBoxBlurPeer.java decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWBoxShadowPeer.java decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWEffectPeer.java decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWLinearConvolvePeer.java decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWLinearConvolveShadowPeer.java decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWRendererDelegate.java decora-prism-ps/build.xml decora-prism-ps/decora-prism-ps.iml decora-prism-ps/nbproject/project.xml decora-prism-ps/project.properties decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSDrawable.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSEffectPeer.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSOneSamplerPeer.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSRenderer.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSTwoSamplerPeer.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSZeroSamplerPeer.java decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPStoPSWDisplacementMapPeer.java decora-prism-sw/build.xml decora-prism-sw/decora-prism-sw.iml decora-prism-sw/nbproject/project.xml decora-prism-sw/project.properties decora-prism-sw/src/com/sun/scenario/effect/impl/prism/sw/PSWDrawable.java decora-prism-sw/src/com/sun/scenario/effect/impl/prism/sw/PSWRenderer.java decora-prism/build.xml decora-prism/decora-prism.iml decora-prism/nbproject/project.xml decora-prism/project.properties decora-prism/src/com/sun/scenario/effect/impl/prism/PrCropPeer.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrDrawable.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrEffectHelper.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrFilterContext.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrFloodPeer.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrImage.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrMergePeer.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrReflectionPeer.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrRenderInfo.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrRenderer.java decora-prism/src/com/sun/scenario/effect/impl/prism/PrTexture.java decora-runtime/build.xml decora-runtime/decora-runtime.iml decora-runtime/generator/CompileBlend.java decora-runtime/generator/CompileBoxBlur.java decora-runtime/generator/CompileExternal.java decora-runtime/generator/CompileGaussian.java decora-runtime/generator/CompileJSL.java decora-runtime/generator/CompileLinearConvolve.java decora-runtime/generator/CompilePhong.java decora-runtime/generator/CompileZoomRadialBlur.java decora-runtime/jsl/Blend.jsl decora-runtime/jsl/Blend_ADD.jsl decora-runtime/jsl/Blend_BLUE.jsl decora-runtime/jsl/Blend_COLOR_BURN.jsl decora-runtime/jsl/Blend_COLOR_DODGE.jsl decora-runtime/jsl/Blend_DARKEN.jsl decora-runtime/jsl/Blend_DIFFERENCE.jsl decora-runtime/jsl/Blend_EXCLUSION.jsl decora-runtime/jsl/Blend_GREEN.jsl decora-runtime/jsl/Blend_HARD_LIGHT.jsl decora-runtime/jsl/Blend_LIGHTEN.jsl decora-runtime/jsl/Blend_MULTIPLY.jsl decora-runtime/jsl/Blend_OVERLAY.jsl decora-runtime/jsl/Blend_RED.jsl decora-runtime/jsl/Blend_SCREEN.jsl decora-runtime/jsl/Blend_SOFT_LIGHT.jsl decora-runtime/jsl/Blend_SRC_ATOP.jsl decora-runtime/jsl/Blend_SRC_IN.jsl decora-runtime/jsl/Blend_SRC_OUT.jsl decora-runtime/jsl/Blend_SRC_OVER.jsl decora-runtime/jsl/BoxBlur.jsl decora-runtime/jsl/Brightpass.jsl decora-runtime/jsl/ColorAdjust.jsl decora-runtime/jsl/DisplacementMap.jsl decora-runtime/jsl/GaussianBlur.jsl decora-runtime/jsl/InvertMask.jsl decora-runtime/jsl/LinearConvolve.jsl decora-runtime/jsl/LinearConvolveShadow.jsl decora-runtime/jsl/PerspectiveTransform.jsl decora-runtime/jsl/PhongLighting.jsl decora-runtime/jsl/SepiaTone.jsl decora-runtime/jsl/ZoomRadialBlur.jsl decora-runtime/nbproject/project.xml decora-runtime/project.properties decora-runtime/src/com/sun/scenario/effect/AbstractShadow.java decora-runtime/src/com/sun/scenario/effect/Blend.java decora-runtime/src/com/sun/scenario/effect/Bloom.java decora-runtime/src/com/sun/scenario/effect/BoxBlur.java decora-runtime/src/com/sun/scenario/effect/BoxShadow.java decora-runtime/src/com/sun/scenario/effect/Brightpass.java decora-runtime/src/com/sun/scenario/effect/Color4f.java decora-runtime/src/com/sun/scenario/effect/ColorAdjust.java decora-runtime/src/com/sun/scenario/effect/CoreEffect.java decora-runtime/src/com/sun/scenario/effect/Crop.java decora-runtime/src/com/sun/scenario/effect/DelegateEffect.java decora-runtime/src/com/sun/scenario/effect/DisplacementMap.java decora-runtime/src/com/sun/scenario/effect/DropShadow.java decora-runtime/src/com/sun/scenario/effect/Effect.java decora-runtime/src/com/sun/scenario/effect/FilterContext.java decora-runtime/src/com/sun/scenario/effect/FilterEffect.java decora-runtime/src/com/sun/scenario/effect/Filterable.java decora-runtime/src/com/sun/scenario/effect/FloatMap.java decora-runtime/src/com/sun/scenario/effect/Flood.java decora-runtime/src/com/sun/scenario/effect/GaussianBlur.java decora-runtime/src/com/sun/scenario/effect/GaussianShadow.java decora-runtime/src/com/sun/scenario/effect/GeneralShadow.java decora-runtime/src/com/sun/scenario/effect/Glow.java decora-runtime/src/com/sun/scenario/effect/Identity.java decora-runtime/src/com/sun/scenario/effect/ImageData.java decora-runtime/src/com/sun/scenario/effect/ImageDataRenderer.java decora-runtime/src/com/sun/scenario/effect/InnerShadow.java decora-runtime/src/com/sun/scenario/effect/InvertMask.java decora-runtime/src/com/sun/scenario/effect/Merge.java decora-runtime/src/com/sun/scenario/effect/MotionBlur.java decora-runtime/src/com/sun/scenario/effect/Offset.java decora-runtime/src/com/sun/scenario/effect/PerspectiveTransform.java decora-runtime/src/com/sun/scenario/effect/PhongLighting.java decora-runtime/src/com/sun/scenario/effect/Reflection.java decora-runtime/src/com/sun/scenario/effect/SepiaTone.java decora-runtime/src/com/sun/scenario/effect/ZoomRadialBlur.java decora-runtime/src/com/sun/scenario/effect/impl/BufferUtil.java decora-runtime/src/com/sun/scenario/effect/impl/EffectPeer.java decora-runtime/src/com/sun/scenario/effect/impl/HeapImage.java decora-runtime/src/com/sun/scenario/effect/impl/ImagePool.java decora-runtime/src/com/sun/scenario/effect/impl/Renderer.java decora-runtime/src/com/sun/scenario/effect/impl/RendererFactory.java decora-runtime/src/com/sun/scenario/effect/impl/hw/Drawable.java decora-runtime/src/com/sun/scenario/effect/impl/hw/RendererDelegate.java decora-runtime/src/com/sun/scenario/effect/impl/hw/Shader.java decora-runtime/src/com/sun/scenario/effect/impl/hw/ShaderSource.java decora-runtime/src/com/sun/scenario/effect/impl/hw/Texture.java decora-runtime/src/com/sun/scenario/effect/impl/state/AccessHelper.java decora-runtime/src/com/sun/scenario/effect/impl/state/BoxBlurState.java decora-runtime/src/com/sun/scenario/effect/impl/state/BoxShadowState.java decora-runtime/src/com/sun/scenario/effect/impl/state/GaussianBlurState.java decora-runtime/src/com/sun/scenario/effect/impl/state/GaussianShadowState.java decora-runtime/src/com/sun/scenario/effect/impl/state/HVSeparableKernel.java decora-runtime/src/com/sun/scenario/effect/impl/state/LinearConvolveKernel.java decora-runtime/src/com/sun/scenario/effect/impl/state/LinearConvolvePeer.java decora-runtime/src/com/sun/scenario/effect/impl/state/LinearConvolveShadowPeer.java decora-runtime/src/com/sun/scenario/effect/impl/state/MotionBlurState.java decora-runtime/src/com/sun/scenario/effect/impl/state/PerspectiveTransformState.java decora-runtime/src/com/sun/scenario/effect/impl/state/ZoomRadialBlurState.java decora-runtime/src/com/sun/scenario/effect/impl/sw/RendererDelegate.java decora-runtime/src/com/sun/scenario/effect/light/DistantLight.java decora-runtime/src/com/sun/scenario/effect/light/Light.java decora-runtime/src/com/sun/scenario/effect/light/PointLight.java decora-runtime/src/com/sun/scenario/effect/light/SpotLight.java decora-runtime/test/com/sun/scenario/effect/Test1.java decora-runtime/test/com/sun/scenario/effect/Test2.java decora-runtime/test/com/sun/scenario/effect/rt_5239/RT_5239Test.java decora-runtime/testjsl/Test1.jsl decora-runtime/testjsl/Test2.jsl decora-sse-native/Makefile decora-sse-native/SSEBoxBlurPeer.cc decora-sse-native/SSEBoxShadowPeer.cc decora-sse-native/SSELinearConvolvePeer.cc decora-sse-native/SSELinearConvolveShadowPeer.cc decora-sse-native/SSEUtils.cc decora-sse-native/SSEUtils.h decora-sse-native/nbproject/Makefile-Debug.mk decora-sse-native/nbproject/Makefile-Release.mk decora-sse-native/nbproject/Makefile-impl.mk decora-sse-native/nbproject/configurations.xml decora-sse-native/nbproject/project.xml decora-sse/build-macosx.xml decora-sse/build-windows.xml decora-sse/build.xml decora-sse/decora-sse.iml decora-sse/nbproject/project.xml decora-sse/project.properties decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSEBoxBlurPeer.java decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSEBoxShadowPeer.java decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSEEffectPeer.java decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSELinearConvolvePeer.java decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSELinearConvolveShadowPeer.java decora-sse/src/com/sun/scenario/effect/impl/sw/sse/SSERendererDelegate.java generator.gradle javafx-ui-controls/src/javafx/scene/control/Pagination.java
diffstat 193 files changed, 24834 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build-decora.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora" default="dist" basedir=".">
+    <description>Builds, tests, and runs the project decora.</description>
+
+    <import file="../build-defs.xml"/>
+    
+
+    <!--
+        Platform specific checks...
+      -->
+
+    <target name="init">
+      <condition property="isLinuxOrSolaris">
+        <or>
+          <istrue value="${isLinux}"/>
+          <istrue value="${isSolaris}"/>
+        </or>
+      </condition>
+
+      <property name="try.sse" value="true"/>
+      <!-- only build decora-sse on Windows and Mac OS X -->
+      <condition property="include.sse">
+        <and>
+          <istrue value="${try.sse}"/>
+          <isfalse value="${skip.decora.native.builds}"/>
+          <or>
+            <istrue value="${isWindows}"/>
+            <istrue value="${isMacOSX}"/>
+          </or>
+        </and>
+      </condition>
+ 
+      <condition property="sse.native.lib.file"
+                 value="libdecora-sse.dylib"
+                 else="decora-sse.dll">
+        <istrue value="${isMacOSX}"/>
+      </condition>
+
+      <fileset dir="${basedir}" id="decora.binaries.to.be.copied">
+        <include name="decora-runtime/dist/decora-runtime.jar"/>
+        <include name="decora-jsw/dist/decora-jsw.jar"/>
+        <include name="decora-sse/dist/decora-sse.jar" if="include.sse"/>
+      </fileset>
+    </target>
+
+
+    <!--
+        Build targets...
+      -->
+
+    <target name="build-compiler">
+      <ant antfile="decora-compiler/build.xml" target="jar" inheritAll="false"/>
+    </target>
+
+    <target name="build-runtime">
+      <ant antfile="decora-runtime/build.xml" target="jar" inheritAll="false"/>
+    </target>
+
+    <target name="build-jsw">
+      <ant antfile="decora-jsw/build.xml" target="jar" inheritAll="false"/>
+    </target>
+
+    <target name="build-sse" if="include.sse">
+      <ant antfile="decora-sse/build.xml" target="jar" inheritAll="false"/>
+    </target>
+
+    <target name="dist" depends="init">
+      <antcall target="build-compiler"/>
+      <antcall target="build-runtime"/>
+      <antcall target="build-jsw"/>
+      <antcall target="build-sse"/>
+      <copy todir="${jfx.sdk.desktop.dir}" flatten="true">
+        <fileset refid="decora.binaries.to.be.copied"/>
+        <fileset dir="${basedir}">
+          <include name="decora-sse-native/dist/${sse.native.lib.file}" if="include.sse"/>
+        </fileset>
+      </copy>
+    </target>
+
+    <target name="deploy-sse" if="include.sse" depends="platform-jars">
+      <copy tofile="${jfx.deployed.desktop.dir}/decora-sse-natives-${platform}.jar">
+        <fileset file="decora-sse/dist/decora-sse-native.jar"/>
+      </copy>      
+    </target>
+
+    <target name="deploy" depends="init">
+      <copy todir="${jfx.deployed.desktop.dir}" flatten="true">
+        <fileset refid="decora.binaries.to.be.copied"/>
+      </copy>
+      <antcall target="deploy-sse"/>
+    </target>
+    
+
+    <!--
+        Clean-up targets...
+      -->
+
+    <target name="clean-compiler">
+      <ant antfile="decora-compiler/build.xml" target="clean" inheritAll="false"/>
+    </target>
+
+    <target name="clean-runtime">
+      <ant antfile="decora-runtime/build.xml" target="clean" inheritAll="false"/>
+    </target>
+
+    <target name="clean-jsw">
+      <ant antfile="decora-jsw/build.xml" target="clean" inheritAll="false"/>
+    </target>
+
+    <target name="clean-sse" if="include.sse">
+      <ant antfile="decora-sse/build.xml" target="clean" inheritAll="false"/>
+    </target>
+
+    <target name="clean" depends="init">
+      <antcall target="clean-compiler"/>
+      <antcall target="clean-runtime"/>
+      <antcall target="clean-jsw"/>
+      <antcall target="clean-sse"/>
+    </target>
+
+    <!-- Mac specific fat binary stripping -->
+  <macrodef name="platform-jar-from-universal" description="build jar with stripped native libs">
+        <attribute name="arch" description="target architecture"/>
+        <attribute name="srcdir" description="directory with universal binaries"/>
+        <attribute name="jarname" description="name of jar for universal binaries"/>
+        <attribute name="destdir" description="directory for final jar"/>
+
+        <sequential>
+           <tempfile property="tmp.dir" prefix="lipo-"/>
+
+           <mkdir dir="${tmp.dir}"/>
+           <apply executable="lipo">
+              <srcfile/>
+              <arg value="-extract"/>
+              <arg value="@{arch}"/>
+              <arg value="-output"/>
+              <targetfile/>
+              <fileset dir="@{srcdir}" includes="*.dylib"/>
+              <mapper type="glob" from="*" to="${tmp.dir}/*"/>
+           </apply>
+           <jar file="${tmp.dir}/@{jarname}">
+              <fileset dir="${tmp.dir}" includes="*.dylib"/>
+           </jar>
+           <move todir="@{destdir}">
+               <fileset file="${tmp.dir}/@{jarname}"/>
+               <mapper type="glob" from="*-universal.jar" to="*-@{arch}.jar" />
+           </move>
+           <delete dir="${tmp.dir}"/>
+         </sequential>
+    </macrodef>
+
+    <target name="platform-jars" if="isMacOSX">
+        <echo message="deploy native (arch specific)"/>
+        <platform-jar-from-universal arch="i386" srcdir="decora-sse-native/dist"
+            destdir="${jfx.deployed.desktop.dir}" jarname="decora-sse-natives-${platform}.jar"/>
+        <platform-jar-from-universal arch="x86_64" srcdir="decora-sse-native/dist"
+            destdir="${jfx.deployed.desktop.dir}" jarname="decora-sse-natives-${platform}.jar"/>
+    </target>  
+</project>
--- a/build.gradle	Thu Feb 07 08:37:11 2013 -0800
+++ b/build.gradle	Thu Feb 07 13:14:03 2013 -0800
@@ -192,22 +192,9 @@
     processResources.dependsOn copyShaders
 
     test {
-//        systemProperty "javafx.toolkit", "com.sun.javafx.pgstub.StubToolkit"
         enableAssertions = true
         testLogging.exceptionFormat = "full"
         forkEvery = 1
-        // show standard out and standard error of the test JVM(s) on the console
-//        testLogging.showStandardStreams = true
-
-        // listen to events in the test execution lifecycle
-//        beforeTest { descriptor ->
-//           logger.lifecycle("Running test: " + descriptor)
-//        }
-
-        // listen to standard out and standard error of the test JVM(s)
-//        onOutput { descriptor, event ->
-//           logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
-//        }
     }
 
     // TODO Need to compile the Decora SSE Natives now! I don't yet know how to compile natives
@@ -232,9 +219,16 @@
     }
 }
 
-project(":fxml") {
-    dependencies {
-        compile project(":build-tools"), project(":base"), project(":graphics"),
-                project(":controls"), /*project(":media"), project(":web"),*/ project(":swt"), project(":swing")
-    }
-}
\ No newline at end of file
+//project(":web") {
+//    dependencies {
+//        compile project(":build-tools"), project(":base"), project(":graphics"),
+//                project(":controls"), /*project(":media"),*/ project(":swt"), project(":swing")
+//    }
+//}
+//
+//project(":fxml") {
+//    dependencies {
+//        compile project(":build-tools"), project(":base"), project(":graphics"),
+//                project(":controls"), /*project(":media"),*/ project(":web"), project(":swt"), project(":swing")
+//    }
+//}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-d3d/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-d3d" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-d3d.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <property name="jfx.build.needs.visual.studio" value="true"/>
+  <property name="jfx.build.needs.make.utility" value="true"/>
+
+  <property name="hlsl.dir" value="build/gensrc/com/sun/scenario/effect/impl/hw/d3d/hlsl"/>
+  <target name="hlsl-to-obj">
+    <apply executable="${dxsdk.path}/utilities/bin/x86/fxc"
+           dest="${hlsl.dir}" dir="${hlsl.dir}"
+           parallel="false" failonerror="true">
+      <arg value="/nologo"/>
+      <arg value="/T"/>
+      <arg value="ps_3_0"/>
+      <arg value="/Fo"/>
+      <targetfile/>
+      <srcfile/>
+      <fileset dir="${hlsl.dir}" includes="*.hlsl"/>
+      <mapper type="glob" from="*.hlsl" to="*.obj"/>
+    </apply>
+  </target>
+  
+  <target name="check-native">
+    <condition property="native.uptodate">
+      <and>
+        <uptodate srcfile="${cpp.dir}/D3DShader.h"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DShader.cc"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DRenderer.h"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DRenderer.cc"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DVB.cc"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DVB.h"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/D3DDecora.h"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/Trace.h"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/Trace.cc"
+                  targetfile="${dll.file}" />
+        <uptodate srcfile="${cpp.dir}/PassThroughVS.hlsl"
+                  targetfile="${dll.file}" />
+      </and>
+    </condition>
+  </target>
+
+  <target name="jar" depends="init">
+    <antcall target="hlsl-to-obj"/>
+    <build-project>
+      <addedsrcdirs>
+        <pathelement location="build/gensrc"/>
+      </addedsrcdirs>
+      <addedsrcfiles>
+        <fileset dir="build/gensrc" excludes="${build.classes.excludes}"/>
+      </addedsrcfiles>
+    </build-project>
+  </target>
+  
+  <target name="clean">
+    <get-cygwin-path/>
+    <clean-project/>
+  </target>
+  
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-d3d/decora-d3d.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="javafx-geom" />
+    <orderEntry type="module" module-name="prism-common" />
+    <orderEntry type="module" module-name="javafx-font" />
+    <orderEntry type="module" module-name="decora-runtime" />
+    <orderEntry type="module" module-name="javafx-common" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-d3d/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-d3d</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-d3d.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-d3d.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-d3d.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-d3d.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-d3d/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,7 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-common/dist/javafx-common.jar:\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar:\
+    ${runtime.dist.root.dir}/glass/glass-mat/dist/glass.jar
+
+build.classes.excludes=**/*.java,**/*.form,**/*.hlsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-d3d/src/com/sun/scenario/effect/impl/hw/d3d/D3DShaderSource.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.hw.d3d;
+
+import java.io.InputStream;
+import com.sun.scenario.effect.Effect.AccelType;
+import com.sun.scenario.effect.impl.hw.ShaderSource;
+
+public class D3DShaderSource implements ShaderSource {
+
+    public D3DShaderSource() {
+    }
+
+    public InputStream loadSource(String name) {
+        return D3DShaderSource.class.
+            getResourceAsStream("hlsl/" + name + ".obj");
+    }
+
+    public AccelType getAccelType() {
+        return AccelType.DIRECT3D;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-es2/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-es2" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-es2.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <target name="jar" depends="init">
+    <build-project>
+      <addedsrcdirs>
+        <pathelement location="build/gensrc"/>
+      </addedsrcdirs>
+      <addedsrcfiles>
+        <fileset dir="build/gensrc" excludes="${build.classes.excludes}"/>
+      </addedsrcfiles>
+    </build-project>
+  </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-es2/decora-es2.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="decora-runtime" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-es2/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-es2</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-es2.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-es2.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-es2.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-es2.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-es2/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,4 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-es2/src/com/sun/scenario/effect/impl/es2/ES2ShaderSource.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.es2;
+
+import java.io.InputStream;
+import com.sun.scenario.effect.Effect.AccelType;
+import com.sun.scenario.effect.impl.hw.ShaderSource;
+
+public class ES2ShaderSource implements ShaderSource {
+
+    public ES2ShaderSource() {
+    }
+
+    public InputStream loadSource(String name) {
+        return ES2ShaderSource.class.
+            getResourceAsStream("glsl/" + name + ".frag");
+    }
+
+    public AccelType getAccelType() {
+        return AccelType.OPENGL;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-jsw" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-jsw.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <target name="jar" depends="init">
+    <build-project>
+      <addedsrcdirs>
+        <pathelement location="build/gensrc"/>
+      </addedsrcdirs>
+      <addedsrcfiles>
+        <fileset dir="build/gensrc" excludes="${build.classes.excludes}"/>
+      </addedsrcfiles>
+    </build-project>
+  </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/decora-jsw.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="decora-runtime" />
+    <orderEntry type="module" module-name="javafx-geom" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-jsw</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-jsw.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-jsw.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-jsw.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-jsw.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,3 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWBoxBlurPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file was originally generated by JSLC
+ * and then hand edited for performance.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.BoxBlur;
+import com.sun.scenario.effect.impl.HeapImage;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+
+public class JSWBoxBlurPeer extends JSWEffectPeer {
+
+    public JSWBoxBlurPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    protected final BoxBlur getEffect() {
+        return (BoxBlur)super.getEffect();
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        // NOTE: for now, all input images must be TYPE_INT_ARGB_PRE
+        setEffect(effect);
+        Rectangle dstBounds = getResultBounds(transform, outputClip, inputs);
+
+        // Calculate the amount the image grows on each iteration (size-1)
+        boolean horizontal = (getPass() == 0);
+        int hinc = horizontal ? getEffect().getHorizontalSize() - 1 : 0;
+        int vinc = horizontal ? 0 : getEffect().getVerticalSize() - 1;
+        int iterations = getEffect().getPasses();
+        if (iterations < 1 || (hinc < 1 && vinc < 1)) {
+            inputs[0].addref();
+            return inputs[0];
+        }
+        // Calculate the amount the image will grow through the full operation
+        // Always upgrade to the next even amount of growth
+        int growx = (hinc * iterations + 1) & (~0x1);
+        int growy = (vinc * iterations + 1) & (~0x1);
+
+        // Assert: ((FilterEffect) effect).operatesInUserSpace()...
+        // NOTE: We could still have a transformed ImageData for other reasons...
+        HeapImage src = (HeapImage)inputs[0].getUntransformedImage();
+        Rectangle srcr = inputs[0].getUntransformedBounds();
+
+        HeapImage cur = src;
+        int curw = srcr.width;
+        int curh = srcr.height;
+        int curscan = cur.getScanlineStride();
+        int[] curPixels = cur.getPixelArray();
+
+        int finalw = curw + growx;
+        int finalh = curh + growy;
+        while (curw < finalw || curh < finalh) {
+            int neww = curw + hinc;
+            int newh = curh + vinc;
+            if (neww > finalw) neww = finalw;
+            if (newh > finalh) newh = finalh;
+            HeapImage dst = (HeapImage)getRenderer().getCompatibleImage(neww, newh);
+            int newscan = dst.getScanlineStride();
+            int[] newPixels = dst.getPixelArray();
+            if (horizontal) {
+                filterHorizontal(newPixels, neww, newh, newscan,
+                                 curPixels, curw, curh, curscan);
+            } else {
+                filterVertical(newPixels, neww, newh, newscan,
+                               curPixels, curw, curh, curscan);
+            }
+            if (cur != src) {
+                getRenderer().releaseCompatibleImage(cur);
+            }
+            cur = dst;
+            curw = neww;
+            curh = newh;
+            curPixels = newPixels;
+            curscan = newscan;
+        }
+
+        Rectangle resBounds =
+            new Rectangle(srcr.x - growx/2, srcr.y - growy/2, curw, curh);
+        return new ImageData(getFilterContext(), cur, resBounds);
+    }
+
+    protected void filterHorizontal(int dstPixels[], int dstw, int dsth, int dstscan,
+                                    int srcPixels[], int srcw, int srch, int srcscan)
+    {
+        int hsize = dstw - srcw + 1;
+        int kscale = 0x7fffffff / (hsize * 255);
+        int srcoff = 0;
+        int dstoff = 0;
+        for (int y = 0; y < dsth; y++) {
+            int suma = 0;
+            int sumr = 0;
+            int sumg = 0;
+            int sumb = 0;
+            for (int x = 0; x < dstw; x++) {
+                int rgb;
+                // Un-accumulate the data for col-hsize location into the sums.
+                rgb = (x >= hsize) ? srcPixels[srcoff + x - hsize] : 0;
+                suma -= (rgb >>> 24);
+                sumr -= (rgb >>  16) & 0xff;
+                sumg -= (rgb >>   8) & 0xff;
+                sumb -= (rgb       ) & 0xff;
+                // Accumulate the data for this col location into the sums.
+                rgb = (x < srcw) ? srcPixels[srcoff + x] : 0;
+                suma += (rgb >>> 24);
+                sumr += (rgb >>  16) & 0xff;
+                sumg += (rgb >>   8) & 0xff;
+                sumb += (rgb       ) & 0xff;
+                dstPixels[dstoff + x] =
+                    (((suma * kscale) >> 23) << 24) +
+                    (((sumr * kscale) >> 23) << 16) +
+                    (((sumg * kscale) >> 23) <<  8) +
+                    (((sumb * kscale) >> 23)      );
+            }
+            srcoff += srcscan;
+            dstoff += dstscan;
+        }
+    }
+
+    protected void filterVertical(int dstPixels[], int dstw, int dsth, int dstscan,
+                                  int srcPixels[], int srcw, int srch, int srcscan)
+    {
+        int vsize = dsth - srch + 1;
+        int kscale = 0x7fffffff / (vsize * 255);
+        int voff = vsize * srcscan;
+        for (int x = 0; x < dstw; x++) {
+            int suma = 0;
+            int sumr = 0;
+            int sumg = 0;
+            int sumb = 0;
+            int srcoff = x;
+            int dstoff = x;
+            for (int y = 0; y < dsth; y++) {
+                int rgb;
+                // Un-accumulate the data for row-vsize location into the sums.
+                rgb = (srcoff >= voff) ? srcPixels[srcoff - voff] : 0;
+                suma -= (rgb >>> 24);
+                sumr -= (rgb >>  16) & 0xff;
+                sumg -= (rgb >>   8) & 0xff;
+                sumb -= (rgb       ) & 0xff;
+                // Accumulate the data for this row location into the sums.
+                rgb = (y < srch) ? srcPixels[srcoff] : 0;
+                suma += (rgb >>> 24);
+                sumr += (rgb >>  16) & 0xff;
+                sumg += (rgb >>   8) & 0xff;
+                sumb += (rgb       ) & 0xff;
+                dstPixels[dstoff] =
+                    (((suma * kscale) >> 23) << 24) +
+                    (((sumr * kscale) >> 23) << 16) +
+                    (((sumg * kscale) >> 23) <<  8) +
+                    (((sumb * kscale) >> 23)      );
+                srcoff += srcscan;
+                dstoff += dstscan;
+            }
+        }
+    }
+
+    /*
+     * This is a useful routine for some uses - it goes faster than the
+     * horizontal-only and vertical-only loops, but it is hard to use it
+     * in the face of multi-pass box blurs and having to adjust for even
+     * blur sizes, so it is commented out for now...
+    private void filterTranspose(int dstPixels[], int dstw, int dsth, int dstscan,
+                                 int srcPixels[], int srcw, int srch, int srcscan,
+                                 int ksize)
+    {
+        int kscale = 0x7fffffff / (ksize * 255);
+        int srcoff = 0;
+        for (int y = 0; y < dstw; y++) {
+            int suma = 0;
+            int sumr = 0;
+            int sumg = 0;
+            int sumb = 0;
+            int dstoff = y;
+            for (int x = 0; x < dsth; x++) {
+                int rgb;
+                // Un-accumulate the data for col-ksize location into the sums.
+                rgb = (x >= ksize) ? srcPixels[srcoff + x - ksize] : 0;
+                suma -= (rgb >>> 24);
+                sumr -= (rgb >>  16) & 0xff;
+                sumg -= (rgb >>   8) & 0xff;
+                sumb -= (rgb       ) & 0xff;
+                // Accumulate the data for this col location into the sums.
+                rgb = (x < srcw) ? srcPixels[srcoff + x] : 0;
+                suma += (rgb >>> 24);
+                sumr += (rgb >>  16) & 0xff;
+                sumg += (rgb >>   8) & 0xff;
+                sumb += (rgb       ) & 0xff;
+                dstPixels[dstoff] =
+                    (((suma * kscale) >> 23) << 24) +
+                    (((sumr * kscale) >> 23) << 16) +
+                    (((sumg * kscale) >> 23) <<  8) +
+                    (((sumb * kscale) >> 23)      );
+                dstoff += dstscan;
+            }
+            srcoff += srcscan;
+        }
+    }
+     */
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWBoxShadowPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file was originally generated by JSLC
+ * and then hand edited for performance.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.BoxShadow;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.HeapImage;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+
+public class JSWBoxShadowPeer extends JSWEffectPeer {
+
+    public JSWBoxShadowPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    protected final BoxShadow getEffect() {
+        return (BoxShadow)super.getEffect();
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        // NOTE: for now, all input images must be TYPE_INT_ARGB_PRE
+        setEffect(effect);
+        Rectangle dstBounds = getResultBounds(transform, outputClip, inputs);
+
+        // Calculate the amount the image grows on each iteration (size-1)
+        boolean horizontal = (getPass() == 0);
+        int hinc = horizontal ? getEffect().getHorizontalSize() - 1 : 0;
+        int vinc = horizontal ? 0 : getEffect().getVerticalSize() - 1;
+        if (hinc < 0) hinc = 0;
+        if (vinc < 0) vinc = 0;
+        int iterations = getEffect().getPasses();
+        float spread = getEffect().getSpread();
+        if (horizontal && (iterations < 1 || (hinc < 1 && vinc < 1))) {
+            inputs[0].addref();
+            return inputs[0];
+        }
+        // Calculate the amount the image will grow through the full operation
+        // Always upgrade to the next even amount of growth
+        int growx = (hinc * iterations + 1) & (~0x1);
+        int growy = (vinc * iterations + 1) & (~0x1);
+
+        // Assert: ((FilterEffect) effect).operatesInUserSpace()...
+        // NOTE: We could still have a transformed ImageData for other reasons...
+        HeapImage src = (HeapImage)inputs[0].getUntransformedImage();
+        Rectangle srcr = inputs[0].getUntransformedBounds();
+
+        HeapImage cur = src;
+        int curw = srcr.width;
+        int curh = srcr.height;
+        int curscan = cur.getScanlineStride();
+        int[] curPixels = cur.getPixelArray();
+
+        int finalw = curw + growx;
+        int finalh = curh + growy;
+        boolean force = !horizontal;
+        while (force || curw < finalw || curh < finalh) {
+            int neww = curw + hinc;
+            int newh = curh + vinc;
+            if (neww > finalw) neww = finalw;
+            if (newh > finalh) newh = finalh;
+            HeapImage dst = (HeapImage)getRenderer().getCompatibleImage(neww, newh);
+            int newscan = dst.getScanlineStride();
+            int[] newPixels = dst.getPixelArray();
+            if (iterations == 0) {
+                // The last "fixup" iteration of 2 should have no spread.
+                spread = 0f;
+            }
+            if (horizontal) {
+                filterHorizontalBlack(newPixels, neww, newh, newscan,
+                                      curPixels, curw, curh, curscan,
+                                      spread);
+            } else if (neww < finalw || newh < finalh) {
+                // Use BLACK for shadow color until very last pass
+                filterVerticalBlack(newPixels, neww, newh, newscan,
+                                    curPixels, curw, curh, curscan,
+                                    spread);
+            } else {
+                float shadowColor[] =
+                     getEffect().getColor().getPremultipliedRGBComponents();
+                if (shadowColor[3] == 1f &&
+                    shadowColor[0] == 0f &&
+                    shadowColor[1] == 0f &&
+                    shadowColor[2] == 0f)
+                {
+                    filterVerticalBlack(newPixels, neww, newh, newscan,
+                                        curPixels, curw, curh, curscan,
+                                        spread);
+                } else {
+                    filterVertical(newPixels, neww, newh, newscan,
+                                   curPixels, curw, curh, curscan,
+                                   spread, shadowColor);
+                }
+            }
+            if (cur != src) {
+                getRenderer().releaseCompatibleImage(cur);
+            }
+            iterations--;
+            force = false;
+            cur = dst;
+            curw = neww;
+            curh = newh;
+            curPixels = newPixels;
+            curscan = newscan;
+        }
+
+        Rectangle resBounds =
+            new Rectangle(srcr.x - growx/2, srcr.y - growy/2, curw, curh);
+        return new ImageData(getFilterContext(), cur, resBounds);
+    }
+
+    protected void filterHorizontalBlack(int dstPixels[], int dstw, int dsth, int dstscan,
+                                         int srcPixels[], int srcw, int srch, int srcscan,
+                                         float spread)
+    {
+        int hsize = dstw - srcw + 1;
+        // amax goes from hsize*255 to 255 as spread goes from 0 to 1
+        int amax = hsize * 255;
+        amax += (255 - amax) * spread;
+        int kscale = 0x7fffffff / amax;
+        int amin = (amax / 255);
+        int srcoff = 0;
+        int dstoff = 0;
+        for (int y = 0; y < dsth; y++) {
+            int suma = 0;
+            for (int x = 0; x < dstw; x++) {
+                int rgb;
+                // Un-accumulate the data for col-hsize location into the sums.
+                rgb = (x >= hsize) ? srcPixels[srcoff + x - hsize] : 0;
+                suma -= (rgb >>> 24);
+                // Accumulate the data for this col location into the sums.
+                rgb = (x < srcw) ? srcPixels[srcoff + x] : 0;
+                suma += (rgb >>> 24);
+                // Clamp, scale and convert the sum into a color.
+                dstPixels[dstoff + x] =
+                    ((suma < amin) ? 0
+                     : ((suma >= amax) ? 0xff000000
+                        : (((suma * kscale) >> 23) << 24)));
+            }
+            srcoff += srcscan;
+            dstoff += dstscan;
+        }
+    }
+
+    protected void filterVerticalBlack(int dstPixels[], int dstw, int dsth, int dstscan,
+                                       int srcPixels[], int srcw, int srch, int srcscan,
+                                       float spread)
+    {
+        int vsize = dsth - srch + 1;
+        // amax goes from hsize*255 to 255 as spread goes from 0 to 1
+        int amax = vsize * 255;
+        amax += (255 - amax) * spread;
+        int kscale = 0x7fffffff / amax;
+        int amin = (amax / 255);
+        int voff = vsize * srcscan;
+        for (int x = 0; x < dstw; x++) {
+            int suma = 0;
+            int srcoff = x;
+            int dstoff = x;
+            for (int y = 0; y < dsth; y++) {
+                int rgb;
+                // Un-accumulate the data for row-vsize location into the sums.
+                rgb = (srcoff >= voff) ? srcPixels[srcoff - voff] : 0;
+                suma -= (rgb >>> 24);
+                // Accumulate the data for this row location into the sums.
+                rgb = (y < srch) ? srcPixels[srcoff] : 0;
+                suma += (rgb >>> 24);
+                // Clamp, scale and convert the sum into a color.
+                dstPixels[dstoff] =
+                    ((suma < amin) ? 0
+                     : ((suma >= amax) ? 0xff000000
+                        : (((suma * kscale) >> 23) << 24)));
+                srcoff += srcscan;
+                dstoff += dstscan;
+            }
+        }
+    }
+
+    protected void filterVertical(int dstPixels[], int dstw, int dsth, int dstscan,
+                                  int srcPixels[], int srcw, int srch, int srcscan,
+                                  float spread, float shadowColor[])
+    {
+        int vsize = dsth - srch + 1;
+        // amax goes from hsize*255 to 255 as spread goes from 0 to 1
+        int amax = vsize * 255;
+        amax += (255 - amax) * spread;
+        int kscalea = 0x7fffffff / amax;
+        int kscaler = (int) (kscalea * shadowColor[0]);
+        int kscaleg = (int) (kscalea * shadowColor[1]);
+        int kscaleb = (int) (kscalea * shadowColor[2]);
+        kscalea *= shadowColor[3];
+        int amin = (amax / 255);
+        int voff = vsize * srcscan;
+        int shadowRGB =
+            (((int) (shadowColor[0] * 255)) << 16) |
+            (((int) (shadowColor[1] * 255)) <<  8) |
+            (((int) (shadowColor[2] * 255))      ) |
+            (((int) (shadowColor[3] * 255)) << 24);
+        for (int x = 0; x < dstw; x++) {
+            int suma = 0;
+            int srcoff = x;
+            int dstoff = x;
+            for (int y = 0; y < dsth; y++) {
+                int rgb;
+                // Un-accumulate the data for row-vsize location into the sums.
+                rgb = (srcoff >= voff) ? srcPixels[srcoff - voff] : 0;
+                suma -= (rgb >>> 24);
+                // Accumulate the data for this row location into the sums.
+                rgb = (y < srch) ? srcPixels[srcoff] : 0;
+                suma += (rgb >>> 24);
+                // Clamp, scale and convert the sum into a color.
+                dstPixels[dstoff] =
+                    ((suma < amin) ? 0
+                     : ((suma >= amax) ? shadowRGB
+                        : ((((suma * kscalea) >> 23) << 24) |
+                           (((suma * kscaler) >> 23) << 16) |
+                           (((suma * kscaleg) >> 23) <<  8) |
+                           (((suma * kscaleb) >> 23)      ))));
+                srcoff += srcscan;
+                dstoff += dstscan;
+            }
+        }
+    }
+
+    /*
+     * This is a useful routine for some uses - it goes faster than the
+     * horizontal-only and vertical-only loops, but it is hard to use it
+     * in the face of multi-pass box blurs and having to adjust for even
+     * blur sizes, so it is commented out for now...
+    private void filterTranspose(int dstPixels[], int dstw, int dsth, int dstscan,
+                                 int srcPixels[], int srcw, int srch, int srcscan,
+                                 int ksize)
+    {
+        int kscale = 0x7fffffff / (ksize * 255);
+        int srcoff = 0;
+        for (int y = 0; y < dstw; y++) {
+            int suma = 0;
+            int dstoff = y;
+            for (int x = 0; x < dsth; x++) {
+                int rgb;
+                // Un-accumulate the data for col-ksize location into the sums.
+                rgb = (x >= ksize) ? srcPixels[srcoff + x - ksize] : 0;
+                suma -= (rgb >>> 24);
+                // Accumulate the data for this col location into the sums.
+                rgb = (x < srcw) ? srcPixels[srcoff + x] : 0;
+                suma += (rgb >>> 24);
+                dstPixels[dstoff] = (((suma * kscale) >> 23) << 24);
+                dstoff += dstscan;
+            }
+            srcoff += srcscan;
+        }
+    }
+     */
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWEffectPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+
+public abstract class JSWEffectPeer extends EffectPeer {
+
+    protected JSWEffectPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    protected final static int FVALS_A = 3;
+    protected final static int FVALS_R = 0;
+    protected final static int FVALS_G = 1;
+    protected final static int FVALS_B = 2;
+
+    protected final void laccum(int pixel, float mul, float fvals[]) {
+        mul /= 255f;
+        fvals[FVALS_R] += ((pixel >>  16) & 0xff) * mul;
+        fvals[FVALS_G] += ((pixel >>   8) & 0xff) * mul;
+        fvals[FVALS_B] += ((pixel       ) & 0xff) * mul;
+        fvals[FVALS_A] += ((pixel >>> 24)       ) * mul;
+    }
+
+    protected final void lsample(int img[],
+                                 float floc_x, float floc_y,
+                                 int w, int h, int scan,
+                                 float fvals[])
+    {
+        fvals[0] = 0f;
+        fvals[1] = 0f;
+        fvals[2] = 0f;
+        fvals[3] = 0f;
+        // If we subtract 0.5 then floc_xy could go negative and the
+        // integer cast will not perform a true floor operation so
+        // instead we add 0.5 and then iloc_xy will be off by 1
+        floc_x = floc_x * w + 0.5f;
+        floc_y = floc_y * h + 0.5f;
+        int iloc_x = (int) floc_x;  // 0 <= iloc_x <= w
+        int iloc_y = (int) floc_y;  // 0 <= iloc_y <= h
+        // Note we test floc against 0 because iloc may have rounded the wrong way
+        // for some numbers.  But, iloc values are valid for testing against w,h
+        if (floc_x > 0 && floc_y > 0 && iloc_x <= w && iloc_y <= h) {
+            floc_x -= iloc_x;   // now fractx
+            floc_y -= iloc_y;   // now fracty
+            // sample box from iloc_x-1,y-1 to iloc_x,y
+            int offset = iloc_y * scan + iloc_x;
+            float fract = floc_x * floc_y;
+            if (iloc_y < h) {
+                if (iloc_x < w) {
+                    laccum(img[offset], fract, fvals);
+                }
+                if (iloc_x > 0) {
+                    laccum(img[offset-1], floc_y - fract, fvals);
+                }
+            }
+            if (iloc_y > 0) {
+                if (iloc_x < w) {
+                    laccum(img[offset-scan], floc_x - fract, fvals);
+                }
+                if (iloc_x > 0) {
+                    laccum(img[offset-scan-1], 1f - floc_x - floc_y + fract, fvals);
+                }
+            }
+        }
+    }
+
+    protected final void laccumsample(int img[],
+                                      float fpix_x, float fpix_y,
+                                      int w, int h, int scan,
+                                      float factor, float fvals[])
+    {
+        factor *= 255f;
+        // If we subtract 0.5 then floc_xy could go negative and the
+        // integer cast will not perform a true floor operation so
+        // instead we add 0.5 and then iloc_xy will be off by 1
+        fpix_x = fpix_x + 0.5f;
+        fpix_y = fpix_y + 0.5f;
+        int ipix_x = (int) fpix_x;  // 0 <= ipix_x <= w
+        int ipix_y = (int) fpix_y;  // 0 <= ipix_y <= h
+        // Note we test fpix against 0 because ipix may have rounded the wrong way
+        // for some numbers.  But, ipix values are valid for testing against w,h
+        if (fpix_x > 0 && fpix_y > 0 && ipix_x <= w && ipix_y <= h) {
+            fpix_x -= ipix_x;   // now fractx
+            fpix_y -= ipix_y;   // now fracty
+            // sample box from ipix_x-1,y-1 to ipix_x,y
+            int offset = ipix_y * scan + ipix_x;
+            float fract = fpix_x * fpix_y;
+            if (ipix_y < h) {
+                if (ipix_x < w) {
+                    laccum(img[offset], fract * factor, fvals);
+                }
+                if (ipix_x > 0) {
+                    laccum(img[offset-1], (fpix_y - fract) * factor, fvals);
+                }
+            }
+            if (ipix_y > 0) {
+                if (ipix_x < w) {
+                    laccum(img[offset-scan], (fpix_x - fract) * factor, fvals);
+                }
+                if (ipix_x > 0) {
+                    laccum(img[offset-scan-1], (1f - fpix_x - fpix_y + fract) * factor, fvals);
+                }
+            }
+        }
+    }
+
+    protected final void faccum(float map[], int offset, float mul,
+                                float fvals[])
+    {
+        fvals[0] += map[offset  ] * mul;
+        fvals[1] += map[offset+1] * mul;
+        fvals[2] += map[offset+2] * mul;
+        fvals[3] += map[offset+3] * mul;
+    }
+
+    protected final void fsample(float map[],
+                                 float floc_x, float floc_y,
+                                 int w, int h, int scan,
+                                 float fvals[])
+    {
+        fvals[0] = 0f;
+        fvals[1] = 0f;
+        fvals[2] = 0f;
+        fvals[3] = 0f;
+        // If we subtract 0.5 then floc_xy could go negative and the
+        // integer cast will not perform a true floor operation so
+        // instead we add 0.5 and then iloc_xy will be off by 1
+        floc_x = floc_x * w + 0.5f;
+        floc_y = floc_y * h + 0.5f;
+        int iloc_x = (int) floc_x;  // 0 <= iloc_x <= w
+        int iloc_y = (int) floc_y;  // 0 <= iloc_y <= h
+        // Note we test floc against 0 because iloc may have rounded the wrong way
+        // for some numbers.  But, iloc values are valid for testing against w,h
+        if (floc_x > 0 && floc_y > 0 && iloc_x <= w && iloc_y <= h) {
+            floc_x -= iloc_x;   // now fractx
+            floc_y -= iloc_y;   // now fracty
+            // sample box from iloc_x-1,y-1 to iloc_x,y
+            int offset = 4*(iloc_y * scan + iloc_x);
+            float fract = floc_x * floc_y;
+            if (iloc_y < h) {
+                if (iloc_x < w) {
+                    faccum(map, offset, fract, fvals);
+                }
+                if (iloc_x > 0) {
+                    faccum(map, offset-4, floc_y - fract, fvals);
+                }
+            }
+            if (iloc_y > 0) {
+                if (iloc_x < w) {
+                    faccum(map, offset-scan*4, floc_x - fract, fvals);
+                }
+                if (iloc_x > 0) {
+                    faccum(map, offset-scan*4-4, 1f - floc_x - floc_y + fract, fvals);
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWLinearConvolvePeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file was originally generated by JSLC
+ * and then hand edited for performance.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import java.nio.FloatBuffer;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.impl.HeapImage;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.scenario.effect.impl.state.AccessHelper;
+import com.sun.scenario.effect.impl.state.LinearConvolveKernel;
+import com.sun.scenario.effect.impl.state.LinearConvolveKernel.PassType;
+import com.sun.scenario.effect.impl.state.LinearConvolvePeer;
+
+public class JSWLinearConvolvePeer extends JSWEffectPeer implements LinearConvolvePeer {
+
+    public JSWLinearConvolvePeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    protected final Effect getEffect() {
+        return (Effect)super.getEffect();
+    }
+
+    protected LinearConvolveKernel getKernel() {
+        return (LinearConvolveKernel) AccessHelper.getState(getEffect());
+    }
+
+    public int getPow2ScaleX(LinearConvolveKernel kernel) {
+        return kernel.getPow2ScaleX();
+    }
+
+    public int getPow2ScaleY(LinearConvolveKernel kernel) {
+        return kernel.getPow2ScaleY();
+    }
+
+    @Override
+    public Rectangle getResultBounds(BaseTransform transform,
+                                     Rectangle outputClip,
+                                     ImageData... inputDatas)
+    {
+        Rectangle r = inputDatas[0].getTransformedBounds(null);
+        r = getKernel().getScaledResultBounds(r, getPass());
+        r.intersectWith(outputClip);
+        return r;
+    }
+
+    private int getCount() {
+        return getKernel().getScaledKernelSize(getPass());
+    }
+
+    private float[] getOffset() {
+        return getKernel().getVector(getInputNativeBounds(0),
+                                     getInputTransform(0),
+                                     getPass());
+    }
+
+    private FloatBuffer getWeights() {
+        return getKernel().getWeights(getPass());
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        setEffect(effect);
+        Rectangle dstRawBounds = getResultBounds(transform, null, inputs);
+        Rectangle dstBounds = new Rectangle(dstRawBounds);
+        dstBounds.intersectWith(outputClip);
+        setDestBounds(dstBounds);
+        int dstw = dstBounds.width;
+        int dsth = dstBounds.height;
+
+        // NOTE: for now, all input images must be TYPE_INT_ARGB_PRE
+        HeapImage src = (HeapImage)inputs[0].getUntransformedImage();
+        int srcw = src.getPhysicalWidth();
+        int srch = src.getPhysicalHeight();
+        int srcscan = src.getScanlineStride();
+        int[] srcPixels = src.getPixelArray();
+
+        Rectangle src0Bounds = inputs[0].getUntransformedBounds();
+        BaseTransform src0Transform = inputs[0].getTransform();
+        Rectangle src0NativeBounds = new Rectangle(0, 0, srcw, srch);
+        // Assert: ((FilterEffect) effect).operatesInUserSpace()...
+        setInputBounds(0, src0Bounds);
+        setInputTransform(0, src0Transform);
+        setInputNativeBounds(0, src0NativeBounds);
+
+        HeapImage dst = (HeapImage)getRenderer().getCompatibleImage(dstw, dsth);
+        setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
+        int dstscan = dst.getScanlineStride();
+        int[] dstPixels = dst.getPixelArray();
+
+        int count = getCount();
+        FloatBuffer weights_buf = getWeights();
+
+        PassType type = getKernel().getPassType(getPass());
+        if (!src0Transform.isIdentity() ||
+            !dstBounds.contains(dstRawBounds.x, dstRawBounds.y))
+        {
+            // RT-27387
+            // TODO: Fix the optimized loops to deal with non-zero srcxy0
+            // and transforms...
+            type = PassType.GENERAL_VECTOR;
+        }
+        type = PassType.GENERAL_VECTOR;
+        if (type == PassType.HORIZONTAL_CENTERED) {
+            float[] weights_arr = new float[count * 2];
+            weights_buf.get(weights_arr, 0, count);
+            weights_buf.rewind();
+            weights_buf.get(weights_arr, count, count);
+            filterHV(dstPixels, dstw, dsth, 1, dstscan,
+                     srcPixels, srcw, srch, 1, srcscan,
+                     weights_arr);
+        } else if (type == PassType.VERTICAL_CENTERED) {
+            float[] weights_arr = new float[count * 2];
+            weights_buf.get(weights_arr, 0, count);
+            weights_buf.rewind();
+            weights_buf.get(weights_arr, count, count);
+            filterHV(dstPixels, dsth, dstw, dstscan, 1,
+                     srcPixels, srch, srcw, srcscan, 1,
+                     weights_arr);
+        } else {
+            float[] weights_arr = new float[count];
+            weights_buf.get(weights_arr, 0, count);
+
+            float[] srcRect = new float[8];
+            int nCoords = getTextureCoordinates(0, srcRect,
+                                                src0Bounds.x, src0Bounds.y,
+                                                src0NativeBounds.width,
+                                                src0NativeBounds.height,
+                                                dstBounds, src0Transform);
+            float srcx0 = srcRect[0] * srcw;
+            float srcy0 = srcRect[1] * srch;
+            float dxcol, dycol, dxrow, dyrow;
+            if (nCoords < 8) {
+                dxcol = (srcRect[2] - srcRect[0]) * srcw / dstBounds.width;
+                dycol = 0f;
+                dxrow = 0f;
+                dyrow = (srcRect[3] - srcRect[1]) * srch / dstBounds.height;
+            } else {
+                dxcol = (srcRect[4] - srcRect[0]) * srcw / dstBounds.width;
+                dycol = (srcRect[5] - srcRect[1]) * srch / dstBounds.height;
+                dxrow = (srcRect[6] - srcRect[0]) * srcw / dstBounds.width;
+                dyrow = (srcRect[7] - srcRect[1]) * srch / dstBounds.height;
+            }
+
+            float[] offset_arr = getOffset();
+            float deltax = offset_arr[0] * srcw;
+            float deltay = offset_arr[1] * srch;
+            float offsetx = offset_arr[2] * srcw;
+            float offsety = offset_arr[3] * srch;
+
+            filterVector(dstPixels, dstw, dsth, dstscan,
+                         srcPixels, srcw, srch, srcscan,
+                         weights_arr, count,
+                         srcx0, srcy0,
+                         offsetx, offsety,
+                         deltax, deltay,
+                         dxcol, dycol, dxrow, dyrow);
+        }
+
+        return new ImageData(getFilterContext(), dst, dstBounds);
+    }
+
+    private static final float cmin = 1f;
+    private static final float cmax = 254f + 15f/16f;
+
+    protected void filterVector(int dstPixels[], int dstw, int dsth, int dstscan,
+                                int srcPixels[], int srcw, int srch, int srcscan,
+                                float weights[], int count,
+                                float srcx0, float srcy0,
+                                float offsetx, float offsety,
+                                float deltax, float deltay,
+                                float dxcol, float dycol, float dxrow, float dyrow)
+    {
+        int dstrow = 0;
+        float fvals[] = new float[4];
+        // srcxy0 point at UL corner, shift them to center of 1st dest pixel:
+        srcx0 += (dxrow + dxcol) * 0.5f;
+        srcy0 += (dyrow + dycol) * 0.5f;
+        for (int dy = 0; dy < dsth; dy++) {
+            float srcx = srcx0;
+            float srcy = srcy0;
+            for (int dx = 0; dx < dstw; dx++) {
+                fvals[0] = fvals[1] = fvals[2] = fvals[3] = 0.0f;
+                float sampx = srcx + offsetx;
+                float sampy = srcy + offsety;
+                for (int i = 0; i < count; ++i) {
+                    laccumsample(srcPixels, sampx, sampy,
+                                 srcw, srch, srcscan,
+                                 weights[i], fvals);
+                    sampx += deltax;
+                    sampy += deltay;
+                }
+                dstPixels[dstrow + dx] =
+                    (((fvals[FVALS_A] < cmin) ? 0 : ((fvals[FVALS_A] > cmax) ? 255 : ((int) fvals[FVALS_A]))) << 24) +
+                    (((fvals[FVALS_R] < cmin) ? 0 : ((fvals[FVALS_R] > cmax) ? 255 : ((int) fvals[FVALS_R]))) << 16) +
+                    (((fvals[FVALS_G] < cmin) ? 0 : ((fvals[FVALS_G] > cmax) ? 255 : ((int) fvals[FVALS_G]))) <<  8) +
+                    (((fvals[FVALS_B] < cmin) ? 0 : ((fvals[FVALS_B] > cmax) ? 255 : ((int) fvals[FVALS_B])))      );
+                srcx += dxcol;
+                srcy += dycol;
+            }
+            srcx0 += dxrow;
+            srcy0 += dyrow;
+            dstrow += dstscan;
+        }
+    }
+
+    /**
+     * In the nomenclature of the argument list for this method, "row" refers
+     * to the coordinate which increments once for each new stream of single
+     * axis data that we are blurring in a single pass.  And "col" refers to
+     * the other coordinate that increments along the row.
+     * Rows are horizontal in the first pass and vertical in the second pass.
+     * Cols are vice versa.
+     */
+    protected void filterHV(int dstPixels[], int dstcols, int dstrows, int dcolinc, int drowinc,
+                            int srcPixels[], int srccols, int srcrows, int scolinc, int srowinc,
+                            float weights[])
+    {
+        // cvals stores the component values from the surrounding K pixels
+        // from x-r to x+r
+        int kernelSize = weights.length / 2;
+        float cvals[] = new float[kernelSize * 4];
+        int dstrow = 0;
+        int srcrow = 0;
+        for (int r = 0; r < dstrows; r++) {
+            int dstoff = dstrow;
+            int srcoff = srcrow;
+            // Must clear out the array at the start of every line
+            // Might be able to rely on the fact that the previous line must
+            // have run out of data towards the end of the scan line, though.
+            for (int i = 0; i < cvals.length; i++) {
+                cvals[i] = 0f;
+            }
+            int koff = kernelSize;
+            for (int c = 0; c < dstcols; c++) {
+                // Load the data for this x location into the array.
+                int i = (kernelSize - koff) * 4;
+                int rgb = (c < srccols) ? srcPixels[srcoff] : 0;
+                cvals[i+0] = (rgb >>> 24);
+                cvals[i+1] = (rgb >>  16) & 0xff;
+                cvals[i+2] = (rgb >>   8) & 0xff;
+                cvals[i+3] = (rgb       ) & 0xff;
+                // Bump the koff to the next spot to align the coefficients.
+                if (--koff <= 0) {
+                    koff += kernelSize;
+                }
+                float suma = 0;
+                float sumr = 0;
+                float sumg = 0;
+                float sumb = 0;
+                for (i = 0; i < cvals.length; i += 4) {
+                    float factor = weights[koff + (i>>2)];
+                    suma += cvals[i+0] * factor;
+                    sumr += cvals[i+1] * factor;
+                    sumg += cvals[i+2] * factor;
+                    sumb += cvals[i+3] * factor;
+                }
+                dstPixels[dstoff] =
+                    (((suma < cmin) ? 0 : ((suma > cmax) ? 255 : ((int) suma))) << 24) +
+                    (((sumr < cmin) ? 0 : ((sumr > cmax) ? 255 : ((int) sumr))) << 16) +
+                    (((sumg < cmin) ? 0 : ((sumg > cmax) ? 255 : ((int) sumg))) <<  8) +
+                    (((sumb < cmin) ? 0 : ((sumb > cmax) ? 255 : ((int) sumb)))      );
+                dstoff += dcolinc;
+                srcoff += scolinc;
+            }
+            dstrow += drowinc;
+            srcrow += srowinc;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWLinearConvolveShadowPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file was originally generated by JSLC
+ * and then hand edited for performance.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.impl.Renderer;
+
+public class JSWLinearConvolveShadowPeer extends JSWLinearConvolvePeer {
+    public JSWLinearConvolveShadowPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    private float[] getShadowColor() {
+        return getKernel().getShadowColorComponents(getPass());
+    }
+
+    @Override
+    protected void filterVector(int dstPixels[], int dstw, int dsth, int dstscan,
+                                int srcPixels[], int srcw, int srch, int srcscan,
+                                float weights[], int count,
+                                float srcx0, float srcy0,
+                                float offsetx, float offsety,
+                                float deltax, float deltay,
+                                float dxcol, float dycol, float dxrow, float dyrow)
+    {
+        float shadowColor[] = getShadowColor();
+
+        int dstrow = 0;
+        // srcxy0 point at UL corner, shift them to center of 1st dest pixel:
+        srcx0 += (dxrow + dxcol) * 0.5f;
+        srcy0 += (dyrow + dycol) * 0.5f;
+        for (int dy = 0; dy < dsth; dy++) {
+            float srcx = srcx0;
+            float srcy = srcy0;
+            for (int dx = 0; dx < dstw; dx++) {
+                float sum = 0.0f;
+                float sampx = srcx + offsetx;
+                float sampy = srcy + offsety;
+                for (int i = 0; i < count; ++i) {
+                    if (sampx >= 0 && sampy >= 0) {
+                        int ix = (int) sampx;
+                        int iy = (int) sampy;
+                        if (ix < srcw && iy < srch) {
+                            // TODO: Usine linear interpolation here... (RT-27388)
+                            int argb = srcPixels[iy * srcscan + ix];
+                            sum += (argb >>> 24) * weights[i];
+                        }
+                    }
+                    sampx += deltax;
+                    sampy += deltay;
+                }
+                sum = (sum < 0f) ? 0f : ((sum > 255f) ? 255f : sum);
+                dstPixels[dstrow + dx] = ((int) (shadowColor[0] * sum) << 16) |
+                                         ((int) (shadowColor[1] * sum) <<  8) |
+                                         ((int) (shadowColor[2] * sum)      ) |
+                                         ((int) (shadowColor[3] * sum) << 24);
+                srcx += dxcol;
+                srcy += dycol;
+            }
+            srcx0 += dxrow;
+            srcy0 += dyrow;
+            dstrow += dstscan;
+        }
+    }
+
+    /**
+     * In the nomenclature of the argument list for this method, "row" refers
+     * to the coordinate which increments once for each new stream of single
+     * axis data that we are blurring in a single pass.  And "col" refers to
+     * the other coordinate that increments along the row.
+     * Rows are horizontal in the first pass and vertical in the second pass.
+     * Cols are vice versa.
+     */
+    @Override
+    protected void filterHV(int dstPixels[], int dstcols, int dstrows, int dcolinc, int drowinc,
+                            int srcPixels[], int srccols, int srcrows, int scolinc, int srowinc,
+                            float weights[])
+    {
+        float shadowColor[] = getShadowColor();
+
+        // avals stores the alpha values from the surrounding K pixels
+        // from x-r to x+r
+        int kernelSize = weights.length / 2;
+        float avals[] = new float[kernelSize];
+        int dstrow = 0;
+        int srcrow = 0;
+        int shadowRGBs[] = new int[256];
+        for (int i = 0; i < shadowRGBs.length; i++) {
+            shadowRGBs[i] = ((int) (shadowColor[0] * i) << 16) |
+                            ((int) (shadowColor[1] * i) <<  8) |
+                            ((int) (shadowColor[2] * i)      ) |
+                            ((int) (shadowColor[3] * i) << 24);
+        }
+        for (int r = 0; r < dstrows; r++) {
+            int dstoff = dstrow;
+            int srcoff = srcrow;
+            // Must clear out the array at the start of every line
+            // Might be able to rely on the fact that the previous line must
+            // have run out of data towards the end of the scan line, though.
+            for (int i = 0; i < avals.length; i++) {
+                avals[i] = 0f;
+            }
+            int koff = kernelSize;
+            for (int c = 0; c < dstcols; c++) {
+                // Load the data for this x location into the array.
+                avals[kernelSize - koff] =
+                    ((c < srccols) ? srcPixels[srcoff] : 0) >>> 24;
+                // Bump the koff to the next spot to align the coefficients.
+                if (--koff <= 0) {
+                    koff += kernelSize;
+                }
+                float sum = -0.5f;
+                for (int i = 0; i < avals.length; i++) {
+                    sum += avals[i] * weights[koff + i];
+                }
+                dstPixels[dstoff] =
+                    ((sum < 0f) ? 0
+                     : ((sum >= 254f) ? shadowRGBs[255]
+                        : shadowRGBs[((int) sum) + 1]));
+                dstoff += dcolinc;
+                srcoff += scolinc;
+            }
+            dstrow += drowinc;
+            srcrow += srowinc;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-jsw/src/com/sun/scenario/effect/impl/sw/java/JSWRendererDelegate.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.sw.java;
+
+import com.sun.scenario.effect.Effect.AccelType;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.sw.RendererDelegate;
+
+public class JSWRendererDelegate implements RendererDelegate {
+
+    public JSWRendererDelegate() {
+    }
+
+    public AccelType getAccelType() {
+        return AccelType.NONE;
+    }
+
+    public String getPlatformPeerName(String name, int unrollCount) {
+        return Renderer.rootPkg + ".impl.sw.java.JSW" + name + "Peer";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-prism-ps" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-prism-ps.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <target name="jar" depends="init">
+    <build-project>
+      <addedsrcdirs>
+        <pathelement location="build/gensrc"/>
+      </addedsrcdirs>
+      <addedsrcfiles>
+        <fileset dir="build/gensrc" excludes="${build.classes.excludes}"/>
+      </addedsrcfiles>
+    </build-project>
+  </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/decora-prism-ps.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/build/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/dist" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="decora-runtime" />
+    <orderEntry type="module" module-name="prism-common" />
+    <orderEntry type="module" module-name="decora-prism" />
+    <orderEntry type="module" module-name="javafx-geom" />
+    <orderEntry type="module" module-name="prism-ps" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-prism-ps</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism-ps.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism-ps.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-prism-ps.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-prism-ps.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,8 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar:\
+    ${runtime.dist.root.dir}/decora-prism/dist/decora-prism.jar:\
+    ${runtime.dist.root.dir}/prism-common/dist/prism-common.jar:\
+    ${runtime.dist.root.dir}/prism-ps/dist/prism-ps.jar:\
+    ${rt.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar:\
+    ${runtime.dist.root.dir}/glass/glass-mat/dist/glass.jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSDrawable.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.glass.ui.Screen;
+import com.sun.prism.RTTexture;
+import com.sun.prism.GraphicsPipeline;
+import com.sun.prism.ResourceFactory;
+import com.sun.prism.Texture.WrapMode;
+import com.sun.prism.ps.ShaderGraphics;
+import com.sun.scenario.effect.impl.prism.PrDrawable;
+
+public class PPSDrawable extends PrDrawable {
+
+    private RTTexture rtt;
+
+    private PPSDrawable(RTTexture rtt) {
+        super(rtt);
+        this.rtt = rtt;
+    }
+
+    static PPSDrawable create(RTTexture rtt) {
+        return new PPSDrawable(rtt);
+    }
+
+    static PPSDrawable create(Screen screen, int width, int height) {
+        ResourceFactory factory =
+            GraphicsPipeline.getPipeline().getResourceFactory(screen);
+        // force the wrap mode to CLAMP_TO_ZERO, as that is the mode
+        // required by most Decora effects (blurs, etc)
+        RTTexture rtt =
+            factory.createRTTexture(width, height, WrapMode.CLAMP_TO_ZERO);
+        return new PPSDrawable(rtt);
+    }
+
+    public boolean isLost() {
+        return rtt == null || rtt.getNativeDestHandle() == 0L;
+    }
+
+    public void flush() {
+        if (rtt != null) {
+            rtt.dispose();
+            rtt = null;
+        }
+    }
+
+    public Object getData() {
+        return this;
+    }
+
+    public int getContentWidth() {
+        return rtt.getContentWidth();
+    }
+
+    public int getContentHeight() {
+        return rtt.getContentHeight();
+    }
+
+    public int getPhysicalWidth() {
+        return rtt.getPhysicalWidth();
+    }
+
+    public int getPhysicalHeight() {
+        return rtt.getPhysicalHeight();
+    }
+
+    public ShaderGraphics createGraphics() {
+        return (ShaderGraphics)rtt.createGraphics();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSEffectPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.ps.Shader;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+
+public abstract class PPSEffectPeer extends EffectPeer {
+
+    protected PPSEffectPeer(FilterContext fctx, Renderer r, String shaderName) {
+        super(fctx, r, shaderName);
+    }
+
+    @Override
+    public final ImageData filter(final Effect effect,
+                                  final BaseTransform transform,
+                                  final Rectangle outputClip,
+                                  final ImageData... inputs)
+    {
+        setEffect(effect);
+        setDestBounds(getResultBounds(transform, outputClip, inputs));
+        return filterImpl(inputs);
+    }
+
+    abstract ImageData filterImpl(ImageData... inputs);
+
+    protected abstract boolean isSamplerLinear(int i);
+
+    protected abstract Shader createShader();
+
+    protected abstract void updateShader(Shader shader);
+
+    /**
+     * Disposes resources associated with this peer.
+     * Warning: called from the rendering thread.
+     */
+    @Override
+    public abstract void dispose();
+
+    @Override
+    protected final PPSRenderer getRenderer() {
+        return (PPSRenderer)super.getRenderer();
+    }
+
+    protected final String getShaderName() {
+        return getUniqueName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSOneSamplerPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Texture;
+import com.sun.prism.ps.Shader;
+import com.sun.prism.ps.ShaderGraphics;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Filterable;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.prism.PrTexture;
+
+public abstract class PPSOneSamplerPeer extends PPSEffectPeer {
+
+    private Shader shader;
+
+    protected PPSOneSamplerPeer(FilterContext fctx, Renderer r, String shaderName) {
+        super(fctx, r, shaderName);
+    }
+
+    @Override
+    public void dispose() {
+        if (shader != null) {
+            shader.dispose();
+        }
+    }
+
+    @Override
+    ImageData filterImpl(ImageData... inputs) {
+        Filterable srcF = inputs[0].getUntransformedImage();
+        final PrTexture srcTex = (PrTexture) srcF;
+        final Rectangle srcBounds = inputs[0].getUntransformedBounds();
+        final Rectangle dstBounds = getDestBounds();
+        final int dstw = dstBounds.width;
+        final int dsth = dstBounds.height;
+
+        PPSRenderer renderer = getRenderer();
+        PPSDrawable dst = renderer.getCompatibleImage(dstw, dsth);
+        if (dst == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
+
+        BaseTransform srcTransform = inputs[0].getTransform();
+        setInputBounds(0, srcBounds);
+        setInputTransform(0, srcTransform);
+        setInputNativeBounds(0, srcTex.getNativeBounds());
+        float srcRect[] = new float[8];
+        int srcCoords = getTextureCoordinates(0, srcRect,
+                                              srcBounds.x, srcBounds.y,
+                                              srcF.getPhysicalWidth(),
+                                              srcF.getPhysicalHeight(),
+                                              dstBounds,
+                                              srcTransform);
+
+        ShaderGraphics g = dst.createGraphics();
+        if (g == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        if (shader == null) {
+            shader = createShader();
+        }
+        if (shader == null || !shader.isValid()) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        g.setExternalShader(shader);
+        updateShader(shader);
+
+        float dx1 = 0;
+        float dy1 = 0;
+        float dx2 = dstw;
+        float dy2 = dsth;
+
+        // take the texture content origin into account
+        Texture ptex = srcTex.getTextureObject();
+        if (ptex == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        float txoff = ((float)ptex.getContentX()) / ptex.getPhysicalWidth();
+        float tyoff = ((float)ptex.getContentY()) / ptex.getPhysicalHeight();
+        float tx11 = txoff + srcRect[0];
+        float ty11 = tyoff + srcRect[1];
+        float tx22 = txoff + srcRect[2];
+        float ty22 = tyoff + srcRect[3];
+        if (srcCoords < 8) {
+            g.drawTextureRaw(ptex,
+                             dx1, dy1, dx2, dy2,
+                             tx11, ty11, tx22, ty22);
+        } else {
+            float tx21 = txoff + srcRect[4];
+            float ty21 = tyoff + srcRect[5];
+            float tx12 = txoff + srcRect[6];
+            float ty12 = tyoff + srcRect[7];
+
+            g.drawMappedTextureRaw(ptex,
+                                   dx1, dy1, dx2, dy2,
+                                   tx11, ty11, tx21, ty21,
+                                   tx12, ty12, tx22, ty22);
+        }
+        g.setExternalShader(null);
+
+        return new ImageData(getFilterContext(), dst, dstBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSRenderer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,396 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.nio.FloatBuffer;
+import java.util.Map;
+import com.sun.glass.ui.Screen;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.GraphicsPipeline;
+import com.sun.prism.GraphicsPipeline.ShaderModel;
+import com.sun.prism.GraphicsPipeline.ShaderType;
+import com.sun.prism.Image;
+import com.sun.prism.PixelFormat;
+import com.sun.prism.RTTexture;
+import com.sun.prism.ResourceFactory;
+import com.sun.prism.ResourceFactoryListener;
+import com.sun.prism.Texture;
+import com.sun.prism.Texture.Usage;
+import com.sun.prism.Texture.WrapMode;
+import com.sun.prism.ps.Shader;
+import com.sun.prism.ps.ShaderFactory;
+import com.sun.scenario.effect.Effect.AccelType;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Filterable;
+import com.sun.scenario.effect.FloatMap;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.hw.ShaderSource;
+import com.sun.scenario.effect.impl.prism.PrDrawable;
+import com.sun.scenario.effect.impl.prism.PrImage;
+import com.sun.scenario.effect.impl.prism.PrRenderer;
+import com.sun.scenario.effect.impl.prism.PrTexture;
+
+import static com.sun.scenario.effect.impl.Renderer.RendererState.*;
+
+public class PPSRenderer extends PrRenderer {
+
+    private final Screen screen;
+    private final ShaderSource shaderSource;
+    private RendererState state;
+    private boolean needsSWDispMap;
+
+    private final ResourceFactoryListener listener =
+        new ResourceFactoryListener()
+    {
+        public void factoryReset() {
+            dispose();
+        }
+
+        public void factoryReleased() {
+            dispose();
+        }
+    };
+
+    private PPSRenderer(Screen screen, ShaderSource shaderSource) {
+        this.screen = screen;
+        this.shaderSource = shaderSource;
+        synchronized (this) {
+            state = OK;
+        }
+        ResourceFactory rf =
+            GraphicsPipeline.getPipeline().getResourceFactory(screen);
+        rf.addFactoryListener(listener);
+        needsSWDispMap = !rf.isFormatSupported(PixelFormat.FLOAT_XYZW);
+    }
+
+    @Override
+    public PrDrawable createDrawable(RTTexture rtt) {
+        return PPSDrawable.create(rtt);
+    }
+
+    @Override
+    public AccelType getAccelType() {
+        return shaderSource.getAccelType();
+    }
+
+    /**
+     * Warning: may be called on the rendering thread
+     */
+    @Override
+    public synchronized RendererState getRendererState() {
+        return state;
+    }
+
+    @Override
+    protected Renderer getBackupRenderer() {
+        return this;
+    }
+
+    /**
+     * Disposes this renderer (flushes the associated images).
+     *
+     * Warning: must be called only on the rendering thread (for example in
+     * response to device reset event).
+     *
+     * May be called multiple times.
+     */
+    protected void dispose() {
+        // even if new peers are added from another thread while we're executing
+        // this on the rendering thread, they won't have any native resources
+        // since we're on the rendering thread, so no need to synchronize
+        for (EffectPeer peer : getPeers()) {
+            peer.dispose();
+        }
+        synchronized (this) {
+            state = DISPOSED;
+        }
+        GraphicsPipeline.getPipeline().
+            getResourceFactory(screen).removeFactoryListener(listener);
+    }
+
+    /**
+     * Marks this renderer as lost.
+     *
+     * Warning: may be called on the rendering thread
+     */
+    protected final synchronized void markLost() {
+        if (state == OK) {
+            state = LOST;
+        }
+    }
+
+    @Override
+    public final PPSDrawable createCompatibleImage(int w, int h) {
+        return PPSDrawable.create(screen, w, h);
+    }
+
+    @Override
+    public PPSDrawable getCompatibleImage(int w, int h) {
+        PPSDrawable im = (PPSDrawable)super.getCompatibleImage(w, h);
+        // either we ran out of vram or the device is lost
+        if (im == null) {
+            markLost();
+        }
+        return im;
+    }
+
+    @Override
+    public Object createFloatTexture(int w, int h) {
+        Texture prismTex = GraphicsPipeline.getPipeline().
+            getResourceFactory(screen).createFloatTexture(w, h);
+        return new PrTexture(prismTex);
+    }
+
+    @Override
+    public void updateFloatTexture(Object texture, FloatMap map) {
+        FloatBuffer buf = map.getBuffer();
+        int w = map.getWidth();
+        int h = map.getHeight();
+        Image img = Image.fromFloatMapData(buf, w, h);
+        Texture prismTex = ((PrTexture)texture).getTextureObject();
+        prismTex.update(img);
+    }
+
+    public Shader createShader(String name,
+                               Map<String, Integer> samplers,
+                               Map<String, Integer> params,
+                               boolean isPixcoordUsed)
+    {
+        InputStream pscode = shaderSource.loadSource(name);
+        int maxTexCoordIndex = samplers.keySet().size()-1;
+        ShaderFactory factory = (ShaderFactory)
+            GraphicsPipeline.getPipeline().getResourceFactory(screen);
+        return factory.createShader(pscode, samplers, params,
+                                    maxTexCoordIndex,
+                                    isPixcoordUsed, false);
+    }
+
+    /**
+     * Creates a new {@code EffectPeer} instance that can be used by
+     * any of the Prism-based backend implementations.  For example,
+     * we can implement the {@code Reflection} effect using only
+     * Prism operations, so we can share that implemenation across all
+     * of the Prism-based backends.
+     *
+     * @param fctx the filter context
+     * @param name the name of the effect peer
+     * @return a new {@code EffectPeer} instance
+     */
+    private EffectPeer createIntrinsicPeer(FilterContext fctx, String name) {
+        Class klass = null;
+        EffectPeer peer;
+        try {
+            klass = Class.forName(rootPkg + ".impl.prism.Pr" + name + "Peer");
+            Constructor ctor = klass.getConstructor(new Class[]
+                { FilterContext.class, Renderer.class, String.class });
+            peer = (EffectPeer)ctor.newInstance(new Object[]
+                { fctx, this, name });
+        } catch (Exception e) {
+            return null;
+        }
+        return peer;
+    }
+
+    /**
+     * Creates a new {@code EffectPeer} instance that is specific to
+     * the current shader-based backend.
+     *
+     * @param fctx the filter context
+     * @param name the name of the effect peer
+     * @param unrollCount the unroll count
+     * @return a new {@code EffectPeer} instance
+     */
+    private EffectPeer createPlatformPeer(FilterContext fctx, String name,
+                                          int unrollCount)
+    {
+        EffectPeer peer;
+
+        String shaderName = name;
+        if (unrollCount > 0) {
+            shaderName += "_" + unrollCount;
+        }
+        try {
+            Class klass = Class.forName(rootPkg + ".impl.prism.ps.PPS" + name + "Peer");
+            Constructor ctor = klass.getConstructor(new Class[]
+                { FilterContext.class, Renderer.class, String.class });
+            peer = (EffectPeer)ctor.newInstance(new Object[]
+                { fctx, this, shaderName });
+        } catch (Exception e) {
+            System.err.println("Error: Prism peer not found for: " + name +
+                               " due to error: " + e.getMessage());
+            return null;
+        }
+        return peer;
+    }
+
+    @Override
+    protected EffectPeer createPeer(FilterContext fctx, String name,
+                                    int unrollCount)
+    {
+        if (PrRenderer.isIntrinsicPeer(name)) {
+            // create an intrinsic peer (one that's handled by Prism)
+            return createIntrinsicPeer(fctx, name);
+        } else if (needsSWDispMap && name.equals("DisplacementMap")) {
+            return new PPStoPSWDisplacementMapPeer(fctx, this, name);
+        } else {
+            // try creating a platform-specific peer
+            return createPlatformPeer(fctx, name, unrollCount);
+        }
+    }
+
+    @Override
+    public boolean isImageDataCompatible(final ImageData id) {
+        if (getRendererState() == OK) {
+            Filterable f = id.getUntransformedImage();
+            return (f instanceof PrDrawable &&
+                    !((PrDrawable) f).isLost());
+        }
+        return false;
+    }
+
+    @Override
+    public void clearImage(Filterable filterable) {
+        PPSDrawable img = (PPSDrawable)filterable;
+        img.clear();
+    }
+
+    @Override
+    public ImageData createImageData(FilterContext fctx, Filterable src) {
+        if (!(src instanceof PrImage)) {
+            throw new IllegalArgumentException("Identity source must be PrImage");
+        }
+        Image img = ((PrImage)src).getImage();
+        int w = img.getWidth();
+        int h = img.getHeight();
+        PPSDrawable dst = createCompatibleImage(w, h);
+        if (dst == null) {
+            return null;
+        }
+        // RT-27561
+        // TODO: it is wasteful to create an RTT here; eventually it would
+        // be nice if we could use plain Textures as a source Filterable...
+        Graphics g = dst.createGraphics();
+        ResourceFactory factory = g.getResourceFactory();
+        Texture tex = factory.createTexture(img, Usage.DEFAULT,
+                                            WrapMode.CLAMP_TO_EDGE);
+        g.drawTexture(tex, 0, 0, w, h);
+        // NOTE: calling sync() should not be required; ideally calling
+        // Texture.dispose() would flush any pending operations that may
+        // depend on that texture...
+        g.sync();
+        tex.dispose();
+        ImageData id = new ImageData(fctx, dst, new Rectangle(w, h));
+        float ps = img.getPixelScale();
+        if (ps != 1.0f) {
+            ps = 1.0f / ps;
+            id = id.transform(BaseTransform.getScaleInstance(ps, ps));
+        }
+        return id;
+    }
+
+    @Override
+    public Filterable transform(FilterContext fctx,
+                                Filterable original,
+                                BaseTransform transform,
+                                Rectangle origBounds,
+                                Rectangle xformBounds)
+    {
+        PPSDrawable dst = (PPSDrawable)
+            getCompatibleImage(xformBounds.width, xformBounds.height);
+        if (dst != null) {
+            Graphics g = dst.createGraphics();
+            g.translate(-xformBounds.x, -xformBounds.y);
+            g.transform(transform);
+            g.drawTexture(((PPSDrawable)original).getTextureObject(),
+                          origBounds.x, origBounds.y,
+                          origBounds.width, origBounds.height);
+        }
+        return dst;
+    }
+
+    @Override
+    public ImageData transform(FilterContext fctx, ImageData original,
+                               BaseTransform transform,
+                               Rectangle origBounds,
+                               Rectangle xformBounds)
+    {
+        PPSDrawable dst = (PPSDrawable)
+            getCompatibleImage(xformBounds.width, xformBounds.height);
+        if (dst != null) {
+            PPSDrawable orig = (PPSDrawable)original.getUntransformedImage();
+            Graphics g = dst.createGraphics();
+            g.translate(-xformBounds.x, -xformBounds.y);
+            g.transform(transform);
+            g.drawTexture(orig.getTextureObject(),
+                          origBounds.x, origBounds.y,
+                          origBounds.width, origBounds.height);
+        }
+        original.unref();
+        return new ImageData(fctx, dst, xformBounds);
+    }
+
+    private static ShaderSource createShaderSource(String name) {
+        Class klass = null;
+        try {
+            klass = Class.forName(name);
+            return (ShaderSource)klass.newInstance();
+        } catch (ClassNotFoundException e) {
+            System.err.println(name + " class not found");
+            return null;
+        } catch (Throwable t) {
+            //System.err.println("Error loading renderer:");
+            //t.printStackTrace();
+            return null;
+        }
+    }
+
+    public static Renderer createRenderer(FilterContext fctx) {
+        Object ref = fctx.getReferent();
+        GraphicsPipeline pipe = GraphicsPipeline.getPipeline();
+        if (pipe == null || !(ref instanceof Screen)) {
+            return null;
+        }
+        Screen screen = (Screen)ref;
+        ShaderSource shaderSource = null;
+        if (pipe.supportsShader(ShaderType.HLSL, ShaderModel.SM3)) {
+            shaderSource = createShaderSource(rootPkg + ".impl.hw.d3d.D3DShaderSource");
+        } else if (pipe.supportsShader(ShaderType.GLSL, ShaderModel.SM3)) {
+            shaderSource = createShaderSource(rootPkg + ".impl.es2.ES2ShaderSource");
+        } else {
+            throw new InternalError("Unknown GraphicsPipeline");
+        }
+        if (shaderSource == null) {
+            return null;
+        }
+        return new PPSRenderer(screen, shaderSource);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSTwoSamplerPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Texture;
+import com.sun.prism.ps.Shader;
+import com.sun.prism.ps.ShaderGraphics;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Filterable;
+import com.sun.scenario.effect.FloatMap;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.prism.PrTexture;
+
+public abstract class PPSTwoSamplerPeer extends PPSEffectPeer {
+
+    private Shader shader;
+
+    protected PPSTwoSamplerPeer(FilterContext fctx, Renderer r, String shaderName) {
+        super(fctx, r, shaderName);
+    }
+
+    @Override
+    public void dispose() {
+        if (shader != null) {
+            shader.dispose();
+        }
+    }
+
+    @Override
+    ImageData filterImpl(ImageData... inputs) {
+        final Rectangle dstBounds = getDestBounds();
+        final int dstw = dstBounds.width;
+        final int dsth = dstBounds.height;
+
+        PPSRenderer renderer = getRenderer();
+        PPSDrawable dst = renderer.getCompatibleImage(dstw, dsth);
+        if (dst == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
+
+        Filterable src0F = inputs[0].getUntransformedImage();
+        final PrTexture src0Tex = (PrTexture) src0F;
+        Rectangle src0Bounds = inputs[0].getUntransformedBounds();
+        BaseTransform src0Transform = inputs[0].getTransform();
+        setInputBounds(0, src0Bounds);
+        setInputTransform(0, src0Transform);
+        setInputNativeBounds(0, src0Tex.getNativeBounds());
+
+        // NOTE: this implementation was done just to get DisplacementMap working
+        // (where there are two samplers but only one input); need to
+        // generalize this...
+        final PrTexture src1Tex;
+        final float[] src1Rect = new float[8];
+        int src1Coords;
+        if (inputs.length > 1) {
+            // sampler comes from inputs[1]
+            Filterable src1F = inputs[1].getUntransformedImage();
+            src1Tex = (PrTexture) src1F;
+            if (src1Tex == null) {
+                renderer.markLost();
+                return new ImageData(getFilterContext(), dst, dstBounds);
+            }
+            Rectangle src1Bounds = inputs[1].getUntransformedBounds();
+            BaseTransform src1Transform = inputs[1].getTransform();
+            setInputBounds(1, src1Bounds);
+            setInputTransform(1, src1Transform);
+            setInputNativeBounds(1, src1Tex.getNativeBounds());
+            src1Coords = getTextureCoordinates(1, src1Rect,
+                                               src1Bounds.x, src1Bounds.y,
+                                               src1F.getPhysicalWidth(),
+                                               src1F.getPhysicalHeight(),
+                                               dstBounds,
+                                               src1Transform);
+        } else {
+            // sampler comes from user param
+            FloatMap map = (FloatMap)getSamplerData(1);
+            src1Tex = (PrTexture)map.getAccelData(getFilterContext());
+            if (src1Tex == null) {
+                renderer.markLost();
+                return new ImageData(getFilterContext(), dst, dstBounds);
+            }
+            Rectangle b = new Rectangle(map.getWidth(), map.getHeight());
+            Rectangle nb = src1Tex.getNativeBounds();
+            setInputBounds(1, b);
+            setInputNativeBounds(1, nb);
+            // NOTE: DisplacementMap can not use an output clip until
+            // this is fixed...
+            src1Rect[0] = src1Rect[1] = 0f;
+            src1Rect[2] = ((float) b.width) / nb.width;
+            src1Rect[3] = ((float) b.height) / nb.height;
+            src1Coords = 4;
+        }
+
+        // getSourceRegion() calls need to come after all
+        // setInput[Native]Bounds() calls...
+        float[] src0Rect = new float[8];
+        int src0Coords = getTextureCoordinates(0, src0Rect,
+                                               src0Bounds.x, src0Bounds.y,
+                                               src0F.getPhysicalWidth(),
+                                               src0F.getPhysicalHeight(),
+                                               dstBounds,
+                                               src0Transform);
+
+        ShaderGraphics g = dst.createGraphics();
+        if (g == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        if (shader == null) {
+            shader = createShader();
+        }
+        if (shader == null || !shader.isValid()) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        g.setExternalShader(shader);
+        updateShader(shader);
+
+        float dx1 = 0;
+        float dy1 = 0;
+        float dx2 = dstw;
+        float dy2 = dsth;
+
+        Texture ptex0 = src0Tex.getTextureObject();
+        if (ptex0 == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        Texture ptex1 = src1Tex.getTextureObject();
+        if (ptex1 == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+
+        // take the texture content origin into account
+        float t0xoff = ((float)ptex0.getContentX()) / ptex0.getPhysicalWidth();
+        float t0yoff = ((float)ptex0.getContentY()) / ptex0.getPhysicalHeight();
+        float t0x11 = t0xoff + src0Rect[0];
+        float t0y11 = t0yoff + src0Rect[1];
+        float t0x22 = t0xoff + src0Rect[2];
+        float t0y22 = t0yoff + src0Rect[3];
+
+        // take the texture content origin into account
+        float t1xoff = ((float)ptex1.getContentX()) / ptex1.getPhysicalWidth();
+        float t1yoff = ((float)ptex1.getContentY()) / ptex1.getPhysicalHeight();
+        float t1x11 = t1xoff + src1Rect[0];
+        float t1y11 = t1yoff + src1Rect[1];
+        float t1x22 = t1xoff + src1Rect[2];
+        float t1y22 = t1yoff + src1Rect[3];
+
+        if (src0Coords < 8 && src1Coords < 8) {
+            g.drawTextureRaw2(ptex0, ptex1,
+                              dx1, dy1, dx2, dy2,
+                              t0x11, t0y11, t0x22, t0y22,
+                              t1x11, t1y11, t1x22, t1y22);
+        } else {
+            float t0x21, t0y21, t0x12, t0y12;
+            float t1x21, t1y21, t1x12, t1y12;
+
+            if (src0Coords < 8) {
+                t0x21 = t0x22;
+                t0y21 = t0y11;
+                t0x12 = t0x11;
+                t0y12 = t0y22;
+            } else {
+                t0x21 = t0xoff + src0Rect[4];
+                t0y21 = t0yoff + src0Rect[5];
+                t0x12 = t0xoff + src0Rect[6];
+                t0y12 = t0yoff + src0Rect[7];
+            }
+
+            if (src1Coords < 8) {
+                t1x21 = t1x22;
+                t1y21 = t1y11;
+                t1x12 = t1x11;
+                t1y12 = t1y22;
+            } else {
+                t1x21 = t1xoff + src1Rect[4];
+                t1y21 = t1yoff + src1Rect[5];
+                t1x12 = t1xoff + src1Rect[6];
+                t1y12 = t1yoff + src1Rect[7];
+            }
+
+            g.drawMappedTextureRaw2(ptex0, ptex1,
+                                    dx1, dy1, dx2, dy2,
+                                    t0x11, t0y11, t0x21, t0y21,
+                                    t0x12, t0y12, t0x22, t0y22,
+                                    t1x11, t1y11, t1x21, t1y21,
+                                    t1x12, t1y12, t1x22, t1y22);
+        }
+
+        g.setExternalShader(null);
+
+        return new ImageData(getFilterContext(), dst, dstBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPSZeroSamplerPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.prism.ps.Shader;
+import com.sun.prism.ps.ShaderGraphics;
+import com.sun.prism.paint.Color;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.Renderer;
+
+public abstract class PPSZeroSamplerPeer extends PPSEffectPeer {
+
+    private Shader shader;
+
+    protected PPSZeroSamplerPeer(FilterContext fctx, Renderer r, String shaderName) {
+        super(fctx, r, shaderName);
+    }
+
+    @Override
+    public void dispose() {
+        if (shader != null) {
+            shader.dispose();
+        }
+    }
+
+    @Override
+    ImageData filterImpl(ImageData... inputs) {
+        final Rectangle dstBounds = getDestBounds();
+        final int dstw = dstBounds.width;
+        final int dsth = dstBounds.height;
+
+        PPSRenderer renderer = getRenderer();
+        PPSDrawable dst = renderer.getCompatibleImage(dstw, dsth);
+        if (dst == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
+
+        ShaderGraphics g = dst.createGraphics();
+        if (g == null) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        if (shader == null) {
+            shader = createShader();
+        }
+        if (shader == null || !shader.isValid()) {
+            renderer.markLost();
+            return new ImageData(getFilterContext(), dst, dstBounds);
+        }
+        g.setExternalShader(shader);
+        updateShader(shader);
+
+        float dx1 = 0;
+        float dy1 = 0;
+        float dx2 = dstw;
+        float dy2 = dsth;
+
+        g.setPaint(Color.WHITE);
+        g.fillQuad(dx1, dy1, dx2, dy2);
+        g.setExternalShader(null);
+
+        return new ImageData(getFilterContext(), dst, dstBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-ps/src/com/sun/scenario/effect/impl/prism/ps/PPStoPSWDisplacementMapPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.ps;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.RTTexture;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.prism.PrDrawable;
+import com.sun.scenario.effect.impl.prism.PrRenderer;
+import com.sun.scenario.effect.impl.prism.PrTexture;
+
+public class PPStoPSWDisplacementMapPeer extends EffectPeer  {
+    PrRenderer softwareRenderer;
+    EffectPeer softwarePeer;
+
+    public PPStoPSWDisplacementMapPeer(FilterContext fctx, Renderer r, String shaderName) {
+        super(fctx, r, shaderName);
+        softwareRenderer = PrRenderer.createSoftwareRenderer(fctx);
+        softwarePeer = softwareRenderer.getPeerInstance(fctx, "DisplacementMap", 0);
+    }
+
+    @Override
+    public ImageData filter(Effect effect, BaseTransform transform,
+                            Rectangle outputClip, ImageData... inputs)
+    {
+        ImageData input = inputs[0];
+        PrTexture srcTex = (PrTexture) input.getUntransformedImage();
+        RTTexture srcRT = (RTTexture) srcTex.getTextureObject();
+        // The software renderer produces drawables that also implement HeapImage
+        PrDrawable srcDrawable = softwareRenderer.createDrawable(srcRT);
+        ImageData heapinput = new ImageData(input.getFilterContext(), srcDrawable,
+                                            input.getUntransformedBounds());
+        heapinput = heapinput.transform(input.getTransform());
+
+        // The software peer will return a PrDrawable that can produce a
+        // prism Texture on demand as needed.
+        ImageData ret = softwarePeer.filter(effect, transform, outputClip, heapinput);
+        // Note that heapinput should not be unref()ed since it shares the
+        // rtt with input/srcTex and we do not want it to dispose the rtt.
+        return ret;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-prism-sw" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-prism-sw.</description>
+
+  <import file="../build-defs.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/decora-prism-sw.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="decora-runtime" />
+    <orderEntry type="module" module-name="javafx-geom" />
+    <orderEntry type="module" module-name="prism-common" />
+    <orderEntry type="module" module-name="decora-prism" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-prism-sw</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism-sw.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism-sw.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-prism-sw.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-prism-sw.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,7 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar:\
+    ${runtime.dist.root.dir}/decora-prism/dist/decora-prism.jar:\
+    ${runtime.dist.root.dir}/prism-common/dist/prism-common.jar:\
+    ${rt.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar:\
+    ${runtime.dist.root.dir}/glass/glass-mat/dist/glass.jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/src/com/sun/scenario/effect/impl/prism/sw/PSWDrawable.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.sw;
+
+import java.nio.IntBuffer;
+import java.util.Arrays;
+import com.sun.glass.ui.Screen;
+import com.sun.prism.Graphics;
+import com.sun.prism.GraphicsPipeline;
+import com.sun.prism.Image;
+import com.sun.prism.RTTexture;
+import com.sun.prism.ResourceFactory;
+import com.sun.prism.Texture;
+import com.sun.prism.Texture.Usage;
+import com.sun.prism.Texture.WrapMode;
+import com.sun.scenario.effect.impl.HeapImage;
+import com.sun.scenario.effect.impl.prism.PrDrawable;
+
+public class PSWDrawable extends PrDrawable implements HeapImage {
+
+    private RTTexture rtt;
+    private Image image;
+    private boolean heapDirty;
+    private boolean vramDirty;
+
+    private PSWDrawable(RTTexture rtt, boolean isDirty) {
+        super(rtt);
+        this.rtt = rtt;
+        vramDirty = isDirty;
+    }
+
+    public static PSWDrawable create(RTTexture rtt) {
+        return new PSWDrawable(rtt, true);
+    }
+
+    static PSWDrawable create(Screen screen, int width, int height) {
+        ResourceFactory factory =
+            GraphicsPipeline.getPipeline().getResourceFactory(screen);
+        // force the wrap mode to CLAMP_TO_ZERO, as that is the mode
+        // required by most Decora effects (blurs, etc)
+        RTTexture rtt =
+            factory.createRTTexture(width, height, WrapMode.CLAMP_TO_ZERO);
+        return new PSWDrawable(rtt, false);
+    }
+
+    public boolean isLost() {
+        return rtt == null || rtt.getNativeDestHandle() == 0L;
+    }
+
+    public void flush() {
+        if (rtt != null) {
+            rtt.dispose();
+            rtt = null;
+            image = null;
+        }
+    }
+
+    public Object getData() {
+        return this;
+    }
+
+    public int getContentWidth() {
+        return rtt.getContentWidth();
+    }
+
+    public int getContentHeight() {
+        return rtt.getContentHeight();
+    }
+
+    public int getPhysicalWidth() {
+        // physical width in this case refers to the size of the system
+        // memory copy, which is the size of the content region of the rtt
+        return rtt.getContentWidth();
+    }
+
+    public int getPhysicalHeight() {
+        // physical height in this case refers to the size of the system
+        // memory copy, which is the size of the content region of the rtt
+        return rtt.getContentHeight();
+    }
+
+    public int getScanlineStride() {
+        return rtt.getContentWidth();
+    }
+
+    public int[] getPixelArray() {
+        int pixels[] = rtt.getPixels();
+        if (pixels != null) {
+            return pixels;
+        }
+        if (image == null) {
+            int width = rtt.getContentWidth();
+            int height = rtt.getContentHeight();
+            pixels = new int[width*height];
+            image = Image.fromIntArgbPreData(pixels, width, height);
+        }
+        IntBuffer buf = (IntBuffer)image.getPixelBuffer();
+        if (vramDirty) {
+            // copy texture data into heap array
+            rtt.readPixels(buf);
+            vramDirty = false;
+        }
+        heapDirty = true;
+        return buf.array();
+    }
+
+    @Override
+    public Texture getTextureObject() {
+        if (heapDirty) {
+            // RT-27562
+            // TODO: inefficient approach: upload heap array to (cached)
+            // texture, then render that texture to rtt
+            int width = rtt.getContentWidth();
+            int height = rtt.getContentHeight();
+            Screen screen = rtt.getAssociatedScreen();
+            ResourceFactory factory =
+                GraphicsPipeline.getPipeline().getResourceFactory(screen);
+            Texture tex =
+                factory.createTexture(image, Usage.DEFAULT, WrapMode.CLAMP_TO_EDGE);
+            Graphics g = createGraphics();
+            g.drawTexture(tex, 0, 0, width, height);
+            g.sync();
+            tex.dispose();
+            heapDirty = false;
+        }
+        return rtt;
+    }
+
+    public Graphics createGraphics() {
+        vramDirty = true;
+        return (Graphics)rtt.createGraphics();
+    }
+
+    @Override
+    public void clear() {
+        Graphics g = createGraphics();
+        g.clear();
+        if (image != null) {
+            IntBuffer buf = (IntBuffer)image.getPixelBuffer();
+            Arrays.fill(buf.array(), 0);
+        }
+        heapDirty = false;
+        vramDirty = false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism-sw/src/com/sun/scenario/effect/impl/prism/sw/PSWRenderer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,361 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism.sw;
+
+import java.lang.reflect.Constructor;
+import com.sun.glass.ui.Screen;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.GraphicsPipeline;
+import com.sun.prism.Image;
+import com.sun.prism.RTTexture;
+import com.sun.prism.ResourceFactory;
+import com.sun.prism.Texture;
+import com.sun.prism.Texture.Usage;
+import com.sun.prism.Texture.WrapMode;
+import com.sun.scenario.effect.Effect.AccelType;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Filterable;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.scenario.effect.impl.prism.PrDrawable;
+import com.sun.scenario.effect.impl.prism.PrImage;
+import com.sun.scenario.effect.impl.prism.PrRenderer;
+import com.sun.scenario.effect.impl.sw.RendererDelegate;
+
+import static com.sun.scenario.effect.impl.Renderer.RendererState.*;
+
+public class PSWRenderer extends PrRenderer {
+
+    private final Screen screen;
+    private final ResourceFactory resourceFactory;
+    private final RendererDelegate delegate;
+    private RendererState state;
+
+    private PSWRenderer(Screen screen, RendererDelegate delegate) {
+        this.screen = screen;
+        this.resourceFactory = null;
+        this.delegate = delegate;
+        synchronized (this) {
+            state = OK;
+        }
+    }
+
+    private PSWRenderer(ResourceFactory factory, RendererDelegate delegate) {
+        this.screen = null;
+        this.resourceFactory = factory;
+        this.delegate = delegate;
+        synchronized (this) {
+            state = OK;
+        }
+    }
+
+    @Override
+    public PrDrawable createDrawable(RTTexture rtt) {
+        return PSWDrawable.create(rtt);
+    }
+
+    /**
+     * Returns a {@code JSW} (Java/CPU) renderer for the given screen.
+     *
+     * @return a {@code JSW} (Java/CPU) renderer
+     */
+    public synchronized static PSWRenderer createJSWInstance(Screen screen) {
+        PSWRenderer ret = null;
+        try {
+            Class klass = Class.forName(rootPkg + ".impl.sw.java.JSWRendererDelegate");
+            RendererDelegate delegate = (RendererDelegate)klass.newInstance();
+            ret = new PSWRenderer(screen, delegate);
+        } catch (Throwable e) {}
+        return ret;
+    }
+
+    /**
+     * Returns a {@code JSW} (Java/CPU) renderer for the given screen.
+     *
+     * @return a {@code JSW} (Java/CPU) renderer
+     */
+    public synchronized static PSWRenderer createJSWInstance(ResourceFactory factory) {
+        PSWRenderer ret = null;
+        try {
+            Class klass = Class.forName(rootPkg + ".impl.sw.java.JSWRendererDelegate");
+            RendererDelegate delegate = (RendererDelegate)klass.newInstance();
+            ret = new PSWRenderer(factory, delegate);
+        } catch (Throwable e) {}
+        return ret;
+    }
+
+    public synchronized static PSWRenderer createJSWInstance(FilterContext fctx) {
+        PSWRenderer ret = null;
+        try {
+            ResourceFactory factory = (ResourceFactory)fctx.getReferent();
+            ret = createJSWInstance(factory);
+        } catch (Throwable e) {}
+        return ret;
+    }
+
+    /**
+     * Returns an {@code SSE} (SIMD/CPU) renderer for the given screen.
+     *
+     * @return an {@code SSE} (SIMD/CPU) renderer
+     */
+    private synchronized static PSWRenderer createSSEInstance(Screen screen) {
+        PSWRenderer ret = null;
+        try {
+            Class klass = Class.forName(rootPkg + ".impl.sw.sse.SSERendererDelegate");
+            RendererDelegate delegate = (RendererDelegate)klass.newInstance();
+            ret = new PSWRenderer(screen, delegate);
+        } catch (Throwable e) {}
+        return ret;
+    }
+
+    public static Renderer createRenderer(FilterContext fctx) {
+        Object ref = fctx.getReferent();
+        GraphicsPipeline pipe = GraphicsPipeline.getPipeline();
+        if (pipe == null || !(ref instanceof Screen)) {
+            return null;
+        }
+        Screen screen = (Screen)ref;
+        Renderer renderer = createSSEInstance(screen);
+        if (renderer == null) {
+            renderer = createJSWInstance(screen);
+        }
+        return renderer;
+    }
+
+    @Override
+    public AccelType getAccelType() {
+        return delegate.getAccelType();
+    }
+
+    /**
+     * Warning: may be called on the rendering thread
+     */
+    @Override
+    public synchronized RendererState getRendererState() {
+        return state;
+    }
+
+    @Override
+    protected Renderer getBackupRenderer() {
+        return this;
+    }
+
+    /**
+     * Disposes this renderer (flushes the associated images).
+     *
+     * Warning: must be called only on the rendering thread (for example in
+     * response to device reset event).
+     *
+     * May be called multiple times.
+     */
+    protected void dispose() {
+        synchronized (this) {
+            state = DISPOSED;
+        }
+    }
+
+    /**
+     * Marks this renderer as lost.
+     *
+     * Warning: may be called on the rendering thread
+     */
+    protected final synchronized void markLost() {
+        if (state == OK) {
+            state = LOST;
+        }
+    }
+
+    @Override
+    public final PSWDrawable createCompatibleImage(int w, int h) {
+        if (screen != null) {
+            return PSWDrawable.create(screen, w, h);
+        } else {
+            RTTexture rtt =
+                resourceFactory.createRTTexture(w, h, WrapMode.CLAMP_TO_EDGE);
+            return PSWDrawable.create(rtt);
+        }
+    }
+
+    @Override
+    public PSWDrawable getCompatibleImage(int w, int h) {
+        PSWDrawable im = (PSWDrawable)super.getCompatibleImage(w, h);
+        // either we ran out of vram or the device is lost
+        if (im == null) {
+            markLost();
+        }
+        return im;
+    }
+
+    /**
+     * Creates a new {@code EffectPeer} instance that can be used by
+     * any of the Prism-based backend implementations.  For example,
+     * we can implement the {@code Reflection} effect using only
+     * Prism operations, so we can share that implemenation across all
+     * of the Prism-based backends.
+     *
+     * @param fctx the filter context
+     * @param name the name of the effect peer
+     * @return a new {@code EffectPeer} instance
+     */
+    private EffectPeer createIntrinsicPeer(FilterContext fctx, String name) {
+        Class klass = null;
+        EffectPeer peer;
+        try {
+            klass = Class.forName(rootPkg + ".impl.prism.Pr" + name + "Peer");
+            Constructor ctor = klass.getConstructor(new Class[]
+                { FilterContext.class, Renderer.class, String.class });
+            peer = (EffectPeer)ctor.newInstance(new Object[] {fctx, this, name});
+        } catch (Exception e) {
+            return null;
+        }
+        return peer;
+    }
+
+    /**
+     * Creates a new {@code EffectPeer} instance that is specific to
+     * the current software-based backend.
+     *
+     * @param fctx the filter context
+     * @param name the name of the effect peer
+     * @param unrollCount the unroll count
+     * @return a new {@code EffectPeer} instance
+     */
+    private EffectPeer createPlatformPeer(FilterContext fctx, String name,
+                                          int unrollCount)
+    {
+        String klassName = delegate.getPlatformPeerName(name, unrollCount);
+        EffectPeer peer;
+        try {
+            Class klass = Class.forName(klassName);
+            Constructor ctor = klass.getConstructor(new Class[]
+                { FilterContext.class, Renderer.class, String.class });
+            peer = (EffectPeer)ctor.newInstance(new Object[] {fctx, this, name});
+        } catch (Exception e) {
+            System.err.println("Error: " + getAccelType() +
+                               " peer not found for: " + name +
+                               " due to error: " + e.getMessage());
+            return null;
+        }
+        return peer;
+    }
+
+    @Override
+    protected EffectPeer createPeer(FilterContext fctx, String name,
+                                    int unrollCount)
+    {
+        if (PrRenderer.isIntrinsicPeer(name)) {
+            // create an intrinsic peer (one that's handled by Prism)
+            return createIntrinsicPeer(fctx, name);
+        } else {
+            // try creating a platform-specific peer
+            return createPlatformPeer(fctx, name, unrollCount);
+        }
+    }
+
+    @Override
+    public boolean isImageDataCompatible(final ImageData id) {
+        return (getRendererState() == OK &&
+                id.getUntransformedImage() instanceof PSWDrawable);
+    }
+
+    @Override
+    public void clearImage(Filterable filterable) {
+        PSWDrawable img = (PSWDrawable)filterable;
+        img.clear();
+    }
+
+    @Override
+    public ImageData createImageData(FilterContext fctx, Filterable src) {
+        if (!(src instanceof PrImage)) {
+            throw new IllegalArgumentException("Identity source must be PrImage");
+        }
+        Image img = ((PrImage)src).getImage();
+        int w = img.getWidth();
+        int h = img.getHeight();
+        PSWDrawable dst = createCompatibleImage(w, h);
+        if (dst == null) {
+            return null;
+        }
+        // RT-27561
+        // TODO: it is wasteful to create an RTT here; eventually it would
+        // be nice if we could use plain Textures as a source Filterable...
+        Graphics g = dst.createGraphics();
+        ResourceFactory factory = g.getResourceFactory();
+        Texture tex =
+            factory.createTexture(img, Usage.DEFAULT, WrapMode.CLAMP_TO_EDGE);
+        g.drawTexture(tex, 0, 0, w, h);
+        // NOTE: calling sync() should not be required; ideally calling
+        // Texture.dispose() would flush any pending operations that may
+        // depend on that texture...
+        g.sync();
+        tex.dispose();
+        return new ImageData(fctx, dst, new Rectangle(w, h));
+    }
+
+    @Override
+    public Filterable transform(FilterContext fctx,
+                                Filterable original,
+                                BaseTransform transform,
+                                Rectangle origBounds,
+                                Rectangle xformBounds)
+    {
+        PSWDrawable dst = (PSWDrawable)
+            getCompatibleImage(xformBounds.width, xformBounds.height);
+        if (dst != null) {
+            Graphics g = dst.createGraphics();
+            g.translate(-xformBounds.x, -xformBounds.y);
+            g.transform(transform);
+            g.drawTexture(((PSWDrawable)original).getTextureObject(),
+                          origBounds.x, origBounds.y,
+                          origBounds.width, origBounds.height);
+        }
+        return dst;
+    }
+
+    @Override
+    public ImageData transform(FilterContext fctx, ImageData original,
+                               BaseTransform transform,
+                               Rectangle origBounds,
+                               Rectangle xformBounds)
+    {
+        PSWDrawable dst = (PSWDrawable)
+            getCompatibleImage(xformBounds.width, xformBounds.height);
+        if (dst != null) {
+            PSWDrawable orig = (PSWDrawable)original.getUntransformedImage();
+            Graphics g = dst.createGraphics();
+            g.translate(-xformBounds.x, -xformBounds.y);
+            g.transform(transform);
+            g.drawTexture(orig.getTextureObject(),
+                          origBounds.x, origBounds.y,
+                          origBounds.width, origBounds.height);
+        }
+        original.unref();
+        return new ImageData(fctx, dst, xformBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-prism" default="default" basedir=".">
+  <description>Builds, tests, and runs the project decora-prism.</description>
+
+  <import file="../build-defs.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/decora-prism.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+      <excludeFolder url="file://$MODULE_DIR$/dist" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="javafx-geom" />
+    <orderEntry type="module" module-name="prism-common" />
+    <orderEntry type="module" module-name="decora-runtime" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/nbproject/project.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>decora-prism</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Generated Sources</label>
+                    <type>java</type>
+                    <location>build/gensrc</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>jar</type>
+                <location>dist/decora-prism.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Generated Sources</label>
+                        <location>build/gensrc</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/decora-prism.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>build/gensrc</package-root>
+                <classpath mode="compile">${javac.classpath}:${build.classes.dir}</classpath>
+                <built-to>dist/decora-prism.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/project.properties	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,5 @@
+javac.classpath=\
+    ${rt.dist.root.dir}/javafx-geom/dist/javafx-geom.jar:\
+    ${runtime.dist.root.dir}/decora-runtime/dist/decora-runtime.jar:\
+    ${runtime.dist.root.dir}/prism-common/dist/prism-common.jar:\
+    ${runtime.dist.root.dir}/glass/glass-mat/dist/glass.jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrCropPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+
+public class PrCropPeer extends EffectPeer {
+
+    public PrCropPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        FilterContext fctx = getFilterContext();
+        ImageData srcData = inputs[0];
+        Rectangle srcBounds = srcData.getTransformedBounds(null);
+        if (outputClip.contains(srcBounds)) {
+            srcData.addref();
+            return srcData;
+        }
+
+        Rectangle dstBounds = new Rectangle(srcBounds);
+        dstBounds.intersectWith(outputClip);
+        int w = dstBounds.width;
+        int h = dstBounds.height;
+        PrDrawable dst = (PrDrawable)getRenderer().getCompatibleImage(w, h);
+
+        if (!srcData.validate(fctx) || dst == null) {
+            dst = null;
+        } else {
+            Graphics gdst = dst.createGraphics();
+            PrEffectHelper.renderImageData(gdst, srcData, dstBounds);
+        }
+
+        return new ImageData(fctx, dst, dstBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrDrawable.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.prism.Graphics;
+import com.sun.prism.RTTexture;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Filterable;
+import com.sun.scenario.effect.impl.Renderer;
+
+public abstract class PrDrawable extends PrTexture implements Filterable {
+
+    public static PrDrawable create(FilterContext fctx, RTTexture rtt) {
+        return ((PrRenderer) Renderer.getRenderer(fctx)).createDrawable(rtt);
+    }
+
+    protected PrDrawable(RTTexture rtt) {
+        super(rtt);
+    }
+
+    public float getPixelScale() {
+        return 1.0f;
+    }
+
+    public abstract boolean isLost();
+
+    public abstract Graphics createGraphics();
+
+    public void clear() {
+        Graphics g = createGraphics();
+        g.clear();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrEffectHelper.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,297 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.glass.ui.Screen;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.PickRay;
+import com.sun.javafx.geom.Point2D;
+import com.sun.javafx.geom.Vec3d;
+import com.sun.javafx.geom.transform.NoninvertibleTransformException;
+import com.sun.javafx.geom.transform.Affine2D;
+import com.sun.javafx.geom.transform.Affine3D;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.RenderTarget;
+import com.sun.prism.Texture;
+import com.sun.prism.camera.PrismCameraImpl;
+import com.sun.prism.camera.PrismPerspectiveCameraImpl;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.ImagePool;
+import com.sun.prism.ResourceFactory;
+
+public class PrEffectHelper {
+
+    /**
+     * Applies the given filter effect to the series of inputs and then renders
+     * the result to the provided {@code Graphics} at the specified
+     * location.
+     * This method is similar to the following pseudo-code:
+     * <pre>
+     *     g.drawTexture(effect.filter(g.getTransform()), x, y);
+     * </pre>
+     * except that it is likely to be more efficient (and correct).
+     *
+     * @param effect the effect to be rendered
+     * @param g the {@code Graphics} to which the {@code Effect} will be
+     *          rendered
+     * @param x the x location of the filtered result
+     * @param y the y location of the filtered result
+     * @param defaultInput the default input {@code Effect} to be used if
+     *                     any of the inputs for any of the effects in the
+     *                     chain are unspecified (i.e. {@code null}).
+     */
+    public static void render(Effect effect,
+                              Graphics g, float x, float y,
+                              Effect defaultInput)
+    {
+        BaseTransform transform;
+        Rectangle rclip = getGraphicsClipNoClone(g);
+        BaseTransform origtx = g.getTransformNoClone().copy();
+        BaseTransform rendertx;
+        if (origtx.is2D()) {
+            // process the effect using the current 2D transform, and then
+            // render the resulting image in device space (i.e., with identity)
+            if (x != 0f || y != 0f || !origtx.isIdentity()) {
+                transform = new Affine2D(origtx);
+                ((Affine2D) transform).translate(x, y);
+            } else {
+                transform = BaseTransform.IDENTITY_TRANSFORM;
+            }
+            g.setTransform(null);
+            rendertx = null;
+        } else {
+            // process the effect with an identity (2D) transform, and then
+            // render the resulting image using the current (3D) modelview
+            // and/or projection transform
+            // RT-27555
+            // TODO: this will not work if the effect is applied to a Group
+            // that has children with 3D transforms (relative to the Group),
+            // but at least it's good enough for simple effects applied to
+            // leaf nodes (e.g. applying a Reflection to a leaf ImageView node)
+            double scalex = Math.hypot(origtx.getMxx(), origtx.getMyx());
+            double scaley = Math.hypot(origtx.getMxy(), origtx.getMyy());
+            double scale = Math.max(scalex, scaley);
+            if (scale <= 1.0) {
+                transform = BaseTransform.IDENTITY_TRANSFORM;
+                rendertx = origtx;
+            } else {
+                transform = BaseTransform.getScaleInstance(scale, scale);
+                rendertx = new Affine3D(origtx);
+                scale = 1.0 / scale;
+                ((Affine3D) rendertx).scale(scale, scale);
+            }
+            PrismCameraImpl cam = g.getCameraNoClone();
+            BaseTransform inv;
+            try {
+                inv = rendertx.createInverse();
+            } catch (NoninvertibleTransformException e) {
+                return;
+            }
+            PickRay ray = new PickRay();
+            Vec3d tmpvec = new Vec3d();
+            // See FilterEffect.untransformClip for a description of
+            // why we round in by half a pixel here.
+            float x1 = rclip.x + 0.5f;
+            float y1 = rclip.y + 0.5f;
+            float x2 = rclip.x + rclip.width - 0.5f;
+            float y2 = rclip.y + rclip.height - 0.5f;
+            Point2D cul = project(x1, y1, cam, inv, ray, tmpvec, null);
+            Point2D cur = project(x2, y1, cam, inv, ray, tmpvec, null);
+            Point2D cll = project(x1, y2, cam, inv, ray, tmpvec, null);
+            Point2D clr = project(x2, y2, cam, inv, ray, tmpvec, null);
+            rclip = clipbounds(cul, cur, cll, clr);
+        }
+
+        Screen screen = g.getAssociatedScreen();
+        FilterContext fctx;
+        // RT-27555
+        if (screen == null) {
+            ResourceFactory factory = g.getResourceFactory();
+            fctx = PrFilterContext.getPrinterContext(factory);
+        } else {
+            fctx = PrFilterContext.getInstance(screen);
+        }
+        // TODO: Pass the camera down so that nodes can render with it
+        // for proper perspective below this level.
+        PrRenderInfo prinfo;
+        if (rendertx != null) {
+            // Whatever results are produced will have to be post-transformed
+            // so attempts at direct rendering would use the wrong transform.
+            prinfo = null;
+        } else if (g.isDepthBuffer() && g.isDepthTest()) {
+            // Some of the multi-step operations may produce both flat image
+            // results that would not track the actual Z depth of any direct
+            // Node rendering so we must disable direct rendering to avoid
+            // depth buffer conflicts.
+            prinfo = null;
+        } else {
+            // If none of the above conditions apply, then the PrRenderInfo
+            // can represent all information necessary to directly render
+            // any ImageData or Node to the destination.
+            prinfo = new PrRenderInfo(g);
+        }
+        boolean valid;
+        ImagePool.numEffects++;
+
+        do {
+            ImageData res = effect.filter(fctx, transform, rclip, prinfo, defaultInput);
+            if (res == null) return;
+            if (valid = res.validate(fctx)) {
+                Rectangle r = res.getUntransformedBounds();
+                // the actual image may be much larger than the region
+                // of interest ("r"), so to improve performance we render
+                // only that subregion here
+                Texture tex = ((PrTexture)res.getUntransformedImage()).getTextureObject();
+                g.setTransform(rendertx);
+                g.transform(res.getTransform());
+                g.drawTexture(tex, r.x, r.y, r.width, r.height);
+            }
+            res.unref();
+        } while (!valid);
+        g.setTransform(origtx);
+    }
+
+    static Point2D project(float x, float y,
+                           PrismCameraImpl cam, BaseTransform inv,
+                           PickRay tmpray, Vec3d tmpvec, Point2D ret)
+    {
+        tmpray = cam.computePickRay(x, y, tmpray);
+        return tmpray.projectToZeroPlane(inv, cam instanceof PrismPerspectiveCameraImpl,
+                                         tmpvec, ret);
+    }
+
+    static Rectangle clipbounds(Point2D cul, Point2D cur, Point2D cll, Point2D clr) {
+        // Note that 3D perspective transforms frequently deal with infinite
+        // values as a plane is rotated towards an end-on view from the eye.
+        // The standard ways of getting the bounds of 4 float points tend to
+        // ignore overflow, but we would frequently see trouble as objects are
+        // flipped over if we didn't have the tests for integer overflow near
+        // the bottom of this method.  When those conditions occur it usually
+        // means we can see down an arbitrary distance (perhaps to the horizon)
+        // on the plane of the node being rendered so we need to render it
+        // with no clip to make sure we get all the data for the effect.
+        if (cul != null && cur != null && cll != null && clr != null) {
+            double x1, y1, x2, y2;
+            if (cul.x < cur.x) {
+                x1 = cul.x; x2 = cur.x;
+            } else {
+                x1 = cur.x; x2 = cul.x;
+            }
+            if (cul.y < cur.y) {
+                y1 = cul.y; y2 = cur.y;
+            } else {
+                y1 = cur.y; y2 = cul.y;
+            }
+            if (cll.x < clr.x) {
+                x1 = Math.min(x1, cll.x); x2 = Math.max(x2, clr.x);
+            } else {
+                x1 = Math.min(x1, clr.x); x2 = Math.max(x2, cll.x);
+            }
+            if (cll.y < clr.y) {
+                y1 = Math.min(y1, cll.y); y2 = Math.max(y2, clr.y);
+            } else {
+                y1 = Math.min(y1, clr.y); y2 = Math.max(y2, cll.y);
+            }
+            // See FilterEffect.untransformClip for a description of
+            // why we round out by half a pixel here.
+            x1 = Math.floor(x1-0.5f);
+            y1 = Math.floor(y1-0.5f);
+            x2 = Math.ceil(x2+0.5f)-x1;
+            y2 = Math.ceil(y2+0.5f)-y1;
+            int x = (int) x1;
+            int y = (int) y1;
+            int w = (int) x2;
+            int h = (int) y2;
+            if (x == x1 && y == y1 && w == x2 && h == y2) {
+                // Return a valid rectangle only if we do not overflow,
+                // otherwise let the method return a null below for
+                // unclipped operation.
+                return new Rectangle(x, y, w, h);
+            }
+        }
+        return null;
+    }
+
+    public static Rectangle getGraphicsClipNoClone(Graphics g) {
+        Rectangle rclip = g.getClipRectNoClone();
+        if (rclip == null) {
+            RenderTarget rt = g.getRenderTarget();
+            rclip = new Rectangle(rt.getContentWidth(), rt.getContentHeight());
+        }
+        return rclip;
+    }
+
+    public static void renderImageData(Graphics gdst,
+                                       ImageData srcData,
+                                       Rectangle dstBounds)
+    {
+        int w = dstBounds.width;
+        int h = dstBounds.height;
+        PrDrawable src = (PrDrawable) srcData.getUntransformedImage();
+        BaseTransform srcTx = srcData.getTransform();
+        Rectangle srcBounds = srcData.getUntransformedBounds();
+        float dx1 = 0f;
+        float dy1 = 0f;
+        float dx2 = dx1 + w;
+        float dy2 = dy1 + h;
+        if (srcTx.isTranslateOrIdentity()) {
+            float tx = (float) srcTx.getMxt();
+            float ty = (float) srcTx.getMyt();
+            float sx1 = dstBounds.x - (srcBounds.x + tx);
+            float sy1 = dstBounds.y - (srcBounds.y + ty);
+            float sx2 = sx1 + w;
+            float sy2 = sy1 + h;
+            gdst.drawTexture(src.getTextureObject(),
+                             dx1, dy1, dx2, dy2,
+                             sx1, sy1, sx2, sy2);
+        } else {
+            float[] srcRect = new float[8];
+            int srcCoords =
+                EffectPeer.getTextureCoordinates(srcRect,
+                                                 srcBounds.x, srcBounds.y,
+                                                 src.getPhysicalWidth(),
+                                                 src.getPhysicalHeight(),
+                                                 dstBounds, srcTx);
+            if (srcCoords < 8) {
+                gdst.drawTextureRaw(src.getTextureObject(),
+                                    dx1, dy1, dx2, dy2,
+                                    srcRect[0], srcRect[1],
+                                    srcRect[2], srcRect[3]);
+            } else {
+                gdst.drawMappedTextureRaw(src.getTextureObject(),
+                                          dx1, dy1, dx2, dy2,
+                                          srcRect[0], srcRect[1],
+                                          srcRect[4], srcRect[5],
+                                          srcRect[6], srcRect[7],
+                                          srcRect[2], srcRect[3]);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrFilterContext.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import java.util.Map;
+import java.util.WeakHashMap;
+import com.sun.glass.ui.Screen;
+import com.sun.scenario.effect.FilterContext;
+
+public class PrFilterContext extends FilterContext {
+
+    private static Screen defaultScreen;
+    private static final Map<Screen, PrFilterContext> ctxMap =
+        new WeakHashMap<Screen, PrFilterContext>();
+
+    private static PrFilterContext printerFilterContext = null;
+    public static PrFilterContext getPrinterContext(Object resourceFactory) {
+        if (printerFilterContext == null) {
+            // Parameter is returned by FilterContext.getReferent()
+            printerFilterContext = new PrFilterContext(resourceFactory);
+        }
+        return printerFilterContext;
+    }
+
+    private PrFilterContext(Object screen) {
+        super(screen);
+    }
+
+    public static PrFilterContext getInstance(Screen screen) {
+        if (screen == null) {
+            throw new IllegalArgumentException("Screen must be non-null");
+        }
+        PrFilterContext fctx = ctxMap.get(screen);
+        if (fctx == null) {
+            fctx = new PrFilterContext(screen);
+            ctxMap.put(screen, fctx);
+        }
+        return fctx;
+    }
+
+    public static PrFilterContext getDefaultInstance() {
+        if (defaultScreen == null) {
+            // NOTE: filter context may need to sign up for screen set config
+            // changes
+            defaultScreen = Screen.getMainScreen();
+        }
+        return getInstance(defaultScreen);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrFloodPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.javafx.geom.BaseBounds;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.paint.Paint;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.Flood;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+
+public class PrFloodPeer extends EffectPeer {
+
+    public PrFloodPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        FilterContext fctx = getFilterContext();
+        Flood flood = (Flood)effect;
+        BaseBounds floodBounds = flood.getBounds();
+        int fx = (int)floodBounds.getMinX();
+        int fy = (int)floodBounds.getMinY();
+        int fw = (int)floodBounds.getWidth();
+        int fh = (int)floodBounds.getHeight();
+
+        BaseBounds fullBounds = Effect.transformBounds(transform, floodBounds);
+        Rectangle tmp = new Rectangle(fullBounds);
+        tmp.intersectWith(outputClip);
+        int w = tmp.width;
+        int h = tmp.height;
+        PrDrawable dst = (PrDrawable)getRenderer().getCompatibleImage(w, h);
+        if (dst != null) {
+            Graphics gdst = dst.createGraphics();
+            gdst.translate(-tmp.x, -tmp.y);
+            if (transform != null && !transform.isIdentity()) {
+                gdst.transform(transform);
+            }
+            gdst.setPaint((Paint)flood.getPaint());
+            gdst.fillQuad(fx, fy, fx+fw, fy+fh);
+        }
+
+        return new ImageData(fctx, dst, tmp);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrImage.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.prism.Image;
+import com.sun.scenario.effect.Filterable;
+
+/**
+ * This is a special class that is only used for the purposes of converting
+ * a Prism image (from Image.platformImage) into a Filterable (see
+ * PrismToolkit.toFilterable()) that can then be passed to
+ * PrRenderer.createImageData().  All of this is only used by the Identity
+ * effect; eventually we should figure out a more straightforward solution.
+ */
+public class PrImage implements Filterable {
+
+    private final Image image;
+
+    private PrImage(Image image) {
+        this.image = image;
+    }
+
+    public static PrImage create(Image image) {
+        return new PrImage(image);
+    }
+
+    public Image getImage() {
+        return image;
+    }
+
+    public Object getData() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public int getContentWidth() {
+        return image.getWidth();
+    }
+
+    public int getContentHeight() {
+        return image.getHeight();
+    }
+
+    public int getPhysicalWidth() {
+        return image.getWidth();
+    }
+
+    public int getPhysicalHeight() {
+        return image.getHeight();
+    }
+
+    public float getPixelScale() {
+        return image.getPixelScale();
+    }
+
+    public void flush() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrMergePeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.Merge;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+
+public class PrMergePeer extends EffectPeer {
+
+    public PrMergePeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        FilterContext fctx = getFilterContext();
+        Merge merge = (Merge)effect;
+
+        Rectangle unionbounds = merge.getResultBounds(transform, outputClip, inputs);
+        PrDrawable dst = (PrDrawable)getRenderer().
+            getCompatibleImage(unionbounds.width, unionbounds.height);
+        if (dst == null) {
+            return new ImageData(fctx, null, unionbounds);
+        }
+
+        Graphics gdst = dst.createGraphics();
+        for (ImageData input : inputs) {
+            PrEffectHelper.renderImageData(gdst, input, unionbounds);
+        }
+
+        return new ImageData(fctx, dst, unionbounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrReflectionPeer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.Texture;
+import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.Reflection;
+import com.sun.scenario.effect.impl.EffectPeer;
+import com.sun.scenario.effect.impl.Renderer;
+
+public class PrReflectionPeer extends EffectPeer {
+
+    public PrReflectionPeer(FilterContext fctx, Renderer r, String uniqueName) {
+        super(fctx, r, uniqueName);
+    }
+
+    @Override
+    public ImageData filter(Effect effect,
+                            BaseTransform transform,
+                            Rectangle outputClip,
+                            ImageData... inputs)
+    {
+        FilterContext fctx = getFilterContext();
+        Reflection reflect = (Reflection)effect;
+
+        Rectangle inputbounds = inputs[0].getUntransformedBounds();
+        int srcW = inputbounds.width;
+        int srcH = inputbounds.height;
+        float refY = srcH + reflect.getTopOffset();
+        float refH = reflect.getFraction() * srcH;
+        int irefY1 = (int) Math.floor(refY);
+        int irefY2 = (int) Math.ceil(refY + refH);
+        int irefH = irefY2 - irefY1;
+
+        int dstH = (irefY2 > srcH) ? irefY2 : srcH;
+        // RT-27389: take clipping into account...
+        PrDrawable dst = (PrDrawable)getRenderer().getCompatibleImage(srcW, dstH);
+        if (!inputs[0].validate(fctx) || dst == null) {
+            return new ImageData(fctx, null, inputbounds);
+        }
+        PrDrawable src = (PrDrawable)inputs[0].getUntransformedImage();
+        Texture srctex = src.getTextureObject();
+
+        Graphics gdst = dst.createGraphics();
+        gdst.transform(inputs[0].getTransform());
+        float sx1 = 0f;
+        float sy1 = srcH-irefH;
+        float sx2 = srcW;
+        float sy2 = srcH;
+        gdst.drawTextureVO(srctex,
+                           reflect.getBottomOpacity(),
+                           reflect.getTopOpacity(),
+                           0, irefY2, srcW, irefY1,
+                           sx1, sy1, sx2, sy2);
+        gdst.drawTexture(srctex, 0, 0, srcW, srcH);
+
+        Rectangle newbounds =
+            new Rectangle(inputbounds.x, inputbounds.y, srcW, dstH);
+        return new ImageData(fctx, dst, newbounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrRenderInfo.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.javafx.geom.transform.BaseTransform;
+import com.sun.prism.Graphics;
+import com.sun.prism.Texture;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.ImageData;
+import com.sun.scenario.effect.ImageDataRenderer;
+
+public class PrRenderInfo implements ImageDataRenderer {
+    private Graphics g;
+
+    public PrRenderInfo(Graphics g) {
+        this.g = g;
+    }
+
+    public Graphics getGraphics() {
+        return g;
+    }
+
+    // RT-27390
+    // TODO: Have Graphics implement ImageRenderer directly to avoid
+    // needing a wrapper object...
+    public void renderImage(ImageData image,
+                            BaseTransform transform,
+                            FilterContext fctx)
+    {
+        if (image.validate(fctx)) {
+            Rectangle r = image.getUntransformedBounds();
+            // the actual image may be much larger than the region
+            // of interest ("r"), so to improve performance we render
+            // only that subregion here
+            Texture tex = ((PrTexture)image.getUntransformedImage()).getTextureObject();
+            BaseTransform savedTx = null;
+            if (!transform.isIdentity()) {
+                savedTx = g.getTransformNoClone().copy();
+                g.transform(transform);
+            }
+            BaseTransform idtx = image.getTransform();
+            if (!idtx.isIdentity()) {
+                if (savedTx == null) savedTx = g.getTransformNoClone().copy();
+                g.transform(idtx);
+            }
+            g.drawTexture(tex, r.x, r.y, r.width, r.height);
+            if (savedTx != null) {
+                g.setTransform(savedTx);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrRenderer.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+import com.sun.glass.ui.Screen;
+import com.sun.prism.GraphicsPipeline;
+import com.sun.prism.GraphicsPipeline.ShaderModel;
+import com.sun.prism.RTTexture;
+import com.sun.scenario.effect.FilterContext;
+import com.sun.scenario.effect.impl.Renderer;
+
+public abstract class PrRenderer extends Renderer {
+
+    /**
+     * Maintain a list of peers that are implemented using Prism, so that
+     * we can do a fast check to see whether the given peer name is an
+     * intrinsic one instead of relying on reflection to do the check.
+     */
+    private static final Set<String> intrinsicPeerNames;
+    static {
+        intrinsicPeerNames = new HashSet<String>(4);
+        intrinsicPeerNames.add("Crop");
+        intrinsicPeerNames.add("Flood");
+        intrinsicPeerNames.add("Merge");
+        intrinsicPeerNames.add("Reflection");
+    }
+
+    /**
+     * Private constructor to prevent instantiation.
+     */
+    protected PrRenderer() {
+    }
+
+    public abstract PrDrawable createDrawable(RTTexture rtt);
+
+    public static Renderer createRenderer(FilterContext fctx) {
+        Object ref = fctx.getReferent();
+        GraphicsPipeline pipe = GraphicsPipeline.getPipeline();
+        if (pipe == null || !(ref instanceof Screen)) {
+            return null;
+        }
+        return createRenderer(fctx, pipe.supportsShaderModel(ShaderModel.SM3));
+    }
+
+    public static PrRenderer createSoftwareRenderer(FilterContext fctx) {
+        return createRenderer(fctx, false);
+    }
+
+    private static PrRenderer createRenderer(FilterContext fctx, boolean isHW) {
+        String klassName = isHW ?
+            Renderer.rootPkg + ".impl.prism.ps.PPSRenderer" :
+            Renderer.rootPkg + ".impl.prism.sw.PSWRenderer";
+        try {
+            Class klass = Class.forName(klassName);
+            Method m = klass.getMethod("createRenderer", new Class[] { FilterContext.class });
+            return (PrRenderer)m.invoke(null, new Object[] { fctx });
+        } catch (Throwable e) {}
+        return null;
+    }
+
+    public static boolean isIntrinsicPeer(String name) {
+        return intrinsicPeerNames.contains(name);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-prism/src/com/sun/scenario/effect/impl/prism/PrTexture.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.scenario.effect.impl.prism;
+
+import com.sun.javafx.geom.Rectangle;
+import com.sun.scenario.effect.impl.hw.Texture;
+
+public class PrTexture implements Texture {
+
+    private final com.sun.prism.Texture tex;
+    private final Rectangle bounds;
+
+    public PrTexture(com.sun.prism.Texture tex) {
+        if (tex == null) {
+            throw new IllegalArgumentException("Texture must be non-null");
+        }
+        this.tex = tex;
+        this.bounds = new Rectangle(tex.getPhysicalWidth(), tex.getPhysicalHeight());
+    }
+
+    public Rectangle getNativeBounds() {
+        return bounds;
+    }
+
+    public long getNativeSourceHandle() {
+        return tex.getNativeSourceHandle();
+    }
+
+    public com.sun.prism.Texture getTextureObject() {
+        return tex;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/build.xml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="decora-runtime" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project decora-runtime.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <property name="jsl.dir" value="jsl"/>
+  <property name="base.dir" value="${basedir}"/>
+
+  <path id="jsl.compiler.class.path">
+    <fileset dir="${rt.dist.root.dir}/decora-compiler/dist">
+      <include name="**/*.jar"/>
+    </fileset>
+    <fileset dir="${import.antlr.lib}">
+      <include name="**/*.jar"/>
+    </fileset>
+    <pathelement location="${build.classes.dir}"/>
+  </path>
+
+  <target name="compile-jsl-compiler">
+    <available property="jsl.compiler.exists" file="${rt.dist.root.dir}/decora-compiler/dist/decora-compiler.jar"/>
+    <fail unless="jsl.compiler.exists">Must build decora-compiler first!</fail>
+    <javac srcdir="generator" destdir="build/generator" classpathref="jsl.compiler.class.path"
+           includeantruntime="no"/>
+  </target>
+
+  <target name="do-compile-jsl">
+    <echo message="Compiling ${jsl.filename}.jsl using ${jsl.classname} (outputs=${jsl.outputs})"/>
+    <java fork="false" classname="${jsl.classname}" failonerror="true">
+      <classpath>
+        <path refid="jsl.compiler.class.path"/>
+        <pathelement path="build/generator"/>
+      </classpath>
+      <arg value="-i"/>
+      <arg value="${basedir}/jsl"/>
+      <arg value="-o"/>
+      <arg value="${basedir}/.."/>
+      <arg value="-pkg"/>
+      <arg value="com/sun/scenario/effect"/>
+      <arg value="${jsl.outputs}"/>
+      <arg value="${jsl.filename}"/>
+    </java>
+  </target>
+
+  <target name="do-compile-external-jsl">
+    <java fork="true" classname="CompileExternal" failonerror="true">
+      <classpath>
+        <path refid="jsl.compiler.class.path"/>
+        <pathelement path="build/generator"/>
+      </classpath>
+      <arg value="-i"/>
+      <arg value="${jsl.inputdir}"/>
+      <arg value="-o"/>
+      <arg value="${jsl.outputdir}"/>
+      <arg value="${jsl.outputs}"/>
+      <arg value="${jsl.filename}"/>
+    </java>
+  </target>
+
+  <target name="-pre-init">
+    <mkdir dir="build/gensrc"/>
+    <mkdir dir="build/generator"/>
+
+    <!-- Calls CompileJSL (or variant) if generated files are not uptodate -->
+    <macrodef name="compile-jsl">
+      <!-- name of the generator class (by default uses generic CompileJSL -->
+      <attribute default="CompileJSL" name="classname"/>
+      <!-- name of the JSL file to be compiled -->
+      <attribute default="" name="filename"/>
+      <!-- suffix of the generated Java file used for up-to-date check -->
+      <attribute default="" name="suffix"/>
+      <!-- which output file types to generate -->
+      <attribute default="-all" name="outputs"/>
+      <sequential>
+        <!-- RT-27393
+             TODO: Fix the dependencies.  For now we always call the
+             compile program, but it has been modified to only generate
+             outputs that are out of date.  This saves a lot of work but
+             is not quite as fast as if we could measure the dependencies
+             here and avoid running the program at all. -->
+        <uptodate property="@{classname}.@{filename}.uptodate"
+                  targetfile="NONEXISTANTFILE">
+          <srcfiles dir="${jsl.dir}" includes="@{filename}*.jsl" />
+        </uptodate>
+        <antcall target="do-compile-jsl">
+          <param name="jsl.classname" value="@{classname}"/>
+          <param name="jsl.filename" value="@{filename}"/>
+          <param name="jsl.outputs" value="@{outputs}"/>
+        </antcall>
+      </sequential>
+    </macrodef>
+
+    <macrodef name="compile-test-jsl">
+      <attribute default="" name="filename"/>
+      <sequential>
+        <antcall target="do-compile-external-jsl">
+          <param name="jsl.filename" value="@{filename}"/>
+          <param name="jsl.inputdir" value="./testjsl"/>
+          <param name="jsl.outputdir" value="../decora-jsw/build/test/gensrc"/>
+          <param name="jsl.outputs" value="-sw"/>
+        </antcall>
+      </sequential>
+    </macrodef>
+  </target>
+
+  <!-- RT-27383 TODO: force running of CompileJSL if compiler sources were modified -->
+  <target name="jar" depends="init">
+    <build-project/>
+    <antcall target="compile-jsl-compiler"/>
+    <compile-jsl filename="ColorAdjust"/>
+    <compile-jsl filename="Brightpass"/>
+    <compile-jsl filename="SepiaTone"/>
+    <compile-jsl filename="PerspectiveTransform"/>
+    <compile-jsl filename="DisplacementMap"/>
+    <compile-jsl filename="InvertMask"/>
+    <compile-jsl classname="CompileBlend" filename="Blend" suffix="_ADD"/>
+    <compile-jsl classname="CompilePhong" filename="PhongLighting" suffix="_POINT"/>
+    <compile-jsl classname="CompileLinearConvolve" filename="LinearConvolve" outputs="-hw"/>
+    <compile-jsl classname="CompileLinearConvolve" filename="LinearConvolveShadow" outputs="-hw"/>
+    <!--<compile-jsl classname="CompileZoomRadialBlur" filename="ZoomRadialBlur"/>-->
+
+    <!-- force compilation of generated effect peer sources -->
+    <build-project/>
+  </target>
+
+  <!-- We're currently relying on the generated sources under
+       decora-j2d-rsl/build/gensrc to determine whether the JSL files need to
+       be recompiled, so for now always clean the decora-j2d-rsl/build
+       directory after cleaning decora-runtime... -->
+  <target name="clean">
+    <clean-project/>
+    <delete dir="../decora-j2d-rsl/build"/>
+  </target>
+
+  <target name="test" depends="jar">
+    <mkdir dir="build/test/gensrc"/>
+    <!-- for now we'll output the jsw peers into decora-jsw since we're not
+         concerned with building the generated peers (all we care about is
+         compiling the JSL files) -->
+    <mkdir dir="../decora-jsw/build/test/gensrc"/>
+    <compile-test-jsl filename="Test1"/>
+    <compile-test-jsl filename="Test2"/>
+    <test-project/>
+  </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/decora-runtime.iml	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <output-test url="file://$MODULE_DIR$/build/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/generator" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+      <excludeFolder url="file://$MODULE_DIR$/dist" />
+      <excludeFolder url="file://$MODULE_DIR$/generator" />
+      <excludeFolder url="file://$MODULE_DIR$/jsl" />
+      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
+      <excludeFolder url="file://$MODULE_DIR$/testjsl" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" scope="TEST" name="junit4" level="project" />
+    <orderEntry type="module" module-name="javafx-geom" />
+  </component>
+  <component name="org.twodividedbyzero.idea.findbugs">
+    <option name="_basePreferences">
+      <map>
+        <entry key="property.analysisEffortLevel" value="default" />
+        <entry key="property.analyzeAfterCompile" value="false" />
+        <entry key="property.exportAsHtml" value="true" />
+        <entry key="property.exportAsXml" value="true" />
+        <entry key="property.exportBaseDir" value="" />
+        <entry key="property.exportCreateArchiveDir" value="false" />
+        <entry key="property.exportOpenBrowser" value="true" />
+        <entry key="property.minPriorityToReport" value="Medium" />
+        <entry key="property.runAnalysisInBackground" value="false" />
+        <entry key="property.showHiddenDetectors" value="false" />
+        <entry key="property.toolWindowToFront" value="true" />
+      </map>
+    </option>
+    <option name="_detectors">
+      <map>
+        <entry key="AppendingToAnObjectOutputStream" value="true" />
+        <entry key="BCPMethodReturnCheck" value="false" />
+        <entry key="BadAppletConstructor" value="false" />
+        <entry key="BadResultSetAccess" value="true" />
+        <entry key="BadSyntaxForRegularExpression" value="true" />
+        <entry key="BadUseOfReturnValue" value="true" />
+        <entry key="BadlyOverriddenAdapter" value="true" />
+        <entry key="BooleanReturnNull" value="true" />
+        <entry key="BuildInterproceduralCallGraph" value="false" />
+        <entry key="BuildObligationPolicyDatabase" value="true" />
+        <entry key="CallToUnsupportedMethod" value="false" />
+        <entry key="CalledMethods" value="true" />
+        <entry key="CheckCalls" value="false" />
+        <entry key="CheckExpectedWarnings" value="false" />
+        <entry key="CheckImmutableAnnotation" value="true" />
+        <entry key="CheckTypeQualifiers" value="true" />
+        <entry key="CloneIdiom" value="true" />
+        <entry key="ComparatorIdiom" value="true" />
+        <entry key="ConfusedInheritance" value="true" />
+        <entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
+        <entry key="CrossSiteScripting" value="true" />
+        <entry key="DoInsideDoPrivileged" value="true" />
+        <entry key="DontCatchIllegalMonitorStateException" value="true" />
+        <entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
+        <entry key="DontUseEnum" value="true" />
+        <entry key="DroppedException" value="true" />
+        <entry key="DumbMethodInvocations" value="true" />
+        <entry key="DumbMethods" value="true" />
+        <entry key="DuplicateBranches" value="true" />
+        <entry key="EmptyZipFileEntry" value="true" />
+        <entry key="EqStringTest" value="false" />
+        <entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
+        <entry key="FieldItemSummary" value="true" />
+        <entry key="FinalizerNullsFields" value="true" />
+        <entry key="FindBadCast" value="false" />
+        <entry key="FindBadCast2" value="true" />
+        <entry key="FindBadEqualsImplementation" value="false" />
+        <entry key="FindBadForLoop" value="true" />
+        <entry key="FindBugsSummaryStats" value="true" />
+        <entry key="FindCircularDependencies" value="false" />
+        <entry key="FindDeadLocalStores" value="true" />
+        <entry key="FindDoubleCheck" value="true" />
+        <entry key="FindEmptySynchronizedBlock" value="true" />
+        <entry key="FindFieldSelfAssignment" value="true" />
+        <entry key="FindFinalizeInvocations" value="true" />
+        <entry key="FindFloatEquality" value="true" />
+        <entry key="FindFloatMath" value="false" />
+        <entry key="FindHEmismatch" value="true" />
+        <entry key="FindInconsistentSync2" value="true" />
+        <entry key="FindJSR166LockMonitorenter" value="true" />
+        <entry key="FindLocalSelfAssignment2" value="true" />
+        <entry key="FindMaskedFields" value="true" />
+        <entry key="FindMismatchedWaitOrNotify" value="true" />
+        <entry key="FindNakedNotify" value="true" />
+        <entry key="FindNonSerializableStoreIntoSession" value="true" />
+        <entry key="FindNonSerializableValuePassedToWriteObject" value="true" />
+        <entry key="FindNonShortCircuit" value="true" />
+        <entry key="FindNullDeref" value="true" />
+        <entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
+        <entry key="FindOpenStream" value="true" />
+        <entry key="FindPuzzlers" value="true" />
+        <entry key="FindRefComparison" value="true" />
+        <entry key="FindReturnRef" value="true" />
+        <entry key="FindRunInvocations" value="true" />
+        <entry key="FindSelfComparison" value="true" />
+        <entry key="FindSelfComparison2" value="true" />
+        <entry key="FindSleepWithLockHeld" value="true" />
+        <entry key="FindSpinLoop" value="true" />
+        <entry key="FindSqlInjection" value="true" />
+        <entry key="FindTwoLockWait" value="true" />
+        <entry key="FindUncalledPrivateMethods" value="true" />
+        <entry key="FindUnconditionalWait" value="true" />
+        <entry key="FindUninitializedGet" value="true" />
+        <entry key="FindUnrelatedTypesInGenericContainer" value="true" />
+        <entry key="FindUnreleasedLock" value="true" />
+        <entry key="FindUnsatisfiedObligation" value="true" />
+        <entry key="FindUnsyncGet" value="true" />
+        <entry key="FindUselessControlFlow" value="true" />
+        <entry key="FormatStringChecker" value="true" />
+        <entry key="HugeSharedStringConstants" value="true" />
+        <entry key="IDivResultCastToDouble" value="true" />
+        <entry key="IncompatMask" value="true" />
+        <entry key="InconsistentAnnotations" value="true" />
+        <entry key="InefficientMemberAccess" value="false" />
+        <entry key="InefficientToArray" value="true" />
+        <entry key="InfiniteLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop" value="true" />
+        <entry key="InfiniteRecursiveLoop2" value="false" />
+        <entry key="InheritanceUnsafeGetResource" value="true" />
+        <entry key="InitializationChain" value="true" />
+        <entry key="InstantiateStaticClass" value="true" />
+        <entry key="InvalidJUnitTest" value="true" />
+        <entry key="IteratorIdioms" value="true" />
+        <entry key="LazyInit" value="true" />
+        <entry key="LoadOfKnownNullValue" value="true" />
+        <entry key="LockedFields" value="false" />
+        <entry key="LostLoggerDueToWeakReference" value="true" />
+        <entry key="MethodReturnCheck" value="true" />
+        <entry key="Methods" value="true" />
+        <entry key="MultithreadedInstanceAccess" value="true" />
+        <entry key="MutableLock" value="true" />
+        <entry key="MutableStaticFields" value="true" />
+        <entry key="Naming" value="true" />
+        <entry key="Noise" value="false" />
+        <entry key="NoiseNullDeref" value="false" />
+        <entry key="NoteAnnotationRetention" value="true" />
+        <entry key="NoteCheckReturnValue" value="true" />
+        <entry key="NoteCheckReturnValueAnnotations" value="true" />
+        <entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
+        <entry key="NoteJCIPAnnotation" value="true" />
+        <entry key="NoteNonNullAnnotations" value="true" />
+        <entry key="NoteNonnullReturnValues" value="true" />
+        <entry key="NoteSuppressedWarnings" value="true" />
+        <entry key="NoteUnconditionalParamDerefs" value="true" />
+        <entry key="NumberConstructor" value="true" />
+        <entry key="OverridingEqualsNotSymmetrical" value="true" />
+        <entry key="PreferZeroLengthArrays" value="true" />
+        <entry key="PublicSemaphores" value="false" />
+        <entry key="QuestionableBooleanAssignment" value="true" />
+        <entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
+        <entry key="ReadReturnShouldBeChecked" value="true" />
+        <entry key="RedundantInterfaces" value="true" />
+        <entry key="ReflectiveClasses" value="true" />
+        <entry key="RepeatedConditionals" value="true" />
+        <entry key="ResolveAllReferences" value="false" />
+        <entry key="RuntimeExceptionCapture" value="true" />
+        <entry key="SerializableIdiom" value="true" />
+        <entry key="StartInConstructor" value="true" />
+        <entry key="StaticCalendarDetector" value="true" />
+        <entry key="StringConcatenation" value="true" />
+        <entry key="SuperfluousInstanceOf" value="true" />
+        <entry key="SuspiciousThreadInterrupted" value="true" />
+        <entry key="SwitchFallthrough" value="true" />
+        <entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
+        <entry key="SynchronizeAndNullCheckField" value="true" />
+        <entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
+        <entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
+        <entry key="TestASM" value="false" />
+        <entry key="TestDataflowAnalysis" value="false" />
+        <entry key="TestingGround" value="false" />
+        <entry key="TrainFieldStoreTypes" value="true" />
+        <entry key="TrainNonNullAnnotations" value="true" />
+        <entry key="TrainUnconditionalDerefParams" value="true" />
+        <entry key="URLProblems" value="true" />
+        <entry key="UncallableMethodOfAnonymousClass" value="true" />
+        <entry key="UnnecessaryMath" value="true" />
+        <entry key="UnreadFields" value="true" />
+        <entry key="UseObjectEquals" value="false" />
+        <entry key="UselessSubclassMethod" value="false" />
+        <entry key="VarArgsProblems" value="true" />
+        <entry key="VolatileUsage" value="true" />
+        <entry key="WaitInLoop" value="true" />
+        <entry key="WrongMapIterator" value="true" />
+        <entry key="XMLFactoryBypass" value="true" />
+      </map>
+    </option>
+    <option name="_reportCategories">
+      <map>
+        <entry key="BAD_PRACTICE" value="true" />
+        <entry key="CORRECTNESS" value="true" />
+        <entry key="EXPERIMENTAL" value="true" />
+        <entry key="I18N" value="true" />
+        <entry key="MALICIOUS_CODE" value="true" />
+        <entry key="MT_CORRECTNESS" value="true" />
+        <entry key="NOISE" value="false" />
+        <entry key="PERFORMANCE" value="true" />
+        <entry key="SECURITY" value="true" />
+        <entry key="STYLE" value="true" />
+      </map>
+    </option>
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileBlend.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import com.sun.scenario.effect.Blend;
+import java.io.File;
+import java.util.Locale;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from Blend.jsl, and shouldn't be included in the
+ * resulting runtime jar file.
+ */
+public class CompileBlend {
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo();
+        jslcinfo.shaderName = "Blend";
+        jslcinfo.parseArgs(args);
+
+        File mainFile = jslcinfo.getJSLFile();
+        String main = CompileJSL.readFile(mainFile);
+        long blendtime = mainFile.lastModified();
+        for (Blend.Mode mode : Blend.Mode.values()) {
+            String funcname = mode.name().toLowerCase(Locale.ENGLISH);
+            String modename = jslcinfo.shaderName + "_" + mode.name();
+            File funcFile = jslcinfo.getJSLFile(modename);
+            String func = CompileJSL.readFile(funcFile);
+            long modeTime = funcFile.lastModified();
+            String source = String.format(main, func, funcname);
+            long sourcetime = Math.max(blendtime, modeTime);
+            jslcinfo.peerName = modename;
+            JSLC.compile(jslcinfo, source, sourcetime);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileBoxBlur.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import java.io.File;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from BoxBlur-based JSL files, and shouldn't be included
+ * in the resulting runtime jar file.
+ */
+public class CompileBoxBlur {
+
+    /*
+     * The basic idea here is to create a few different versions of the
+     * Gaussian-based hardware effect peers, based on the kernel size.
+     * The first one handles kernel sizes up to 10, the next one up to 20,
+     * and so on.  This is better than unrolling a single version, since the
+     * generated shader would be very inefficient for smaller kernel sizes.
+     */
+    private static void compileBoxBlur(JSLCInfo jslcinfo)
+        throws Exception
+    {
+        int outTypes = jslcinfo.outTypes;
+        File baseFile = jslcinfo.getJSLFile();
+        String base = CompileJSL.readFile(baseFile);
+        long basetime = baseFile.lastModified();
+
+        // output one hardware shader for each unrolled size
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_SHADERS);
+        for (int i = 10; i <= 120; i += 10) {
+            String source = String.format(base, i);
+            jslcinfo.peerName = jslcinfo.shaderName + "_" + i;
+            JSLC.compile(jslcinfo, source, basetime);
+        }
+        jslcinfo.peerName = jslcinfo.shaderName + "_130";
+        JSLC.compile(jslcinfo, String.format(base, 129), basetime);
+
+        // output a single hardware peer class (can be instantiated for
+        // each of the shaders generated above)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_PEERS);
+        jslcinfo.peerName = null;
+        String genericbase = String.format(base, 0);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+
+        // output a single version of the software peer (there's
+        // no loop unrolling in this case)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_SW_PEERS);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+    }
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo();
+        jslcinfo.shaderName = "BoxBlur";
+        jslcinfo.parseAllArgs(args);
+        compileBoxBlur(jslcinfo);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileExternal.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from "external" JSL files, and shouldn't be included in the
+ * resulting runtime jar file.
+ */
+public class CompileExternal {
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo("<filename>");
+        int index = jslcinfo.parseArgs(args);
+        if (index >= args.length) {
+            jslcinfo.error("No JSL file specified");
+        }
+        while (index < args.length) {
+            jslcinfo.shaderName = args[index++];
+            JSLC.compile(jslcinfo, jslcinfo.getJSLFile());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileGaussian.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import java.io.File;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from Gaussian-based JSL files, and shouldn't be included
+ * in the resulting runtime jar file.
+ */
+public class CompileGaussian {
+
+    /*
+     * The basic idea here is to create a few different versions of the
+     * Gaussian-based hardware effect peers, based on the kernel size.
+     * The first one handles kernel sizes up to 10, the next one up to 20,
+     * and so on.  This is better than unrolling a single version, since the
+     * generated shader would be very inefficient for smaller kernel sizes.
+     */
+    private static void compileGaussian(JSLCInfo jslcinfo)
+        throws Exception
+    {
+        int outTypes = jslcinfo.outTypes;
+        File baseFile = jslcinfo.getJSLFile();
+        String base = CompileJSL.readFile(baseFile);
+        long basetime = baseFile.lastModified();
+
+        // output one hardware shader for each unrolled size
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_SHADERS);
+        for (int i = 10; i <= 120; i += 10) {
+            String source = String.format(base, i);
+            jslcinfo.peerName = jslcinfo.shaderName + "_" + i;
+            JSLC.compile(jslcinfo, source, basetime);
+        }
+        jslcinfo.peerName = jslcinfo.shaderName + "_130";
+        JSLC.compile(jslcinfo, String.format(base, 127), basetime);
+
+        // output a single hardware peer class (can be instantiated for
+        // each of the shaders generated above)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_PEERS);
+        jslcinfo.peerName = null;
+        String genericbase = String.format(base, 0);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+
+        // output a single version of the software peer (there's
+        // no loop unrolling in this case)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_SW_PEERS);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+    }
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo("<GaussianBlur | MotionBlur | Shadow>");
+        int index = jslcinfo.parseArgs(args);
+        if (index == args.length) {
+            jslcinfo.error("Missing shader type");
+        }
+        String arg = args[index];
+        if (arg.equals("GaussianBlur") ||
+            arg.equals("MotionBlur") ||
+            arg.equals("Shadow"))
+        {
+            if (index < args.length - 1) {
+                jslcinfo.error("Extra arguments");
+            }
+            jslcinfo.shaderName = arg;
+            compileGaussian(jslcinfo);
+        } else {
+            jslcinfo.error("Unrecognized argument: "+arg);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileJSL.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from JSL definitions, and shouldn't be included in the
+ * resulting runtime jar file.
+ */
+public class CompileJSL {
+
+    private static String readStream(InputStream in) {
+        StringBuilder sb = new StringBuilder(1024);
+        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+        try {
+            char[] chars = new char[1024];
+            int numRead = 0;
+            while ((numRead = reader.read(chars)) > -1) {
+                sb.append(String.valueOf(chars, 0, numRead));
+            }
+        } catch (IOException e) {
+            System.err.println("Error reading stream");
+        } finally {
+            try {
+                reader.close();
+            } catch (IOException e) {
+                System.err.println("Error closing reader");
+            }
+        }
+        return sb.toString();
+    }
+
+    public static String readFile(File file) throws Exception {
+        return readStream(new FileInputStream(file));
+    }
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo("<jslfile>+");
+        int index = jslcinfo.parseArgs(args);
+        if (index >= args.length) {
+            jslcinfo.error("No JSL file specified");
+        }
+        while (index < args.length) {
+            jslcinfo.shaderName = args[index++];
+            JSLC.compile(jslcinfo, jslcinfo.getJSLFile());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileLinearConvolve.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import com.sun.scenario.effect.impl.state.LinearConvolveKernel;
+import java.io.File;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from the LinearConvolve JSL file, and should
+ * not be included in the resulting runtime jar file.
+ */
+public class CompileLinearConvolve {
+    /*
+     * The basic idea here is to create a few different versions of the
+     * LinearConvolve hardware effect peers, based on the kernel size.
+     * The LinearConvolveKernel state class contains the algorithm that
+     * determines how many peers should be generated and at which optimized
+     * sizes.
+     */
+    private static void compileLinearConvolve(JSLCInfo jslcinfo, String name)
+        throws Exception
+    {
+        int outTypes = jslcinfo.outTypes;
+        jslcinfo.shaderName = "Effect";
+        File baseFile = jslcinfo.getJSLFile(name);
+        String base = CompileJSL.readFile(baseFile);
+        long basetime = baseFile.lastModified();
+
+        // output one hardware shader for each unrolled size (as determined
+        // by the LinearConvolveKernel quantization algorithm)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_SHADERS);
+        int lastpeersize = -1;
+        for (int i = 1; i < LinearConvolveKernel.MAX_KERNEL_SIZE; i += 4) {
+            int peersize = LinearConvolveKernel.getPeerSize(i);
+            if (peersize != lastpeersize) {
+                String source = String.format(base, peersize/4, peersize/4);
+                jslcinfo.peerName = name + "_" + peersize;
+                JSLC.compile(jslcinfo, source, basetime);
+                lastpeersize = peersize;
+            }
+        }
+
+        // output a single hardware peer class (can be instantiated for
+        // each of the shaders generated above)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_PEERS);
+        jslcinfo.peerName = name;
+        jslcinfo.interfaceName = "LinearConvolvePeer";
+        int peersize = LinearConvolveKernel.MAX_KERNEL_SIZE / 4;
+        String genericbase = String.format(base, peersize, 0);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+
+        // output a single version of the software peer (there's
+        // no loop unrolling in this case)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_SW_PEERS);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+    }
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo("LinearConvolve[Shadow]");
+        int index = jslcinfo.parseArgs(args);
+        if (index != args.length - 1) {
+            jslcinfo.usage(System.err);
+        }
+        String arg = args[index];
+        if (arg.equals("LinearConvolve") ||
+            arg.equals("LinearConvolveShadow"))
+        {
+            compileLinearConvolve(jslcinfo, arg);
+        } else {
+            jslcinfo.error("Unrecognized argument: "+arg);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompilePhong.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+import com.sun.scenario.effect.light.Light;
+import java.io.File;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from PhongLighting.jsl, and shouldn't be included in the
+ * resulting runtime jar file.
+ */
+public class CompilePhong {
+
+    // light position is constant for distant lights
+    private static final String declPosConst =
+        "param float3 normalizedLightPosition;";
+    private static final String funcPosConst =
+        "float3 Lxyz = normalizedLightPosition;";
+
+    // light position depends on fragment location for point/spot lights
+    private static final String declPosVar =
+        "param float surfaceScale;\n" +
+        "param float3 lightPosition;";
+    private static final String funcPosVar =
+        "float bumpA = sample(bumpImg, pos0).a;\n" +
+        "float3 tmp = float3(pixcoord.x, pixcoord.y, surfaceScale*bumpA);\n" +
+        "float3 Lxyz = normalize(lightPosition - tmp);";
+
+    // light color is constant for distant/point lights
+    private static final String declRgbConst = "";
+    private static final String funcRgbConst =
+        "float3 Lrgb = lightColor;";
+
+    // light color depends on fragment location for spot lights
+    private static final String declRgbVar =
+        "param float3 normalizedLightDirection;\n" +
+        "param float lightSpecularExponent;";
+    private static final String funcRgbVar =
+        "float LdotS = dot(Lxyz, normalizedLightDirection);\n" +
+        "LdotS = min(LdotS, 0.0);\n" +
+        "float3 Lrgb = lightColor * pow(-LdotS, lightSpecularExponent);";
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo("PhongLighting");
+        jslcinfo.shaderName = "PhongLighting";
+        int index = jslcinfo.parseArgs(args);
+        if (index != args.length - 1) {
+            jslcinfo.usage(System.err);
+        }
+        String arg = args[index];
+        if (!arg.equals(jslcinfo.shaderName)) {
+            jslcinfo.error("Unrecognized argument: "+arg);
+        }
+
+        File baseFile = jslcinfo.getJSLFile();
+        String base = CompileJSL.readFile(baseFile);
+        long basetime = baseFile.lastModified();
+        for (Light.Type type : Light.Type.values()) {
+            String posDecl, posFunc, rgbFunc, rgbDecl;
+            switch (type) {
+            case DISTANT:
+                posDecl = declPosConst;
+                posFunc = funcPosConst;
+                rgbDecl = declRgbConst;
+                rgbFunc = funcRgbConst;
+                break;
+            case POINT:
+                posDecl = declPosVar;
+                posFunc = funcPosVar;
+                rgbDecl = declRgbConst;
+                rgbFunc = funcRgbConst;
+                break;
+            case SPOT:
+                posDecl = declPosVar;
+                posFunc = funcPosVar;
+                rgbDecl = declRgbVar;
+                rgbFunc = funcRgbVar;
+                break;
+            default:
+                throw new InternalError();
+            }
+            String decls = posDecl + "\n" + rgbDecl;
+            String funcs = posFunc + "\n" + rgbFunc;
+            String source = String.format(base, decls, funcs);
+            jslcinfo.peerName = jslcinfo.shaderName + "_" + type.name();
+            JSLC.compile(jslcinfo, source, basetime);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/generator/CompileZoomRadialBlur.java	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.File;
+import com.sun.scenario.effect.compiler.JSLC;
+import com.sun.scenario.effect.compiler.JSLC.JSLCInfo;
+
+/**
+ * This class is only used at build time to generate EffectPeer
+ * implementations from Gaussian-based JSL files, and shouldn't be included
+ * in the resulting runtime jar file.
+ */
+public class CompileZoomRadialBlur {
+
+    /*
+     * The basic idea here is to create a few different versions of the
+     * Gaussian-based hardware effect peers, based on the kernel size.
+     * The first one handles kernel sizes up to 10, the next one up to 20,
+     * and so on.  This is better than unrolling a single version, since the
+     * generated shader would be very inefficient for smaller kernel sizes.
+     */
+    private static void compileZoomRadialBlur(JSLCInfo jslcinfo)
+        throws Exception
+    {
+        int outTypes = jslcinfo.outTypes;
+        File baseFile = jslcinfo.getJSLFile();
+        String base = CompileJSL.readFile(baseFile);
+        long basetime = baseFile.lastModified();
+
+        // output one hardware shader for each unrolled size
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_SHADERS);
+        for (int i = 4; i <= 68; i+=4) {
+            String source = String.format(base, 2*i + 1);
+            jslcinfo.peerName = jslcinfo.shaderName + "_" + i;
+            JSLC.compile(jslcinfo, source, basetime);
+        }
+
+        // output a single hardware peer class (can be instantiated for
+        // each of the shaders generated above)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_HW_PEERS);
+        jslcinfo.peerName = null;
+        String genericbase = String.format(base, 0);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+
+        // output a single version of the software peer (there's
+        // no loop unrolling in this case)
+        jslcinfo.outTypes = (outTypes & JSLC.OUT_SW_PEERS);
+        JSLC.compile(jslcinfo, genericbase, basetime);
+    }
+
+    public static void main(String[] args) throws Exception {
+        JSLCInfo jslcinfo = new JSLCInfo();
+        jslcinfo.shaderName = "ZoomRadialBlur";
+        jslcinfo.parseAllArgs(args);
+        compileZoomRadialBlur(jslcinfo);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+<<
+private float getOpacity() {
+    return getEffect().getOpacity();
+}
+>>
+
+param sampler botImg;
+param sampler topImg;
+param float opacity;
+
+//
+// All blend modes are based on the same equations:
+//
+// Ra = Ba + Ta - Ba x Ta
+// Ra x Rc' = [(1 - Ta) x Ba x Bc'] + [(1 - Ba) x Ta x Tc'] + Ba x Ta x B(Bc', Tc')
+//
+// where
+//
+// Ba  = bottom alpha
+// Bc' = bottom non-premultiplied color
+// Ta  = top alpha
+// Tc' = top non-premultiplied color
+// Ra = result alpha
+// Rc' = result non-premultiplied color
+// B(Bc', Tc') = blend mode equation
+//
+// If the colors are premultiplied then the second equation becomes
+//
+// Rc = [(1 - Ta) x Bc] + [(1 - Ba) x Tc] + Ba x Ta x B(Bc / Ba, Tc / Ta)
+//
+// where
+//
+// Bc = bottom premultiplied color
+// Tc = top premultiplied color
+// Rc = result premultiplied color
+//
+// For a given mode the final equation is therefore derived from the blend
+// mode equation applied to the premultiplied colors and substituted in the
+// above equation for Rc.
+//
+// Reference:
+// PDF Reference, sixth edition, Adobe Portable Document Format, Version 1.7,
+// November 2006, section 7.2.
+//
+
+// placeholder for blend_<mode>() function
+%s
+
+void main()
+{
+    float4 bot = sample(botImg, pos0);
+    float4 top = sample(topImg, pos1) * opacity;
+    color = blend_%s(bot, top);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_ADD.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+//
+// Add mode is misleadingly named as it is not equivalent to "Additive" mode but
+// is instead a linear dodge. The blend equation is defined by
+//
+// B(Bc', Tc') = min(1.0, Bc' + Tc')
+//
+// where Bc' and Tc' are the non-premultiplied bottom and top colors, respectively.
+// In our case the colors are premultiplied so this condition is equivalent to
+// min(Ba x Ta, Ba x Tc + Ta x Bc).
+//
+// Actually, you can rewrite the equations to maximize their similarity and see
+// that you have:
+//
+// Rc = (1-Ta)Bc + (1-Ba)Tc + BaTa*min(1.0, Bc/Ba + Tc/Ta)
+//     = Bc - TaBc + Tc - BaTc + min(BaTa, TaBc + BaTc)
+//
+// for (BaTa) being smaller (or equal) we get:
+//
+// Rc = Bc + Tc - TaBc - BaTc + BaTa
+//    = Bc + Tc - (BaTc + TaBc - TaBa)
+// [Note that (BaTc + TaBc - TaBa) is >= 0]
+//
+// for (TaBc + BaTc) being smaller (or equal) we get:
+//
+// Rc = Bc + Tc - TaBc - BaTc + TaBc + BaTc
+//    = Bc + Tc + 0
+// [Note that (BaTc + TaBc - TaBa) is <= 0]
+//
+// So, we subtract that last term, unless it is less than zero (we don't want to
+// produce an answer that is greater than Tc+Bc ever).  This would let you use
+// vector math to compute that term, then a vector min or max to make sure it is
+// clipped at 0.  Also, note that the alpha equation is (Ta + Ba - TaBa) and if
+// we compute (BaTa + TaBa - TaBa == TaBa) then we end up with the value we need
+// to subtract for alpha as well (and it is never less than 0) and so we can
+// symmetrically use this equation for all components.
+//
+// So, this equation works too:
+//
+//     R = max(BTa + TBa - TaBa, 0.0)
+//
+// or in code:
+//
+//     float4 mix = max(bot*top.a + top*bot.a - top.a*bot.a, 0.0);
+//     return bot + top - mix;
+//
+float4 blend_add(float4 bot, float4 top)
+{
+    // Separate the expression defining "mix" from the return statement to
+    // circumvent a JSL parsing limitation.
+    float4 mix = max(bot*top.a + top*bot.a - top.a*bot.a, 0.0);
+    return bot + top - mix;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_BLUE.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_blue(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rg = bot.rg;
+    res.b = (1.0 - top.a)*bot.b + top.b;
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_COLOR_BURN.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_color_burn(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = (1.0 - top.a)*bot.rgb + (1.0 - bot.a)*top.rgb;
+
+    float proda = bot.a*top.a;
+    float topa2 = top.a*top.a;
+    float3 tmp;
+
+    if (bot.a == bot.r) {
+        tmp.r = proda;
+    } else if (top.r == 0.0) {
+        tmp.r = 0.0;
+    } else {
+        tmp.r = topa2*(bot.a - bot.r)/top.r;
+        if (tmp.r >= proda) {
+            tmp.r = 0.0;
+        } else {
+            tmp.r = proda - tmp.r;
+        }
+    }
+
+    if (bot.a == bot.g) {
+        tmp.g = proda;
+    } else if (top.g == 0.0) {
+        tmp.g = 0.0;
+    } else {
+        tmp.g = topa2*(bot.a - bot.g)/top.g;
+        if (tmp.g >= proda) {
+            tmp.g = 0.0;
+        } else {
+            tmp.g = proda - tmp.g;
+        }
+    }
+
+    if (bot.a == bot.b) {
+        tmp.b = proda;
+    } else if (top.b == 0.0) {
+        tmp.b = 0.0;
+    } else {
+        tmp.b = topa2*(bot.a - bot.b)/top.b;
+        if (tmp.b >= proda) {
+            tmp.b = 0.0;
+        } else {
+            tmp.b = proda - tmp.b;
+        }
+    }
+
+    res.rgb = res.rgb + tmp;
+
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_COLOR_DODGE.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_color_dodge(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = (1.0 - top.a)*bot.rgb + (1.0 - bot.a)*top.rgb;
+
+    float proda = bot.a*top.a;
+    float3 tmp;
+
+    if (bot.r == 0.0) {
+        tmp.r = 0.0;
+    } else if (top.a == top.r) {
+        tmp.r = proda;
+    } else {
+        tmp.r = top.a*top.a*bot.r/(top.a - top.r);
+        if (tmp.r > proda) {
+            tmp.r = proda;
+        }
+    }
+
+    if (bot.g == 0.0) {
+        tmp.g = 0.0;
+    } else if (top.a == top.g) {
+        tmp.g = proda;
+    } else {
+        tmp.g = top.a*top.a*bot.g/(top.a - top.g);
+        if (tmp.g > proda) {
+            tmp.g = proda;
+        }
+    }
+
+    if (bot.b == 0.0) {
+        tmp.b = 0.0;
+    } else if (top.a == top.b) {
+        tmp.b = proda;
+    } else {
+        tmp.b = top.a*top.a*bot.b/(top.a - top.b);
+        if (tmp.b > proda) {
+            tmp.b = proda;
+        }
+    }
+
+    res.rgb = res.rgb + tmp;
+
+    return res;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_DARKEN.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_darken(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = bot.rgb + top.rgb - max(top.a*bot.rgb, bot.a*top.rgb);
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_DIFFERENCE.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_difference(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = bot.rgb + top.rgb - 2.0*min(top.a*bot.rgb, bot.a*top.rgb);
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_EXCLUSION.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_exclusion(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = top.rgb + bot.rgb - (2.0 * top.rgb * bot.rgb);
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_GREEN.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_green(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rb = bot.rb;
+    res.g = (1.0 - top.a)*bot.g + top.g;
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_HARD_LIGHT.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_hard_light(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    float halftopa = 0.5*top.a;
+    if (top.r > halftopa) {
+        res.r = top.r +
+           bot.a*(top.r - top.a) - bot.r*(2.0*top.r - top.a - 1.0);
+    } else {
+        res.r = 2.0*bot.r*top.r + bot.r*(1.0 - top.a) + top.r*(1.0 - bot.a);
+    }
+    if (top.g > halftopa) {
+        res.g = top.g +
+           bot.a*(top.g - top.a) - bot.g*(2.0*top.g - top.a - 1.0);
+    } else {
+        res.g = 2.0*bot.g*top.g + bot.g*(1.0 - top.a) + top.g*(1.0 - bot.a);
+    }
+    if (top.b > halftopa) {
+        res.b = top.b +
+           bot.a*(top.b - top.a) - bot.b*(2.0*top.b - top.a - 1.0);
+    } else {
+        res.b = 2.0*bot.b*top.b + bot.b*(1.0 - top.a) + top.b*(1.0 - bot.a);
+    }
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_LIGHTEN.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+float4 blend_lighten(float4 bot, float4 top)
+{
+    float4 res;
+    res.a = bot.a + top.a - (bot.a * top.a);
+    res.rgb = bot.rgb + top.rgb - min(top.a*bot.rgb, bot.a*top.rgb);
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_MULTIPLY.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+// Nominally res.C = bot.C * top.C
+// This works find for the color components, especially if the pixels
+// are opaque, but when the alpha is less than opaque then the result
+// gets a little more complicated.
+// First, note that we calculate the above with premultiplied components
+// such that the effective equation is really:
+//     res.C = bot.C * bot.a * top.C * top.a
+// Next, note that as alpha goes to zero, the operation should approach
+// a non-operation (NOP).  Unfortunately, the effect of smaller alphas
+// on this equation is to drive it towards zero.  Thus, as alpha goes
+// to zero, the result goes towards black, rather than going towards
+// the other operand.
+// To adjust for lowering alphas, we simply add back in the "unaffected"
+// portions of the other operands, as in:
+//    res.C = product + unaltered_top + unaltered_bottom
+//    res.C = bot.C*top.C + top.C*(1-bot.a) + bot.C*(1-top.a)
+// A: res.C = top.C * (bot.C + 1 - bot.a) + bot.C * (1 - top.a)
+// Note that for alphas we want:
+//    res.a = bot.a + top.a - bot.a * top.a
+// If we simply perform the above equation (A) on alpha as well, we get:
+//    res.a = top.a * (bot.a + 1 - bot.a) + bot.a * (1 - top.a)
+//    res.a = top.a * (1) + bot.a - bot.a * top.a
+//    res.a = bot.a + top.a - bot.a * top.a
+// This means we can apply equation (A) on all components for simplicity.
+float4 blend_multiply(float4 bot, float4 top)
+{
+    return bot * (top + 1.0 - top.a) + top * (1.0 - bot.a);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/decora-runtime/jsl/Blend_OVERLAY.jsl	Thu Feb 07 13:14:03 2013 -0800
@@ -0,0 +1,59 @@
+/*