diff options
Diffstat (limited to 'include/ui/GraphicBuffer.h')
-rw-r--r-- | include/ui/GraphicBuffer.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h index a3e85a9..0be26a7 100644 --- a/include/ui/GraphicBuffer.h +++ b/include/ui/GraphicBuffer.h @@ -26,6 +26,8 @@ #include <utils/Flattenable.h> #include <pixelflinger/pixelflinger.h> +#include <hardware/hardware.h> + struct android_native_buffer_t; namespace android { @@ -63,6 +65,13 @@ public: USAGE_HW_MASK = GRALLOC_USAGE_HW_MASK }; + enum { + TRANSFORM_IDENTITY = 0, + TRANSFORM_ROT_90 = HAL_TRANSFORM_ROT_90, + TRANSFORM_ROT_180 = HAL_TRANSFORM_ROT_180, + TRANSFORM_ROT_270 = HAL_TRANSFORM_ROT_270 + }; + GraphicBuffer(); // creates w * h buffer @@ -79,6 +88,7 @@ public: uint32_t getHeight() const { return height; } uint32_t getStride() const { return stride; } uint32_t getUsage() const { return usage; } + uint32_t getTransform() const { return transform; } PixelFormat getPixelFormat() const { return format; } Rect getBounds() const { return Rect(width, height); } @@ -88,12 +98,15 @@ public: status_t lock(uint32_t usage, const Rect& rect, void** vaddr); status_t lock(GGLSurface* surface, uint32_t usage); status_t unlock(); - + android_native_buffer_t* getNativeBuffer() const; void setIndex(int index); int getIndex() const; + // for debugging + static void dumpAllocationsToSystemLog(); + private: virtual ~GraphicBuffer(); |