virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                  LayerManager* aManager,
                                  const FrameLayerBuilder::ContainerParameters& aParameters)
 {
   if (aManager->IsCompositingCheap()) {
     // Since ImageLayers don't require additional memory of the
     // video frames we have to have anyway, we can't save much by
     // making layers inactive. Also, for many accelerated layer
     // managers calling imageContainer->GetCurrentAsSurface can be
     // very expensive. So just always be active when compositing is
     // cheap (i.e. hardware accelerated).
     return LAYER_ACTIVE;
   }
   HTMLMediaElement* elem =
     static_cast<HTMLMediaElement*>(mFrame->GetContent());
   return elem->IsPotentiallyPlaying() ? LAYER_ACTIVE_FORCE : LAYER_INACTIVE;
 }