diff options
author | Romain Guy <romainguy@google.com> | 2013-06-20 16:31:35 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-06-20 16:31:35 -0700 |
commit | 9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6 (patch) | |
tree | 00fa539e34214d163d694adbd316e39785b3e6d4 /libs/hwui | |
parent | 2458939b5f926176a485a3196f59688eed78e858 (diff) | |
download | frameworks_base-9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6.zip frameworks_base-9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6.tar.gz frameworks_base-9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6.tar.bz2 |
Add debugging logs for GPU pixel buffers
Change-Id: I7edb04dd30ee6fd823099e72788169cc185e70f2
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/PixelBuffer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/PixelBuffer.cpp b/libs/hwui/PixelBuffer.cpp index 29f8756..74b628a 100644 --- a/libs/hwui/PixelBuffer.cpp +++ b/libs/hwui/PixelBuffer.cpp @@ -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; } |