Bug 716415 - Update Azure for Skia API changes. r=gwright

This commit is contained in:
Matt Woodrow 2012-01-19 17:48:35 +13:00
parent de81e9e7f1
commit 6c5402ee40

View File

@ -74,14 +74,14 @@ SourceSurfaceSkia::InitFromData(unsigned char* aData,
int32_t aStride,
SurfaceFormat aFormat)
{
mBitmap.setConfig(GfxFormatToSkiaConfig(aFormat), aSize.width, aSize.height, aStride);
if (!mBitmap.allocPixels()) {
SkBitmap temp;
temp.setConfig(GfxFormatToSkiaConfig(aFormat), aSize.width, aSize.height, aStride);
temp.setPixels(aData);
if (!temp.copyTo(&mBitmap, GfxFormatToSkiaConfig(aFormat))) {
return false;
}
if (!mBitmap.copyPixelsFrom(aData, mBitmap.getSafeSize(), aStride)) {
return false;
}
mSize = aSize;
mFormat = aFormat;
mStride = aStride;