guix-devel/gnu/packages/patches/icecat-CVE-2015-7201-pt2.patch

30 lines
1.1 KiB
Diff

From f02e3252391f5fa79916e4c8f30b3d8340d06cc7 Mon Sep 17 00:00:00 2001
From: "Carsten \"Tomcat\" Book" <cbook@mozilla.com>
Date: Tue, 8 Dec 2015 12:38:15 +0100
Subject: [PATCH] Bug 1225250 - fix stride on SourceSurfaceSkia when
initialized from GPU texture. r=jmuizelaar, a=lizzard
---
gfx/2d/SourceSurfaceSkia.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gfx/2d/SourceSurfaceSkia.cpp b/gfx/2d/SourceSurfaceSkia.cpp
index 4b95bc2..d7e0714 100644
--- a/gfx/2d/SourceSurfaceSkia.cpp
+++ b/gfx/2d/SourceSurfaceSkia.cpp
@@ -110,8 +110,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();
mDrawTarget = aOwner;
return true;
--
2.6.3