Bug 1313518- Handle width alignment of 32 r=nical
☠☠ backed out by 15bfa2b75e1b ☠ ☠
authorSotaro Ikeda <sotaro.ikeda.g@gmail.com>
Sun, 30 Oct 2016 19:40:35 -0700
changeset 320259 9b5b04d1a15a
parent 320258 ccdaf2b0cc9e
child 320260 815e8f226bb9
push id20754
push usercbook@mozilla.com
push date2016-10-31 15:58 +0000
treeherderfx-team@b1b66b1780c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1313518
milestone52.0a1
Bug 1313518- Handle width alignment of 32 r=nical
gfx/layers/MacIOSurfaceHelpers.cpp
--- a/gfx/layers/MacIOSurfaceHelpers.cpp
+++ b/gfx/layers/MacIOSurfaceHelpers.cpp
@@ -84,17 +84,17 @@ CreateSourceSurfaceFromLockedMacIOSurfac
     data.mPicSize = data.mYSize;
 
     ConvertYCbCrToRGB(data, SurfaceFormat::B8G8R8X8, IntSize::Truncate(ioWidth, ioHeight), mappedSurface.mData, mappedSurface.mStride);
   } else if (ioFormat == SurfaceFormat::YUV422) {
     IntSize size = IntSize::Truncate(ioWidth, ioHeight);
     libyuv::ConvertToARGB((uint8_t*)aSurface->GetBaseAddress(), 0 /* not used */,
                           mappedSurface.mData, mappedSurface.mStride,
                           0, 0,
-                          size.width, size.height,
+                          ALIGNED_32(size.width), size.height,
                           size.width, size.height,
                           libyuv::kRotate0, libyuv::FOURCC_UYVY);
   } else {
     unsigned char* ioData = (unsigned char*)aSurface->GetBaseAddress();
 
     for (size_t i = 0; i < ioHeight; ++i) {
       memcpy(mappedSurface.mData + i * mappedSurface.mStride,
              ioData + i * bytesPerRow,