Replace non-const references by pointers

Use pointers for outputs to be consistent with the rest of
libui/libsurfaceflinger.

Remove assignFromHidlVec now that hidl_vec can be casted to std::vector.

Test: builds and boots
Change-Id: I656367028302e7b877a766eaf6aa2431fe07643b
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index d258586..f30ec84 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -115,14 +115,14 @@
         info.consumerUsageMask = usage;
 
         Gralloc2::BufferDescriptor descriptor;
-        auto error = mAllocator->createBufferDescriptor(info, descriptor);
+        auto error = mAllocator->createBufferDescriptor(info, &descriptor);
         if (error != Gralloc2::Error::NONE) {
             ALOGE("Failed to create desc (%u x %u) layerCount %u format %d usage %u: %d",
                     width, height, layerCount, format, usage, error);
             return;
         }
 
-        error = mAllocator->allocate(descriptor, mBuffer);
+        error = mAllocator->allocate(descriptor, &mBuffer);
         if (error == Gralloc2::Error::NOT_SHARED) {
             error = Gralloc2::Error::NONE;
         }
@@ -134,7 +134,7 @@
             return;
         }
 
-        error = mAllocator->exportHandle(descriptor, mBuffer, mHandle);
+        error = mAllocator->exportHandle(descriptor, mBuffer, &mHandle);
         if (error != Gralloc2::Error::NONE) {
             ALOGE("Failed to export handle");
             mAllocator->free(mBuffer);
@@ -172,7 +172,7 @@
 
         *handle = mHandle;
 
-        auto error = mapper.getGrallocMapper().getStride(mHandle, *stride);
+        auto error = mapper.getGrallocMapper().getStride(mHandle, stride);
         if (error != Gralloc2::Error::NONE) {
             ALOGW("Failed to get stride from buffer: %d", error);
             *stride = 0;