bool BaseLayerAndroid::drawGL(IntRect& viewRect, SkRect& visibleRect,
                              float scale)
{
    XLOG("drawing BLA %p", this);

    // TODO: consider moving drawBackground outside of prepare (into tree manager)
    m_state->drawBackground(m_color);
    drawBasePictureInGL();

    bool needsRedraw = false;

#if USE(ACCELERATED_COMPOSITING)

    LayerAndroid* compositedRoot = static_cast<LayerAndroid*>(getChild(0));
    if (compositedRoot) {
        updateLayerPositions(visibleRect);
        // For now, we render layers only if the rendering mode
        // is kAllTextures or kClippedTextures
        if (compositedRoot->drawGL()) {
            if (TilesManager::instance()->layerTexturesRemain()) {
                // only try redrawing for layers if layer textures remain,
                // otherwise we'll repaint without getting anything done
                needsRedraw = true;
            }
        }
    }

#endif // USE(ACCELERATED_COMPOSITING)
#ifdef DEBUG
    ClassTracker::instance()->show();
#endif
    return needsRedraw;
}