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

--HG--
extra : rebase_source : dac51f66400d5810b9662cf6cf48ce60bf1aa4d1
This commit is contained in:
Matt Woodrow 2014-09-03 09:21:14 +12:00
parent 0a72e088cb
commit 6a86816b2b

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