Bug 1225250 - fix stride on SourceSurfaceSkia when initialized from GPU texture. r=jmuizelaar

This commit is contained in:
Lee Salzman 2015-11-17 11:18:36 -05:00
parent 891c703c0f
commit 5c42ac6a36

View File

@ -114,8 +114,10 @@ SourceSurfaceSkia::InitFromTexture(DrawTargetSkia* aOwner,
GrTexture *skiaTexture = aOwner->mGrContext->wrapBackendTexture(skiaTexGlue);
SkImageInfo imgInfo = SkImageInfo::Make(aSize.width, aSize.height, GfxFormatToSkiaColorType(aFormat), kOpaque_SkAlphaType);
SkGrPixelRef *texRef = new SkGrPixelRef(imgInfo, skiaTexture, false);
mBitmap.setInfo(imgInfo, aSize.width*aSize.height*4);
mBitmap.setInfo(imgInfo);
mBitmap.setPixelRef(texRef);
mFormat = aFormat;
mStride = mBitmap.rowBytes();
#endif
mDrawTarget = aOwner;