@Override
  void setLive(boolean inBackgroundGroup, int refCount) {
    super.doSetLive(inBackgroundGroup, refCount);
    if (texture != null) {
      texture.setLive(inBackgroundGroup, refCount);
    }
    if (depthComponent != null) {
      depthComponent.setLive(inBackgroundGroup, refCount);
    }
    isEditable =
        source.getCapability(Raster.ALLOW_OFFSET_WRITE)
            || source.getCapability(Raster.ALLOW_POSITION_WRITE)
            || ((type & Raster.RASTER_COLOR) != 0 && source.getCapability(Raster.ALLOW_IMAGE_WRITE))
            || ((type & Raster.RASTER_DEPTH) != 0
                && source.getCapability(Raster.ALLOW_DEPTH_COMPONENT_WRITE))
            || source.getCapability(Raster.ALLOW_SIZE_WRITE);

    super.markAsLive();
  }
 @Override
 void clearLive(int refCount) {
   super.clearLive(refCount);
   if (texture != null) texture.clearLive(refCount);
   if (depthComponent != null) depthComponent.clearLive(refCount);
 }