Пример #1
0
//-----------------------------------------------------------------------------
void D2DDrawContext::endDraw ()
{
	if (renderTarget)
	{
		if (currentClip.isEmpty () == false)
		{
			getRenderTarget ()->PopAxisAlignedClip ();
			currentClip = CRect ();
		}
		renderTarget->Flush ();
		HRESULT result = renderTarget->EndDraw ();
		if (result == D2DERR_RECREATE_TARGET)
		{
			releaseRenderTarget ();
			createRenderTarget ();
		}
		else
		{
			vstgui_assert (result == S_OK);
		}
		if (bitmap)
		{
			D2DBitmap* d2dBitmap = dynamic_cast<D2DBitmap*> (bitmap->getPlatformBitmap ());
			D2DBitmapCache::instance ()->removeBitmap (d2dBitmap);
		}
	}
}
Пример #2
0
//-----------------------------------------------------------------------------
void D2DDrawContext::endDraw ()
{
    if (renderTarget)
    {
        renderTarget->Flush ();
        HRESULT result = renderTarget->EndDraw ();
        if (result == D2DERR_RECREATE_TARGET)
        {
            releaseRenderTarget ();
            createRenderTarget ();
        }
        if (bitmap)
        {
            D2DBitmap* d2dBitmap = dynamic_cast<D2DBitmap*> (bitmap->getPlatformBitmap ());
            D2DBitmapCache::instance ()->removeBitmap (d2dBitmap);
        }
    }
}
Пример #3
0
//-----------------------------------------------------------------------------
D2DDrawContext::~D2DDrawContext ()
{
    releaseRenderTarget ();
}