package com.google.android.m4b.maps.bo;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import com.google.android.m4b.maps.al.d;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Maps;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.microedition.khronos.opengles.GL10;

public final class a
{
  private l a = null;
  private boolean b = true;
  private final Bitmap c = Bitmap.createBitmap(256, 1, Bitmap.Config.ARGB_8888);
  private final Map<Integer, Integer> d = Maps.newLinkedHashMap();

  @VisibleForTesting
  private void b()
  {
    try
    {
      this.b = false;
      Iterator localIterator = this.d.entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        this.c.setPixel(((Integer)localEntry.getValue()).intValue() % 256, ((Integer)localEntry.getValue()).intValue() / 256, ((Integer)localEntry.getKey()).intValue());
      }
    }
    finally
    {
    }
  }

  public static void c(e parame)
  {
    parame.a.glMatrixMode(5890);
    parame.a.glLoadIdentity();
    parame.a.glScalex(1, 1, 0);
    parame.a.glMatrixMode(5888);
  }

  public static void d(e parame)
  {
    parame.a.glMatrixMode(5890);
    parame.a.glLoadIdentity();
    parame.a.glMatrixMode(5888);
  }

  public final l a(e parame)
  {
    try
    {
      b(parame);
      l locall = this.a;
      return locall;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final void a()
  {
    try
    {
      if (this.a != null)
      {
        this.a.f();
        this.a = null;
      }
      return;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  @VisibleForTesting
  final void a(int paramInt, a parama)
  {
    try
    {
      Integer localInteger = (Integer)this.d.get(Integer.valueOf(paramInt));
      if (localInteger == null)
      {
        localInteger = Integer.valueOf(this.d.size());
        if (localInteger.intValue() >= 256)
          d.a("ColorPalette", "Color texture is full");
      }
      while (true)
      {
        return;
        this.d.put(Integer.valueOf(paramInt), localInteger);
        this.b = true;
        parama.a = ((32768 + 65536 * (localInteger.intValue() % 256)) / 256);
        parama.b = ((32768 + 65536 * (localInteger.intValue() / 256)) / 1);
      }
    }
    finally
    {
    }
  }

  public final void b(e parame)
  {
    try
    {
      if ((this.b) || (this.a == null))
      {
        b();
        if ((this.a != null) && (parame.a != this.a.a()))
          a();
        if (this.a == null)
        {
          this.a = new l(parame);
          this.a.c(false);
        }
        this.a.b(this.c);
      }
      return;
    }
    finally
    {
    }
  }

  @VisibleForTesting
  static final class a
  {
    public int a;
    public int b;
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.m4b.maps.bo.a
 * JD-Core Version:    0.6.2
 */