jfxrt

amInt2;
    Object localObject1 = null;
    Object localObject2 = null;
    int i = Integer.MAX_VALUE;
    Iterator localIterator = unlocked.iterator();
    Filterable localFilterable;
    while (localIterator.hasNext())
    {
      localObject3 = (SoftReference)localIterator.next();
      localFilterable = (Filterable)((SoftReference)localObject3).get();
      if (localFilterable == null)
      {
        localIterator.remove();
      }
      else
      {
        int j = localFilterable.getPhysicalWidth();
        int k = localFilterable.getPhysicalHeight();
        if ((j >= paramInt1) && (k >= paramInt2) && (j * k / 2 <= paramInt1 * paramInt2))
        {
          int m = (j - paramInt1) * (k - paramInt2);
          if ((localObject1 == null) || (m < i))
          {
            localObject1 = localObject3;
            localObject2 = localFilterable;
            i = m;
          }
        }
      }
    }
    if (localObject1 != null)
    {
      unlocked.remove(localObject1);
      locked.add(localObject1);
      paramRenderer.clearImage((Filterable)localObject2);
      return (Filterable)localObject2;
    }
    localIterator = locked.iterator();
    while (localIterator.hasNext())
    {
      localObject3 = (SoftReference)localIterator.next();
      localFilterable = (Filterable)((SoftReference)localObject3).get();
      if (localFilterable == null) {
        localIterator.remove();
      }
    }
    Object localObject3 = null;
    try
    {
      localObject3 = paramRenderer.createCompatibleImage(paramInt1, paramInt2);
    }
    catch (OutOfMemoryError localOutOfMemoryError1) {}
    if (localObject3 == null)
    {
      pruneCache();
      try
      {
        localObject3 = paramRenderer.createCompatibleImage(paramInt1, paramInt2);
      }
      catch (OutOfMemoryError localOutOfMemoryError2) {}
    }
    if (localObject3 != null)
    {
      locked.add(new SoftReference(localObject3));
      numCreated += 1L;
      pixelsCreated += paramInt1 * paramInt2;
    }
    return (Filterable)localObject3;
  }
  
  public synchronized void checkIn(Filterable paramFilterable)
  {
    Object localObject1 = null;
    Object localObject2 = null;
    Iterator localIterator = locked.iterator();
    while (localIterator.hasNext())
    {
      SoftReference localSoftReference = (SoftReference)localIterator.next();
      Filterable localFilterable = (Filterable)localSoftReference.get();
      if (localFilterable == null)
      {
        localIterator.remove();
      }
      else if (localFilterable == paramFilterable)
      {
        localObject1 = localSoftReference;
        localObject2 = localFilterable;
        break;
      }
    }
    if (localObject1 != null)
    {
      locked.remove(localObject1);
      if (usePurgatory)
      {
        hardPurgatory.add(localObject2);
        softPurgatory.add(localObject1);
      }
      else
      {
        unlocked.add(localObject1);
      }
    }
  }
  
  public synchronized void releasePurgatory()
  {
    if ((usePurgatory) && (!softPurgatory.isEmpty()))
    {
      unlocked.addAll(softPurgatory);
      softPurgatory.clear();
      hardPurgatory.clear();
    }
  }
  
  private void pruneCache()
  {
    Iterator localIterator = unlocked.iterator();
    while (localIterator.hasNext())
    {
      SoftReference localSoftReference = (SoftReference)localIterator.next();
      Filterable localFilterable = (Filterable)localSoftReference.get();
      if (localFilterable != null) {
        localFilterable.flush();
      }
    }
    unlocked.clear();
    System.gc();
    System.runFinalization();
    System.gc();
    System.runFinalization();
  }
  
  public synchronized void dispose()
  {
    Iterator localIterator = unlocked.iterator();
    while (localIterator.hasNext())
    {
      SoftReference localSoftReference = (SoftReference)localIterator.next();
      Filterable localFilterable = (Filterable)localSoftReference.get();
      if (localFilterable != null) {
        localFilterable.flush();
      }
    }
    unlocked.clear();
    locked.clear();
  }
  
  static
  {
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Object run()
      {
        if (System.getProperty("decora.showstats") != null) {
          Runtime.getRuntime().addShutdownHook(new Thread()
          {
            public void run() {}
          });
        }
        return null;
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.ImagePool
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl;

public enum Renderer$RendererState
{
  OK,  LOST,  DISPOSED;
  
  private Renderer$RendererState() {}
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.Renderer.RendererState
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl;

import com.sun.javafx.geom.Rectangle;
import com.sun.javafx.geom.transform.Affine2D;
import com.sun.javafx.geom.transform.BaseTransform;
import com.sun.scenario.effect.Effect;
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 java.io.PrintStream;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public abstract class Renderer
{
  public static final String rootPkg = "com.sun.scenario.effect";
  private static final Map<FilterContext, Renderer> rendererMap = new HashMap(1);
  private Map<String, EffectPeer> peerCache = Collections.synchronizedMap(new HashMap(5));
  private final ImagePool imagePool = new ImagePool();
  protected static boolean verbose;
  
  public abstract Effect.AccelType getAccelType();
  
  public abstract Filterable createCompatibleImage(int paramInt1, int paramInt2);
  
  public Filterable getCompatibleImage(int paramInt1, int paramInt2)
  {
    return imagePool.checkOut(this, paramInt1, paramInt2);
  }
  
  public void releaseCompatibleImage(Filterable paramFilterable)
  {
    imagePool.checkIn(paramFilterable);
  }
  
  public void releasePurgatory()
  {
    imagePool.releasePurgatory();
  }
  
  public abstract void clearImage(Filterable paramFilterable);
  
  public abstract ImageData createImageData(FilterContext paramFilterContext, Filterable paramFilterable);
  
  public ImageData transform(FilterContext paramFilterContext, ImageData paramImageData, int paramInt1, int paramInt2)
  {
    if (!paramImageData.getTransform().isIdentity()) {
      throw new InternalError("transform by powers of 2 requires untransformed source");
    }
    if ((paramInt1 | paramInt2) == 0) {
      return paramImageData;
    }
    Affine2D localAffine2D = new Affine2D();
    double d2;
    while ((paramInt1 < -1) || (paramInt2 < -1))
    {
      Rectangle localRectangle1 = paramImageData.getUntransformedBounds();
      Rectangle localRectangle2 = new Rectangle(localRectangle1);
      d2 = 1.0D;
      double d3 = 1.0D;
      if (paramInt1 < 0)
      {
        d2 = 0.5D;
        width = ((width + 1) / 2);
        x /= 2;
        paramInt1++;
      }
      if (paramInt2 < 0)
      {
        d3 = 0.5D;
        height = ((height + 1) / 2);
        y /= 2;
        paramInt2++;
      }
      localAffine2D.setToScale(d2, d3);
      paramImageData = transform(paramFilterContext, paramImageData, localAffine2D, localRectangle1, localRectangle2);
    }
    if ((paramInt1 | paramInt2) != 0)
    {
      double d1 = paramInt1 < 0 ? 0.5D : 1 << paramInt1;
      d2 = paramInt2 < 0 ? 0.5D : 1 << paramInt2;
      localAffine2D.setToScale(d1, d2);
      paramImageData = paramImageData.transform(localAffine2D);
    }
    return paramImageData;
  }
  
  public abstract Filterable transform(FilterContext paramFilterContext, Filterable paramFilterable, BaseTransform paramBaseTransform, Rectangle paramRectangle1, Rectangle paramRectangle2);
  
  public abstract ImageData transform(FilterContext paramFilterContext, ImageData paramImageData, BaseTransform paramBaseTransform, Rectangle paramRectangle1, Rectangle paramRectangle2);
  
  public Object createFloatTexture(int paramInt1, int paramInt2)
  {
    throw new InternalError();
  }
  
  public void updateFloatTexture(Object paramObject, FloatMap paramFloatMap)
  {
    throw new InternalError();
  }
  
  public final synchronized EffectPeer getPeerInstance(FilterContext paramFilterContext, String paramString, int paramInt)
  {
    EffectPeer localEffectPeer = (EffectPeer)peerCache.get(paramString);
    if (localEffectPeer != null) {
      return localEffectPeer;
    }
    if (paramInt > 0)
    {
      localEffectPeer = (EffectPeer)peerCache.get(paramString + "_" + paramInt);
      if (localEffectPeer != null) {
        return localEffectPeer;
      }
    }
    localEffectPeer = createPeer(paramFilterContext, paramString, paramInt);
    if (localEffectPeer == null) {
      throw new RuntimeException("Could not create peer  " + paramString + " for renderer " + this);
    }
    peerCache.put(localEffectPeer.getUniqueName(), localEffectPeer);
    return localEffectPeer;
  }
  
  public abstract RendererState getRendererState();
  
  protected abstract EffectPeer createPeer(FilterContext paramFilterContext, String paramString, int paramInt);
  
  protected Collection<EffectPeer> getPeers()
  {
    return peerCache.values();
  }
  
  protected static Renderer getSoftwareRenderer()
  {
    return RendererFactory.getSoftwareRenderer();
  }
  
  protected abstract Renderer getBackupRenderer();
  
  protected Renderer getRendererForSize(Effect paramEffect, int paramInt1, int paramInt2)
  {
    return this;
  }
  
  public static synchronized Renderer getRenderer(FilterContext paramFilterContext)
  {
    if (paramFilterContext == null) {
      throw new IllegalArgumentException("FilterContext must be non-null");
    }
    Renderer localRenderer = (Renderer)rendererMap.get(paramFilterContext);
    if (localRenderer != null)
    {
      if (localRenderer.getRendererState() == RendererState.OK) {
        return localRenderer;
      }
      if (localRenderer.getRendererState() == RendererState.LOST) {
        return localRenderer.getBackupRenderer();
      }
      if (localRenderer.getRendererState() == RendererState.DISPOSED) {
        localRenderer = null;
      }
    }
    if (localRenderer == null)
    {
      Collection localCollection = rendererMap.values();
      Object localObject1 = localCollection.iterator();
      Object localObject2;
      while (((Iterator)localObject1).hasNext())
      {
        localObject2 = (Renderer)((Iterator)localObject1).next();
        if (((Renderer)localObject2).getRendererState() == RendererState.DISPOSED)
        {
          imagePool.dispose();
          ((Iterator)localObject1).remove();
        }
      }
      localRenderer = RendererFactory.createRenderer(paramFilterContext);
      if (localRenderer == null) {
        throw new RuntimeException("Error creating a Renderer");
      }
      if (verbose)
      {
        localObject1 = localRenderer.getClass().getName();
        localObject2 = ((String)localObject1).substring(((String)localObject1).lastIndexOf(".") + 1);
        Object localObject3 = paramFilterContext.getReferent();
        System.out.println("Created " + (String)localObject2 + " (AccelType=" + localRenderer.getAccelType() + ") for " + localObject3);
      }
      rendererMap.put(paramFilterContext, localRenderer);
    }
    return localRenderer;
  }
  
  public static Renderer getRenderer(FilterContext paramFilterContext, Effect paramEffect, int paramInt1, int paramInt2)
  {
    return getRenderer(paramFilterContext).getRendererForSize(paramEffect, paramInt1, paramInt2);
  }
  
  public abstract boolean isImageDataCompatible(ImageData paramImageData);
  
  static
  {
    try
    {
      verbose = Boolean.getBoolean("decora.verbose");
    }
    catch (SecurityException localSecurityException) {}
  }
  
  public static enum RendererState
  {
    OK,  LOST,  DISPOSED;
    
    private RendererState() {}
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.Renderer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl;

import com.sun.scenario.effect.FilterContext;
import java.security.PrivilegedAction;

final class RendererFactory$1
  implements PrivilegedAction<Renderer>
{
  RendererFactory$1(FilterContext paramFilterContext) {}
  
  public Renderer run()
  {
    Renderer localRenderer = null;
    String str1 = val$fctx.getClass().getName();
    String str2 = str1.substring(str1.lastIndexOf(".") + 1);
    if ((str2.equals("PrFilterContext")) && (RendererFactory.access$000())) {
      localRenderer = RendererFactory.access$100(val$fctx);
    }
    if ((localRenderer == null) && (RendererFactory.access$200()) && (RendererFactory.access$300(val$fctx))) {
      localRenderer = RendererFactory.access$400(val$fctx);
    }
    if ((localRenderer == null) && (RendererFactory.access$500())) {
      localRenderer = RendererFactory.access$600(val$fctx);
    }
    if ((localRenderer == null) && (RendererFactory.access$700())) {
      localRenderer = RendererFactory.access$800();
    }
    if (localRenderer == null) {
      localRenderer = RendererFactory.access$900();
    }
    return localRenderer;
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.RendererFactory.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl;

import com.sun.javafx.PlatformUtil;
import com.sun.scenario.effect.FilterContext;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;

class RendererFactory
{
  private static String rootPkg = "com.sun.scenario.effect";
  private static boolean tryRSL = true;
  private static boolean trySIMD = true;
  private static boolean tryJOGL = PlatformUtil.isMac();
  private static boolean tryPrism = true;
  
  private static boolean isRSLFriendly(Class paramClass)
  {
    if (paramClass.getName().equals("sun.java2d.pipe.hw.AccelGraphicsConfig")) {
      return true;
    }
    boolean bool = false;
    for (Class localClass : paramClass.getInterfaces()) {
      if (isRSLFriendly(localClass))
      {
        bool = true;
        break;
      }
    }
    return bool;
  }
  
  private static boolean isRSLAvailable(FilterContext paramFilterContext)
  {
    return isRSLFriendly(paramFilterContext.getReferent().getClass());
  }
  
  private static Renderer createRSLRenderer(FilterContext paramFilterContext)
  {
    try
    {
      Class localClass = Class.forName(rootPkg + ".impl.j2d.rsl.RSLRenderer");
      Method localMethod = localClass.getMethod("createRenderer", new Class[] { FilterContext.class });
      return (Renderer)localMethod.invoke(null, new Object[] { paramFilterContext });
    }
    catch (Throwable localThrowable) {}
    return null;
  }
  
  private static Renderer createJOGLRenderer(FilterContext paramFilterContext)
  {
    if (tryJOGL) {
      try
      {
        Class localClass = Class.forName(rootPkg + ".impl.j2d.jogl.JOGLRenderer");
        Method localMethod = localClass.getMethod("createRenderer", new Class[] { FilterContext.class });
        return (Renderer)localMethod.invoke(null, new Object[] { paramFilterContext });
      }
      catch (Throwable localThrowable) {}
    }
    return null;
  }
  
  private static Renderer createPrismRenderer(FilterContext paramFilterContext)
  {
    if (tryPrism) {
      try
      {
        Class localClass = Class.forName(rootPkg + ".impl.prism.PrRenderer");
        Method localMethod = localClass.getMethod("createRenderer", new Class[] { FilterContext.class });
        return (Renderer)localMethod.invoke(null, new Object[] { paramFilterContext });
      }
      catch (Throwable localThrowable)
      {
        localThrowable.printStackTrace();
      }
    }
    return null;
  }
  
  private static Renderer getSSERenderer()
  {
    if (trySIMD)
    {
      try
      {
        Class localClass = Class.forName(rootPkg + ".impl.j2d.J2DSWRenderer");
        Method localMethod = localClass.getMethod("getSSEInstance", (Class[])null);
        Renderer localRenderer = (Renderer)localMethod.invoke(null, (Object[])null);
        if (localRenderer != null) {
          return localRenderer;
        }
      }
      catch (Throwable localThrowable) {}
      trySIMD = false;
    }
    return null;
  }
  
  private static Renderer getJavaRenderer()
  {
    try
    {
      Class localClass = Class.forName(rootPkg + ".impl.j2d.J2DSWRenderer");
      Method localMethod = localClass.getMethod("getJSWInstance", (Class[])null);
      Renderer localRenderer = (Renderer)localMethod.invoke(null, (Object[])null);
      if (localRenderer != null) {
        return localRenderer;
      }
    }
    catch (Throwable localThrowable) {}
    return null;
  }
  
  static Renderer getSoftwareRenderer()
  {
    Renderer localRenderer = getSSERenderer();
    if (localRenderer == null) {
      localRenderer = getJavaRenderer();
    }
    return localRenderer;
  }
  
  static Renderer createRenderer(FilterContext paramFilterContext)
  {
    (Renderer)AccessController.doPrivileged(new PrivilegedAction()
    {
      public Renderer run()
      {
        Renderer localRenderer = null;
        String str1 = val$fctx.getClass().getName();
        String str2 = str1.substring(str1.lastIndexOf(".") + 1);
        if ((str2.equals("PrFilterContext")) && (RendererFactory.tryPrism)) {
          localRenderer = RendererFactory.createPrismRenderer(val$fctx);
        }
        if ((localRenderer == null) && (RendererFactory.tryRSL) && (RendererFactory.isRSLAvailable(val$fctx))) {
          localRenderer = RendererFactory.createRSLRenderer(val$fctx);
        }
        if ((localRenderer == null) && (RendererFactory.tryJOGL)) {
          localRenderer = RendererFactory.createJOGLRenderer(val$fctx);
        }
        if ((localRenderer == null) && (RendererFactory.trySIMD)) {
          localRenderer = RendererFactory.access$800();
        }
        if (localRenderer == null) {
          localRenderer = RendererFactory.access$900();
        }
        return localRenderer;
      }
    });
  }
  
  static
  {
    try
    {
      if ("false".equals(System.getProperty("decora.rsl"))) {
        tryRSL = false;
      }
      if ("false".equals(System.getProperty("decora.simd"))) {
        trySIMD = false;
      }
      String str = System.getProperty("decora.jogl");
      if (str != null) {
        tryJOGL = Boolean.parseBoolean(str);
      }
      if ("false".equals(System.getProperty("decora.prism"))) {
        tryPrism = false;
      }
    }
    catch (SecurityException localSecurityException) {}
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.RendererFactory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

public abstract interface Drawable
  extends Texture
{
  public abstract long getNativeDestHandle();
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.Drawable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

public abstract interface RendererDelegate$Listener
{
  public abstract void markLost();
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.RendererDelegate.Listener
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

import com.sun.scenario.effect.Effect.AccelType;
import com.sun.scenario.effect.FloatMap;
import java.util.Map;

public abstract interface RendererDelegate
{
  public abstract Effect.AccelType getAccelType();
  
  public abstract void setListener(Listener paramListener);
  
  public abstract void enable();
  
  public abstract void disable();
  
  public abstract void dispose();
  
  public abstract Shader createShader(String paramString, Map<String, Integer> paramMap1, Map<String, Integer> paramMap2);
  
  public abstract Texture createFloatTexture(int paramInt1, int paramInt2);
  
  public abstract void updateFloatTexture(Object paramObject, FloatMap paramFloatMap);
  
  public abstract void drawQuad(Drawable paramDrawable, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4);
  
  public abstract void drawTexture(Drawable paramDrawable, Texture paramTexture, boolean paramBoolean, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8);
  
  public abstract void drawMappedTexture(Drawable paramDrawable, Texture paramTexture, boolean paramBoolean, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12);
  
  public abstract void drawTexture(Drawable paramDrawable, Texture paramTexture1, boolean paramBoolean1, Texture paramTexture2, boolean paramBoolean2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12);
  
  public abstract void drawMappedTexture(Drawable paramDrawable, Texture paramTexture1, boolean paramBoolean1, Texture paramTexture2, boolean paramBoolean2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12, float paramFloat13, float paramFloat14, float paramFloat15, float paramFloat16, float paramFloat17, float paramFloat18, float paramFloat19, float paramFloat20);
  
  public static abstract interface Listener
  {
    public abstract void markLost();
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.RendererDelegate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

import java.nio.FloatBuffer;
import java.nio.IntBuffer;

public abstract interface Shader
{
  public abstract void enable();
  
  public abstract void disable();
  
  public abstract boolean isValid();
  
  public abstract void dispose();
  
  public abstract void setConstant(String paramString, int paramInt);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2, int paramInt3);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4);
  
  public abstract void setConstants(String paramString, IntBuffer paramIntBuffer, int paramInt1, int paramInt2);
  
  public abstract void setConstant(String paramString, float paramFloat);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2, float paramFloat3);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4);
  
  public abstract void setConstants(String paramString, FloatBuffer paramFloatBuffer, int paramInt1, int paramInt2);
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.Shader
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

import com.sun.scenario.effect.Effect.AccelType;
import java.io.InputStream;

public abstract interface ShaderSource
{
  public abstract InputStream loadSource(String paramString);
  
  public abstract Effect.AccelType getAccelType();
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.ShaderSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw;

import com.sun.javafx.geom.Rectangle;

public abstract interface Texture
{
  public abstract Rectangle getNativeBounds();
  
  public abstract long getNativeSourceHandle();
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.Texture
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.hw.d3d;

import com.sun.scenario.effect.Effect.AccelType;
import com.sun.scenario.effect.impl.hw.ShaderSource;
import java.io.InputStream;

public class D3DShaderSource
  implements ShaderSource
{
  public InputStream loadSource(String paramString)
  {
    return D3DShaderSource.class.getResourceAsStream("hlsl/" + paramString + ".obj");
  }
  
  public Effect.AccelType getAccelType()
  {
    return Effect.AccelType.DIRECT3D;
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.hw.d3d.D3DShaderSource
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
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 paramFilterContext, Renderer paramRenderer, String paramString)
  {
    super(paramFilterContext, paramRenderer, paramString);
  }
  
  public ImageData filter(Effect paramEffect, BaseTransform paramBaseTransform, Rectangle paramRectangle, ImageData... paramVarArgs)
  {
    FilterContext localFilterContext = getFilterContext();
    ImageData localImageData = paramVarArgs[0];
    Rectangle localRectangle1 = localImageData.getTransformedBounds(null);
    if (paramRectangle.contains(localRectangle1))
    {
      localImageData.addref();
      return localImageData;
    }
    Rectangle localRectangle2 = new Rectangle(localRectangle1);
    localRectangle2.intersectWith(paramRectangle);
    int i = width;
    int j = height;
    PrDrawable localPrDrawable = (PrDrawable)getRenderer().getCompatibleImage(i, j);
    if ((!localImageData.validate(localFilterContext)) || (localPrDrawable == null))
    {
      localPrDrawable = null;
    }
    else
    {
      Graphics localGraphics = localPrDrawable.createGraphics();
      PrEffectHelper.renderImageData(localGraphics, localImageData, localRectangle2);
    }
    return new ImageData(localFilterContext, localPrDrawable, localRectangle2);
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.prism.PrCropPeer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
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<RTTexture>
  implements Filterable
{
  public static PrDrawable create(FilterContext paramFilterContext, RTTexture paramRTTexture)
  {
    return ((PrRenderer)Renderer.getRenderer(paramFilterContext)).createDrawable(paramRTTexture);
  }
  
  protected PrDrawable(RTTexture paramRTTexture)
  {
    super(paramRTTexture);
  }
  
  public float getPixelScale()
  {
    return 1.0F;
  }
  
  public abstract Graphics createGraphics();
  
  public void clear()
  {
    Graphics localGraphics = createGraphics();
    localGraphics.clear();
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.prism.PrDrawable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.prism;

import com.sun.glass.ui.Screen;
import com.sun.javafx.geom.PickRay;
import com.sun.javafx.geom.Point2D;
import com.sun.javafx.geom.Rectangle;
import com.sun.javafx.geom.Vec3d;
import com.sun.javafx.geom.transform.Affine2D;
import com.sun.javafx.geom.transform.Affine3D;
import com.sun.javafx.geom.transform.BaseTransform;
import com.sun.javafx.geom.transform.NoninvertibleTransformException;
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.ImageData;
import com.sun.scenario.effect.impl.EffectPeer;
import com.sun.scenario.effect.impl.ImagePool;

public class PrEffectHelper
{
  public static void render(Effect paramEffect1, Graphics paramGraphics, float paramFloat1, float paramFloat2, Effect paramEffect2)
  {
    Rectangle localRectangle1 = getGraphicsClipNoClone(paramGraphics);
    BaseTransform localBaseTransform1 = paramGraphics.getTransformNoClone().copy();
    Object localObject1;
    Object localObject2;
    Object localObject3;
    if (localBaseTransform1.is2D())
    {
      if ((paramFloat1 != 0.0F) || (paramFloat2 != 0.0F) || (!localBaseTransform1.isIdentity()))
      {
        localObject1 = new Affine2D(localBaseTransform1);
        ((Affine2D)localObject1).translate(paramFloat1, paramFloat2);
      }
      else
      {
        localObject1 = BaseTransform.IDENTITY_TRANSFORM;
      }
      paramGraphics.setTransform(null);
      localObject2 = null;
    }
    else
    {
      double d1 = Math.hypot(localBaseTransform1.getMxx(), localBaseTransform1.getMyx());
      double d2 = Math.hypot(localBaseTransform1.getMxy(), localBaseTransform1.getMyy());
      double d3 = Math.max(d1, d2);
      if (d3 <= 1.0D)
      {
        localObject1 = BaseTransform.IDENTITY_TRANSFORM;
        localObject2 = localBaseTransform1;
      }
      else
      {
        localObject1 = BaseTransform.getScaleInstance(d3, d3);
        localObject2 = new Affine3D(localBaseTransform1);
        d3 = 1.0D / d3;
        ((Affine3D)localObject2).scale(d3, d3);
      }
      localObject3 = paramGraphics.getCameraNoClone();
      BaseTransform localBaseTransform2;
      try
      {
        localBaseTransform2 = ((BaseTransform)localObject2).createInverse();
      }
      catch (NoninvertibleTransformException localNoninvertibleTransformException)
      {
        return;
      }
      PickRay localPickRay = new PickRay();
      Vec3d localVec3d = new Vec3d();
      float f1 = x + 0.5F;
      float f2 = y + 0.5F;
      float f3 = x + width - 0.5F;
      float f4 = y + height - 0.5F;
      Point2D localPoint2D1 = project(f1, f2, (PrismCameraImpl)localObject3, localBaseTransform2, localPickRay, localVec3d, null);
      Point2D localPoint2D2 = project(f3, f2, (PrismCameraImpl)localObject3, localBaseTransform2, localPickRay, localVec3d, null);
      Point2D localPoint2D3 = project(f1, f4, (PrismCameraImpl)localObject3, localBaseTransform2, localPickRay, localVec3d, null);
      Point2D localPoint2D4 = project(f3, f4, (PrismCameraImpl)localObject3, localBaseTransform2, localPickRay, localVec3d, null);
      localRectangle1 = clipbounds(localPoint2D1, localPoint2D2, localPoint2D3, localPoint2D4);
    }
    Screen localScreen = paramGraphics.getAssociatedScreen();
    PrFilterContext localPrFilterContext = PrFilterContext.getInstance(localScreen);
    PrRenderInfo localPrRenderInfo;
    if (localObject2 != null) {
      localPrRenderInfo = null;
    } else if ((paramGraphics.isDepthBuffer()) && (paramGraphics.isDepthTest())) {
      localPrRenderInfo = null;
    } else {
      localPrRenderInfo = new PrRenderInfo(paramGraphics);
    }
    ImagePool.numEffects += 1L;
    boolean bool;
    do
    {
      ImageData localImageData = paramEffect1.filter(localPrFilterContext, (BaseTransform)localObject1, localRectangle1, localPrRenderInfo, paramEffect2);
      if (localImageData == null) {
        return;
      }
      if ((bool = localImageData.validate(localPrFilterContext)))
      {
        Rectangle localRectangle2 = localImageData.getUntransformedBounds();
        localObject3 = ((PrTexture)localImageData.getUntransformedImage()).getTextureObject();
        paramGraphics.setTransform((BaseTransform)localObject2);
        paramGraphics.transform(localImageData.getTransform());
        paramGraphics.drawTexture((Texture)localObject3, x, y, width, height);
      }
      localImageData.unref();
    } while (!bool);
    paramGraphics.setTransform(localBaseTransform1);
  }
  
  static Point2D project(float paramFloat1, float paramFloat2, PrismCameraImpl paramPrismCameraImpl, BaseTransform paramBaseTransform, PickRay paramPickRay, Vec3d paramVec3d, Point2D paramPoint2D)
  {
    paramPickRay = paramPrismCameraImpl.computePickRay(paramFloat1, paramFloat2, paramPickRay);
    return paramPickRay.projectToZeroPlane(paramBaseTransform, paramPrismCameraImpl instanceof PrismPerspectiveCameraImpl, paramVec3d, paramPoint2D);
  }
  
  static Rectangle clipbounds(Point2D paramPoint2D1, Point2D paramPoint2D2, Point2D paramPoint2D3, Point2D paramPoint2D4)
  {
    if ((paramPoint2D1 != null) && (paramPoint2D2 != null) && (paramPoint2D3 != null) && (paramPoint2D4 != null))
    {
      if (x < x)
      {
        d1 = x;
        d3 = x;
      }
      else
      {
        d1 = x;
        d3 = x;
      }
      if (y < y)
      {
        d2 = y;
        d4 = y;
      }
      else
      {
        d2 = y;
        d4 = y;
      }
      if (x < x)
      {
        d1 = Math.min(d1, x);
        d3 = Math.max(d3, x);
      }
      else
      {
        d1 = Math.min(d1, x);
        d3 = Math.max(d3, x);
      }
      if (y < y)
      {
        d2 = Math.min(d2, y);
        d4 = Math.max(d4, y);
      }
      else
      {
        d2 = Math.min(d2, y);
        d4 = Math.max(d4, y);
      }
      double d1 = Math.floor(d1 - 0.5D);
      double d2 = Math.floor(d2 - 0.5D);
      double d3 = Math.ceil(d3 + 0.5D) - d1;
      double d4 = Math.ceil(d4 + 0.5D) - d2;
      int i = (int)d1;
      int j = (int)d2;
      int k = (int)d3;
      int m = (int)d4;
      if ((i == d1) && (j == d2) && (k == d3) && (m == d4)) {
        return new Rectangle(i, j, k, m);
      }
    }
    return null;
  }
  
  public static Rectangle getGraphicsClipNoClone(Graphics paramGraphics)
  {
    Rectangle localRectangle = paramGraphics.getClipRectNoClone();
    if (localRectangle == null)
    {
      RenderTarget localRenderTarget = paramGraphics.getRenderTarget();
      localRectangle = new Rectangle(localRenderTarget.getContentWidth(), localRenderTarget.getContentHeight());
    }
    return localRectangle;
  }
  
  public static void renderImageData(Graphics paramGraphics, ImageData paramImageData, Rectangle paramRectangle)
  {
    int i = width;
    int j = height;
    PrDrawable localPrDrawable = (PrDrawable)paramImageData.getUntransformedImage();
    BaseTransform localBaseTransform = paramImageData.getTransform();
    Rectangle localRectangle = paramImageData.getUntransformedBounds();
    float f1 = 0.0F;
    float f2 = 0.0F;
    float f3 = f1 + i;
    float f4 = f2 + j;
    if (localBaseTransform.isTranslateOrIdentity())
    {
      float f5 = (float)localBaseTransform.getMxt();
      float f6 = (float)localBaseTransform.getMyt();
      float f7 = x - (x + f5);
      float f8 = y - (y + f6);
      float f9 = f7 + i;
      float f10 = f8 + j;
      paramGraphics.drawTexture(localPrDrawable.getTextureObject(), f1, f2, f3, f4, f7, f8, f9, f10);
    }
    else
    {
      float[] arrayOfFloat = new float[8];
      int k = EffectPeer.getTextureCoordinates(arrayOfFloat, x, y, localPrDrawable.getPhysicalWidth(), localPrDrawable.getPhysicalHeight(), paramRectangle, localBaseTransform);
      if (k < 8) {
        paramGraphics.drawTextureRaw(localPrDrawable.getTextureObject(), f1, f2, f3, f4, arrayOfFloat[0], arrayOfFloat[1], arrayOfFloat[2], arrayOfFloat[3]);
      } else {
        paramGraphics.drawMappedTextureRaw(localPrDrawable.getTextureObject(), f1, f2, f3, f4, arrayOfFloat[0], arrayOfFloat[1], arrayOfFloat[4], arrayOfFloat[5], arrayOfFloat[6], arrayOfFloat[7], arrayOfFloat[2], arrayOfFloat[3]);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.prism.PrEffectHelper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.prism;

import com.sun.glass.ui.Screen;
import com.sun.scenario.effect.FilterContext;
import java.util.Map;
import java.util.WeakHashMap;

public class PrFilterContext
  extends FilterContext
{
  private static Screen defaultScreen;
  private static final Map<Screen, PrFilterContext> ctxMap = new WeakHashMap();
  
  private PrFilterContext(Screen paramScreen)
  {
    super(paramScreen);
  }
  
  public static PrFilterContext getInstance(Screen paramScreen)
  {
    if (paramScreen == null) {
      throw new IllegalArgumentException("Screen must be non-null");
    }
    PrFilterContext localPrFilterContext = (PrFilterContext)ctxMap.get(paramScreen);
    if (localPrFilterContext == null)
    {
      localPrFilterContext = new PrFilterContext(paramScreen);
      ctxMap.put(paramScreen, localPrFilterContext);
    }
    return localPrFilterContext;
  }
  
  public static PrFilterContext getDefaultInstance()
  {
    if (defaultScreen == null) {
      defaultScreen = Screen.getMainScreen();
    }
    return getInstance(defaultScreen);
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.prism.PrFilterContext
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
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 paramFilterContext, Renderer paramRenderer, String paramString)
  {
    super(paramFilterContext, paramRenderer, paramString);
  }
  
  public ImageData filter(Effect paramEffect, BaseTransform paramBaseTransform, Rectangle paramRectangle, ImageData... paramVarArgs)
  {
    FilterContext localFilterContext = getFilterContext();
    Flood localFlood = (Flood)paramEffect;
    BaseBounds localBaseBounds1 = localFlood.getBounds();
    int i = (int)localBaseBounds1.getMinX();
    int j = (int)localBaseBounds1.getMinY();
    int k = (int)localBaseBounds1.getWidth();
    int m = (int)localBaseBounds1.getHeight();
    BaseBounds localBaseBounds2 = Effect.transformBounds(paramBaseTransform, localBaseBounds1);
    Rectangle localRectangle = new Rectangle(localBaseBounds2);
    localRectangle.intersectWith(paramRectangle);
    int n = width;
    int i1 = height;
    PrDrawable localPrDrawable = (PrDrawable)getRenderer().getCompatibleImage(n, i1);
    if (localPrDrawable != null)
    {
      Graphics localGraphics = localPrDrawable.createGraphics();
      localGraphics.translate(-x, -y);
      if ((paramBaseTransform != null) && (!paramBaseTransform.isIdentity())) {
        localGraphics.transform(paramBaseTransform);
      }
      localGraphics.setPaint((Paint)localFlood.getPaint());
      localGraphics.fillQuad(i, j, i + k, j + m);
    }
    return new ImageData(localFilterContext, localPrDrawable, localRectangle);
  }
}

/* Location:
 * Qualified Name:     com.sun.scenario.effect.impl.prism.PrFloodPeer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.scenario.effect.impl.prism;

import com.sun.prism.Image;
import com.sun.scenario.effect.Filterable;

public class PrImage
  implements Filterable
{
  private final Im
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd