зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1301459 - In nsSVGMaskFrame::GetMaskForMaskedFrame, create surface by Factory::CreateDataSourceSurface. r=mstange
--- layout/svg/nsSVGMaskFrame.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
This commit is contained in:
Родитель
eed49d301a
Коммит
4addf0c4b3
|
@ -283,17 +283,11 @@ nsSVGMaskFrame::GetMaskForMaskedFrame(gfxContext* aContext,
|
|||
}
|
||||
|
||||
// Create alpha channel mask for output
|
||||
RefPtr<DrawTarget> destMaskDT =
|
||||
Factory::CreateDrawTarget(BackendType::CAIRO, maskSurfaceSize,
|
||||
SurfaceFormat::A8);
|
||||
if (!destMaskDT) {
|
||||
RefPtr<DataSourceSurface> destMaskSurface =
|
||||
Factory::CreateDataSourceSurface(maskSurfaceSize, SurfaceFormat::A8);
|
||||
if (!destMaskSurface) {
|
||||
return nullptr;
|
||||
}
|
||||
RefPtr<SourceSurface> destMaskSnapshot = destMaskDT->Snapshot();
|
||||
if (!destMaskSnapshot) {
|
||||
return nullptr;
|
||||
}
|
||||
RefPtr<DataSourceSurface> destMaskSurface = destMaskSnapshot->GetDataSurface();
|
||||
DataSourceSurface::MappedSurface destMap;
|
||||
if (!destMaskSurface->Map(DataSourceSurface::MapType::WRITE, &destMap)) {
|
||||
return nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче