title: Invalid texture format! Returning error on load gif
body: <p>I developed an activity where load a gif.  In my Galaxy S III mini the gif load normaly, but in moto x... =(</p>
  
  <p>The error occurs in line:   movie.draw(canvas, 0, 0);</p>
  
  <p>My class Gif extends from View</p>
  
  <p>The code is:</p>
  
  <pre><code>protected void onDraw(Canvas canvas) {
  
      float escala = getEscala(canvas);
      setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int)(movie.height()*escala)));
      canvas.scale(escala,escala);
      canvas.drawColor(Color.TRANSPARENT);
  
      super.onDraw(canvas);
      long horaAtual = android.os.SystemClock.uptimeMillis();
      if (movieStart == 0) {
          movieStart = horaAtual;
      }
      if (movie != null) {
          int sequencia = (int) ((horaAtual - movieStart) % movie.duration());
          movie.setTime(sequencia);
          movie.draw(canvas, 0, 0);
          this.invalidate();
      }
  }
  
  
  
  private void initializeView() {
              if (inputStreamGif == null) {
                  inputStreamGif = getContext().getResources().openRawResource(+R.drawable.carregando);
              }
              movie = Movie.decodeStream(inputStreamGif);
              movieStart = 0;
              this.invalidate();
          }
  </code></pre>
  
  <p>Layout element:</p>
  
  <pre><code>&lt;view.elements.Gif
                      android:id="@+id/ivExercicio"
                      android:minHeight="900dp"
                      android:tag="carregando"
                      android:contentDescription="@string/contentDescription"
                      android:layout_gravity="center"
                      android:gravity="center"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"/&gt;
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>E/Adreno-ES20﹕ &lt;check_framebuffer_attachment:854&gt;: Invalid texture format! Returning error!
  
  E/Adreno-ES20﹕ &lt;check_framebuffer_object_status:1237&gt;: Framebuffer color attachment incomplete. Returning GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT!
  
  E/Adreno-ES20﹕ &lt;check_framebuffer_attachment:854&gt;: Invalid texture format! Returning error!
  
  E/Adreno-ES20﹕ &lt;check_framebuffer_object_status:1237&gt;: Framebuffer color attachment incomplete. Returning GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT!
  </code></pre>