Bug 715718 - Fix uninitialized variable in SkDraw.cpp. r=gwright
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 19 Jan 2012 17:48:35 +1300
changeset 86094 8763e1f49736cb2785123a9beda5d5cd5cf3ebdb
parent 86093 0190782907ea9d3973b8c29d69c9c45dc9d80349
child 86095 fced79b75704a979de94b5f327c8fca8ac32362e
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgwright
bugs715718
milestone12.0a1
Bug 715718 - Fix uninitialized variable in SkDraw.cpp. r=gwright
gfx/skia/src/core/SkDraw.cpp
gfx/skia/uninitialized-margin.patch
gfx/skia/update.sh
--- a/gfx/skia/src/core/SkDraw.cpp
+++ b/gfx/skia/src/core/SkDraw.cpp
@@ -2531,17 +2531,17 @@ static bool compute_bounds(const SkPath&
 
     //  init our bounds from the path
     {
         SkRect pathBounds = devPath.getBounds();
         pathBounds.inset(-SK_ScalarHalf, -SK_ScalarHalf);
         pathBounds.roundOut(bounds);
     }
 
-    SkIPoint margin;
+    SkIPoint margin = SkIPoint::Make(0, 0);
     if (filter) {
         SkASSERT(filterMatrix);
 
         SkMask srcM, dstM;
 
         srcM.fBounds = *bounds;
         srcM.fFormat = SkMask::kA8_Format;
         srcM.fImage = NULL;
new file mode 100644
--- /dev/null
+++ b/gfx/skia/uninitialized-margin.patch
@@ -0,0 +1,22 @@
+diff --git a/gfx/skia/src/core/SkDraw.cpp b/gfx/skia/src/core/SkDraw.cpp
+--- a/gfx/skia/src/core/SkDraw.cpp
++++ b/gfx/skia/src/core/SkDraw.cpp
+@@ -2529,17 +2529,17 @@ static bool compute_bounds(const SkPath&
+ 
+     //  init our bounds from the path
+     {
+         SkRect pathBounds = devPath.getBounds();
+         pathBounds.inset(-SK_ScalarHalf, -SK_ScalarHalf);
+         pathBounds.roundOut(bounds);
+     }
+ 
+-    SkIPoint margin;
++    SkIPoint margin = SkIPoint::Make(0, 0);
+     if (filter) {
+         SkASSERT(filterMatrix);
+ 
+         SkMask srcM, dstM;
+ 
+         srcM.fBounds = *bounds;
+         srcM.fFormat = SkMask::kA8_Format;
+         srcM.fImage = NULL;
--- a/gfx/skia/update.sh
+++ b/gfx/skia/update.sh
@@ -101,9 +101,11 @@ patch -p3 < getpostextpath.patch
 # Bug 688365 - Enable Skia 'New AA' mode.
 patch -p3 < new-aa.patch
 # Bug 688366 - Fix Skia marking radial gradients with the same radius as invalid.
 patch -p3 < radial-gradients.patch
 # Fix restrict keyword problem for VS2005
 patch -p3 < skia_restrict_problem.patch
 # Changes to SkUserConfig.h - no bug
 patch -p3 < user-config.patch
+# Bug 715718 - Unitialized variable 'margin' in compute_bounds : SkDraw.cpp
+patch -p3 < uninitialized-margin.patch