OSDN Git Service

Define Rotation property fields.
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Mon, 26 Jun 2017 23:11:49 +0000 (19:11 -0400)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Mon, 26 Jun 2017 23:11:49 +0000 (19:11 -0400)
We may be on platforms which dont have support for these
fields in libdrm. Define them in HWC if they are not
already defined.

Jira: None.
Test: Build passes on Linux with latest libdrm.

Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
common/core/overlaylayer.cpp

index d727192..3e13eed 100644 (file)
 
 namespace hwcomposer {
 
+/* rotation property bits */
+#ifndef DRM_ROTATE_0
+#define DRM_ROTATE_0 0
+#endif
+
+#ifndef DRM_ROTATE_90
+#define DRM_ROTATE_90 1
+#endif
+
+#ifndef DRM_ROTATE_180
+#define DRM_ROTATE_180 2
+#endif
+
+#ifndef DRM_ROTATE_270
+#define DRM_ROTATE_270 3
+#endif
+
+#ifndef DRM_ROTATE_X
+#define DRM_REFLECT_X 4
+#endif
+
+#ifndef DRM_ROTATE_Y
+#define DRM_REFLECT_Y 5
+#endif
+
 OverlayLayer::ImportedBuffer::~ImportedBuffer() {
   if (acquire_fence_ > 0) {
     close(acquire_fence_);