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

Commit 9e6f3ac1 authored by Romain Guy's avatar Romain Guy
Browse files

Add debugging logs for GPU pixel buffers

Change-Id: I7edb04dd30ee6fd823099e72788169cc185e70f2
parent 2458939b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <utils/Log.h>

#include "Caches.h"
#include "Debug.h"
#include "Extensions.h"
#include "PixelBuffer.h"
#include "Properties.h"
@@ -113,6 +114,14 @@ uint8_t* GpuPixelBuffer::map(AccessMode mode) {
    if (mAccessMode == kAccessMode_None) {
        mCaches.bindPixelBuffer(mBuffer);
        mMappedPointer = (uint8_t*) glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, getSize(), mode);
#if DEBUG_OPENGL
        if (!mMappedPointer) {
            GLenum status = GL_NO_ERROR;
            while ((status = glGetError()) != GL_NO_ERROR) {
                ALOGE("Could not map GPU pixel buffer: 0x%x", status);
            }
        }
#endif
        mAccessMode = mode;
    }