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

--HG--
extra : rebase_source : 2046ee6e625b8869c7da5b401cb7fe1135f4966a
This commit is contained in:
Matt Woodrow 2014-09-02 12:35:32 +12:00
parent 9777e1de08
commit b7df98adc1

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