mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1076695 - Don't convert alpha surfaces into RGBA surfaces for FilterNodeTransformSoftware. r=Bas
This commit is contained in:
parent
8306207e4e
commit
8a27e8adbc
@ -1156,7 +1156,7 @@ FilterNodeTransformSoftware::Render(const IntRect& aRect)
|
||||
IntRect srcRect = SourceRectForOutputRect(aRect);
|
||||
|
||||
RefPtr<DataSourceSurface> input =
|
||||
GetInputDataSourceSurface(IN_TRANSFORM_IN, srcRect, NEED_COLOR_CHANNELS);
|
||||
GetInputDataSourceSurface(IN_TRANSFORM_IN, srcRect);
|
||||
|
||||
if (!input) {
|
||||
return nullptr;
|
||||
@ -1168,8 +1168,18 @@ FilterNodeTransformSoftware::Render(const IntRect& aRect)
|
||||
return input.forget();
|
||||
}
|
||||
|
||||
RefPtr<DataSourceSurface> surf =
|
||||
Factory::CreateDataSourceSurface(aRect.Size(), input->GetFormat());
|
||||
|
||||
DataSourceSurface::MappedSurface mapping;
|
||||
surf->Map(DataSourceSurface::MapType::WRITE, &mapping);
|
||||
|
||||
RefPtr<DrawTarget> dt =
|
||||
Factory::CreateDrawTarget(BackendType::CAIRO, aRect.Size(), input->GetFormat());
|
||||
Factory::CreateDrawTargetForData(BackendType::CAIRO,
|
||||
mapping.mData,
|
||||
surf->GetSize(),
|
||||
mapping.mStride,
|
||||
surf->GetFormat());
|
||||
if (!dt) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -1178,9 +1188,9 @@ FilterNodeTransformSoftware::Render(const IntRect& aRect)
|
||||
dt->SetTransform(transform);
|
||||
dt->DrawSurface(input, r, r, DrawSurfaceOptions(mFilter));
|
||||
|
||||
RefPtr<SourceSurface> result = dt->Snapshot();
|
||||
RefPtr<DataSourceSurface> resultData = result->GetDataSurface();
|
||||
return resultData.forget();
|
||||
dt->Flush();
|
||||
surf->Unmap();
|
||||
return surf.forget();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user