summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-12-07 14:18:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-07 14:18:56 -0800
commita2977c383d363e1e88a5b36230b1fa4c312807d2 (patch)
tree0455c8ee3787c528bc476604843a563d5300c6ad /include
parent05813b0eb92cb1bc79607ee402f14ca1e4b43f6d (diff)
parent025005f562f695c3b1785745c2e5c184fc3a2330 (diff)
downloadframeworks_base-a2977c383d363e1e88a5b36230b1fa4c312807d2.zip
frameworks_base-a2977c383d363e1e88a5b36230b1fa4c312807d2.tar.gz
frameworks_base-a2977c383d363e1e88a5b36230b1fa4c312807d2.tar.bz2
Merge changes Ie03796ae,Ide3e980a into gingerbread
* changes: [3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE) [3171580] Add transform field to native buffers. (DO NOT MERGE)
Diffstat (limited to 'include')
-rw-r--r--include/ui/GraphicBuffer.h10
-rw-r--r--include/ui/android_native_buffer.h8
2 files changed, 16 insertions, 2 deletions
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 6edc3ca..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); }
diff --git a/include/ui/android_native_buffer.h b/include/ui/android_native_buffer.h
index 402843e..a472824 100644
--- a/include/ui/android_native_buffer.h
+++ b/include/ui/android_native_buffer.h
@@ -51,8 +51,12 @@ typedef struct android_native_buffer_t
int stride;
int format;
int usage;
-
- void* reserved[2];
+
+ /* transformation as defined in hardware.h */
+ uint8_t transform;
+
+ uint8_t reserved_bytes[3];
+ void* reserved[1];
buffer_handle_t handle;