mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1225250 - fix stride on SourceSurfaceSkia when initialized from GPU texture. r=jmuizelaar
This commit is contained in:
parent
d7cec4a561
commit
feea035806
@ -114,8 +114,10 @@ SourceSurfaceSkia::InitFromTexture(DrawTargetSkia* aOwner,
|
|||||||
GrTexture *skiaTexture = aOwner->mGrContext->wrapBackendTexture(skiaTexGlue);
|
GrTexture *skiaTexture = aOwner->mGrContext->wrapBackendTexture(skiaTexGlue);
|
||||||
SkImageInfo imgInfo = SkImageInfo::Make(aSize.width, aSize.height, GfxFormatToSkiaColorType(aFormat), kOpaque_SkAlphaType);
|
SkImageInfo imgInfo = SkImageInfo::Make(aSize.width, aSize.height, GfxFormatToSkiaColorType(aFormat), kOpaque_SkAlphaType);
|
||||||
SkGrPixelRef *texRef = new SkGrPixelRef(imgInfo, skiaTexture, false);
|
SkGrPixelRef *texRef = new SkGrPixelRef(imgInfo, skiaTexture, false);
|
||||||
mBitmap.setInfo(imgInfo, aSize.width*aSize.height*4);
|
mBitmap.setInfo(imgInfo);
|
||||||
mBitmap.setPixelRef(texRef);
|
mBitmap.setPixelRef(texRef);
|
||||||
|
mFormat = aFormat;
|
||||||
|
mStride = mBitmap.rowBytes();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mDrawTarget = aOwner;
|
mDrawTarget = aOwner;
|
||||||
|
Loading…
Reference in New Issue
Block a user