protected void render(GLCanvas canvas) {
   boolean transitionActive = false;
   if (mTransition != null && mTransition.calculate(AnimationTime.get())) {
     invalidate();
     transitionActive = mTransition.isActive();
   }
   renderBackground(canvas);
   canvas.save();
   if (transitionActive) {
     mTransition.applyContentTransform(this, canvas);
   }
   for (int i = 0, n = getComponentCount(); i < n; ++i) {
     renderChild(canvas, getComponent(i));
   }
   canvas.restore();
   if (transitionActive) {
     mTransition.applyOverlay(this, canvas);
   }
 }
  protected void renderChild(GLCanvas canvas, GLView component) {
    if (component.getVisibility() != GLView.VISIBLE && component.mAnimation == null) return;

    int xoffset = component.mBounds.left - mScrollX;
    int yoffset = component.mBounds.top - mScrollY;

    canvas.translate(xoffset, yoffset);

    CanvasAnimation anim = component.mAnimation;
    if (anim != null) {
      canvas.save(anim.getCanvasSaveFlags());
      if (anim.calculate(AnimationTime.get())) {
        invalidate();
      } else {
        component.mAnimation = null;
      }
      anim.apply(canvas);
    }
    component.render(canvas);
    if (anim != null) canvas.restore();
    canvas.translate(-xoffset, -yoffset);
  }