Bug 1172964 - Fix iteration bug in CopyBGRXSurfaceDataToPackedBGRArray. r=jrmuizel
authorJonathan Watt <jwatt@jwatt.org>
Mon, 01 Jun 2015 17:20:52 +0100
changeset 281381 e59b299a669db1ab50087931e5acd453d7d1f541
parent 281380 09bc59954db83980b50c88fef9c72b2613c5cca3
child 281382 a151662e0030b95cec02ee8850564a8f31ce255a
push id897
push userjlund@mozilla.com
push dateMon, 14 Sep 2015 18:56:12 +0000
treeherdermozilla-release@9411e2d2b214 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1172964
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1172964 - Fix iteration bug in CopyBGRXSurfaceDataToPackedBGRArray. r=jrmuizel
gfx/2d/DataSurfaceHelpers.cpp
--- a/gfx/2d/DataSurfaceHelpers.cpp
+++ b/gfx/2d/DataSurfaceHelpers.cpp
@@ -92,17 +92,17 @@ CopyBGRXSurfaceDataToPackedBGRArray(uint
                                     IntSize aSrcSize, int32_t aSrcStride)
 {
   int packedStride = aSrcSize.width * 3;
 
   uint8_t* srcPx = aSrc;
   uint8_t* dstPx = aDst;
 
   for (int row = 0; row < aSrcSize.height; ++row) {
-    for (int col = 0; col < aSrcSize.height; ++col) {
+    for (int col = 0; col < aSrcSize.width; ++col) {
       dstPx[0] = srcPx[0];
       dstPx[1] = srcPx[1];
       dstPx[2] = srcPx[2];
       // srcPx[3] (unused or alpha component) dropped on floor
       srcPx += 4;
       dstPx += 3;
     }
     srcPx = aSrc += aSrcStride;