зеркало из https://github.com/mozilla/gecko-dev.git
Bug 722269: Make DrawTargetD2D::DrawSurface deal with any SourceSurface convertible to a DataSourceSurface. r=joedrew
This commit is contained in:
Родитель
6cef98eb96
Коммит
5161d422fa
|
@ -291,9 +291,15 @@ DrawTargetD2D::DrawSurface(SourceSurface *aSurface,
|
|||
AddDependencyOnSource(srcSurf);
|
||||
}
|
||||
break;
|
||||
case SURFACE_DATA:
|
||||
default:
|
||||
{
|
||||
DataSourceSurface *srcSurf = static_cast<DataSourceSurface*>(aSurface);
|
||||
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
|
||||
|
||||
if (!srcSurf) {
|
||||
gfxDebug() << "Not able to deal with non-data source surface.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (aSource.width > rt->GetMaximumBitmapSize() ||
|
||||
aSource.height > rt->GetMaximumBitmapSize()) {
|
||||
gfxDebug() << "Bitmap source larger than texture size specified. DrawBitmap will silently fail.";
|
||||
|
@ -315,8 +321,6 @@ DrawTargetD2D::DrawSurface(SourceSurface *aSurface,
|
|||
srcRect.y -= (uint32_t)aSource.y;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
rt->DrawBitmap(bitmap, D2DRect(aDest), aOptions.mAlpha, D2DFilter(aSurfOptions.mFilter), D2DRect(srcRect));
|
||||
|
|
Загрузка…
Ссылка в новой задаче