Bug 1059033 - Part 5: Implement OptimizeSourceSurface for DrawTargetCG. r=Bas

This commit is contained in:
Matt Woodrow 2014-09-01 15:23:21 +12:00
parent d387136ff5
commit 320fb6087a

View File

@ -254,7 +254,12 @@ DrawTargetCG::OptimizeSourceSurface(SourceSurface *aSurface) const
aSurface->GetType() == SurfaceType::COREGRAPHICS_CGCONTEXT) {
return aSurface;
}
return aSurface->GetDataSurface();
RefPtr<DataSourceSurface> data = aSurface->GetDataSurface();
return CreateSourceSurfaceFromData(data->GetData(),
data->GetSize(),
data->Stride(),
data->GetFormat());
}
class UnboundnessFixer