Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c46ed79 authored by Chaosmaster's avatar Chaosmaster Committed by Bernhard Thoben
Browse files

kitakami-common: Update graphicbuffer shim



P: GraphicBuffer::lock(uint32_t inUsage, void** vaddr);
Q: GraphicBuffer::lock(uint32_t inUsage, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride);
we would need pass outBytesPerPixel and outBytesPerStride since the camera wont be able to load and cause an nullptr reference

Signed-off-by: default avatarKai Jones <joneskai626@gmail.com>
Change-Id: I0b2acd4ee03ecb0aac0416637b87220437352b4d
parent 082fa12b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@
#include <ui/Rect.h>
#include <gui/SurfaceControl.h>

int32_t outBytesPerPixel = 0;
int32_t outBytesPerStride = 0;

namespace android {

// ---------------------------------------------------------------------------
@@ -29,7 +32,7 @@ extern "C" {
    void _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(native_handle const*, unsigned int, android::Rect const&, void**, int*, int*);

    void _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPv(buffer_handle_t handle, uint32_t usage, const android::Rect& bounds, void** vaddr) {
        _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(handle, usage, bounds, vaddr, nullptr, nullptr);
        _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(handle, usage, bounds, vaddr, &outBytesPerPixel, &outBytesPerStride);
    }
}