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

Commit d4fed90d authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Add debugging logs for GPU pixel buffers"

parents 6ebe3de3 9e6f3ac1
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;
    }