summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/icecat-CVE-2015-7201-pt2.patch
blob: 3764371a11d5be9e3770735fb78bcccfb823d9e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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