Ejemplo n.º 1
0
ImageLayerComposite::~ImageLayerComposite()
{
  MOZ_COUNT_DTOR(ImageLayerComposite);
  MOZ_ASSERT(mDestroyed);

  CleanupResources();
}
Ejemplo n.º 2
0
void
PaintedLayerComposite::Destroy()
{
  if (!mDestroyed) {
    CleanupResources();
    mDestroyed = true;
  }
}
Ejemplo n.º 3
0
void
ThebesLayerComposite::Destroy()
{
  if (!mDestroyed) {
    CleanupResources();
    mDestroyed = true;
  }
}
Ejemplo n.º 4
0
void
LayerComposite::Destroy()
{
  if (!mDestroyed) {
    mDestroyed = true;
    CleanupResources();
  }
}
Ejemplo n.º 5
0
void
CompositorOGL::Destroy()
{
  if (gl()) {
    gl()->MakeCurrent();
    if (mTextures.Length() > 0) {
      gl()->fDeleteTextures(mTextures.Length(), &mTextures[0]);
    }
    mVBOs.Flush(gl());
    if (mFPS) {
      if (mFPS->mTexture > 0)
        gl()->fDeleteTextures(1, &mFPS->mTexture);
      mFPS->mVBOs.Flush(gl());
    }
  }
  mTextures.SetLength(0);
  if (!mDestroyed) {
    mDestroyed = true;
    CleanupResources();
  }
}
Ejemplo n.º 6
0
PaintedLayerComposite::~PaintedLayerComposite()
{
  MOZ_COUNT_DTOR(PaintedLayerComposite);
  CleanupResources();
}
Ejemplo n.º 7
0
ThebesLayerComposite::~ThebesLayerComposite()
{
  MOZ_COUNT_DTOR(ThebesLayerComposite);
  CleanupResources();
}
Ejemplo n.º 8
0
ImageLayerMLGPU::~ImageLayerMLGPU()
{
  CleanupResources();
}
Ejemplo n.º 9
0
void
ImageLayerMLGPU::ClearCachedResources()
{
  CleanupResources();
}
Ejemplo n.º 10
0
void
ImageLayerMLGPU::Disconnect()
{
  CleanupResources();
}
Ejemplo n.º 11
0
int 
Process(etProcMode ProcMode,	// processing mode
		int MinLength,			// only process ref/rel elements of at least this length
		int MaxLength,			// only process ref/rel elements which are no longer than this length
		int RefExtend,			// extend ref left+right flanks by this many bases
		int RelExtend,			// extend rel left+right flanks by this many bases
		int JoinDistance,		// if > 0 then join elements which only differ by at most this distance beween end of element i and start of element i+1
		int MinMergeLength,		// only output merged elements of at least this length
		int MaxMergeLength,		// only output merged elements which are no longer than this length
		char *pszRefFile,		// CSV file containing ref elements
		char *pszRelFile,		// CSV file containing rel elements
		char *pszOutLociFile,	// write element loci into this CSV file
		char *pszRefSpecies,	// replacement ref species in output loci file
		char *pszRelSpecies,	// replacement rel species in output loci file
		char *pszElType)		// replacement element type in output loci file
{
int Rslt;
CChromMaps *pChromMaps;

tsProcParams ProcParams;

memset(&ProcParams,0,sizeof(ProcParams));

ProcParams.MinLength = MinLength;
ProcParams.MaxLength = MaxLength;
ProcParams.MinMergeLength = MinMergeLength;
ProcParams.MaxMergeLength = MaxMergeLength;
ProcParams.pszOutLociFile = pszOutLociFile;
ProcParams.pszRefFile=pszRefFile;
ProcParams.pszRelFile=pszRelFile;
ProcParams.pszRefSpecies=pszRefSpecies;
ProcParams.pszRelSpecies=pszRelSpecies;
ProcParams.pszElType=pszElType;
ProcParams.RefExtend = RefExtend;
ProcParams.RelExtend = RelExtend;
ProcParams.JoinDistance = JoinDistance;

pChromMaps = new CChromMaps;
if((Rslt = pChromMaps->Load(false,MinLength,MaxLength,RefExtend,pszRefFile,RelExtend,pszRelFile))<0)
	{
	gDiagnostics.DiagOut(eDLFatal,gszProcName,"Unable to load files");
	return(Rslt);
	}

#ifdef _WIN32
if((ProcParams.hRsltsLociFile = open(pszOutLociFile, _O_RDWR | _O_BINARY | _O_SEQUENTIAL | _O_CREAT | _O_TRUNC, _S_IREAD | _S_IWRITE ))==-1)
#else
if((ProcParams.hRsltsLociFile = open(pszOutLociFile, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE ))==-1)
#endif
	{
	gDiagnostics.DiagOut(eDLFatal,gszProcName,"Unable to create loci file: %s - %s",pszOutLociFile,strerror(errno));
	CleanupResources(&ProcParams);
	return(eBSFerrCreateFile);
	}
gDiagnostics.DiagOut(eDLInfo,gszProcName,"Loci CSV file created/truncated: '%s'",pszOutLociFile);


switch(ProcMode) {
	case ePMElIntersect:					
		Rslt = pChromMaps->Process(eElIntersect,OutputLoci,&ProcParams);
		break;
	case ePMElRefExclusive:				
		Rslt = pChromMaps->Process(eElRefExclusive,OutputLoci,&ProcParams);
		break;

	case ePMElRelExclusive:				
		Rslt = pChromMaps->Process(eElRelExclusive,OutputLoci,&ProcParams);
		break;

	case ePMElRefRelUnion:				
		Rslt = pChromMaps->Process(eElRefRelUnion,OutputLoci,&ProcParams);
		break;

	case ePMElRefNotRefRel:				
		Rslt = pChromMaps->Process(eElRefNotRefRel,OutputLoci,&ProcParams);
		break;
	}

if(Rslt >= 0 && ProcParams.hRsltsLociFile != -1 && ProcParams.JoinDistance > 0 && ProcParams.szCurChrom[0] != '\0')
	Rslt = WriteLoci(ProcParams.szCurChrom,ProcParams.CurStartLoci,ProcParams.CurEndLoci,&ProcParams);

if(Rslt >= 0 && ProcParams.hRsltsLociFile != -1 && ProcParams.RsltLineBuffOfs)
	{
	CUtility::SafeWrite(ProcParams.hRsltsLociFile,ProcParams.szRsltLineBuff,ProcParams.RsltLineBuffOfs);
	ProcParams.RsltLineBuffOfs = 0;
	}

if(Rslt >= 0 && ProcParams.hRsltsLociFile != -1)
	{
	gDiagnostics.DiagOut(eDLInfo,gszProcName,"Els Output: %d PreMerge: %d PostMerge: %d FilterUnderLen: %d FilterOverLen: %d",
		ProcParams.NumMergedAccepted,ProcParams.NumUnmergedEls,ProcParams.NumMergedEls,ProcParams.NumMergedFiltUnderLen,ProcParams.NumMergedFiltOverLen);
	}
CleanupResources(&ProcParams);
return(Rslt > 0 ? 0 : Rslt);
}