Merge "Move `stride` into `cb_handle_t` from `cb_handle_30_t`"
diff --git a/shared/gralloc_cb/include/gralloc_cb_bp.h b/shared/gralloc_cb/include/gralloc_cb_bp.h
index e78b8fa..3ac9356 100644
--- a/shared/gralloc_cb/include/gralloc_cb_bp.h
+++ b/shared/gralloc_cb/include/gralloc_cb_bp.h
@@ -41,7 +41,8 @@
                 int32_t p_glType,
                 uint32_t p_bufSize,
                 void* p_bufPtr,
-                uint64_t p_mmapedOffset)
+                uint64_t p_mmapedOffset,
+                uint32_t p_stride)
         : bufferFd(p_bufferFd),
           hostHandleRefCountFd(p_hostHandleRefCountFd),
           magic(p_magic),
@@ -55,6 +56,7 @@
           bufferSize(p_bufSize),
           mmapedOffsetLo(static_cast<uint32_t>(p_mmapedOffset)),
           mmapedOffsetHi(static_cast<uint32_t>(p_mmapedOffset >> 32)),
+          stride(p_stride),
           lockedLeft(0),
           lockedTop(0),
           lockedWidth(0),
@@ -121,6 +123,7 @@
     uint32_t bufferPtrHi;
     uint32_t mmapedOffsetLo;
     uint32_t mmapedOffsetHi;
+    uint32_t stride;
     int32_t  lockedLeft;    // region of buffer locked for s/w write
     int32_t  lockedTop;
     int32_t  lockedWidth;
diff --git a/system/gralloc/gralloc_old.cpp b/system/gralloc/gralloc_old.cpp
index d742ef7..eebcae8 100644
--- a/system/gralloc/gralloc_old.cpp
+++ b/system/gralloc/gralloc_old.cpp
@@ -99,7 +99,8 @@
                           p_glType,
                           p_ashmemSize,
                           NULL,
-                          ~uint64_t(0)),
+                          ~uint64_t(0),
+                          p_width),
               ashmemBasePid(0),
               mappedPid(0) {
         numInts = CB_HANDLE_NUM_INTS(numFds);
diff --git a/system/hals/cb_handle_30.h b/system/hals/cb_handle_30.h
index 7e5e73d..b7af012 100644
--- a/system/hals/cb_handle_30.h
+++ b/system/hals/cb_handle_30.h
@@ -50,10 +50,10 @@
                           p_glType,
                           p_bufSize,
                           p_bufPtr,
-                          p_mmapedOffset),
+                          p_mmapedOffset,
+                          p_stride),
               mmapedSize(p_mmapedSize),
               bytesPerPixel(p_bytesPerPixel),
-              stride(p_stride),
               locked(0),
               lockedUsage(0) {
         numInts = CB_HANDLE_NUM_INTS(numFds);
@@ -77,7 +77,6 @@
 
     uint32_t mmapedSize;            // real allocation side
     uint32_t bytesPerPixel;
-    uint32_t stride;
     uint32_t locked;
     uint32_t lockedUsage;
 };