summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Transform.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-24 14:53:05 -0700
committerMathias Agopian <mathias@google.com>2010-10-24 14:53:05 -0700
commit546c21dbfa26939081e903ea346fcb581bddbeb4 (patch)
tree603d085fe40919315d3688602e7cafaee2fff276 /services/surfaceflinger/Transform.h
parent60607a9012c9b7d39bef8fcf0284772f1b061efc (diff)
downloadframeworks_base-546c21dbfa26939081e903ea346fcb581bddbeb4.zip
frameworks_base-546c21dbfa26939081e903ea346fcb581bddbeb4.tar.gz
frameworks_base-546c21dbfa26939081e903ea346fcb581bddbeb4.tar.bz2
fix [3118445] Transform * Transform does not work as expected
The problem wasn't in the multiply operator, but rather in the code that built the transform from the HAL bitmask. We now use the multiply operator to build the Transform from the bitmask, which guarantees, it'll always be correct. Also added a simple test for Transform. Change-Id: I09bf3b0e51d92f59d83ea91c4cc94fc2aa0bf227
Diffstat (limited to 'services/surfaceflinger/Transform.h')
-rw-r--r--services/surfaceflinger/Transform.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/surfaceflinger/Transform.h b/services/surfaceflinger/Transform.h
index 20fa11a..8fa5b86 100644
--- a/services/surfaceflinger/Transform.h
+++ b/services/surfaceflinger/Transform.h
@@ -23,6 +23,8 @@
#include <ui/Point.h>
#include <ui/Rect.h>
+#include <hardware/hardware.h>
+
namespace android {
class Region;
@@ -37,12 +39,11 @@ public:
explicit Transform(uint32_t orientation);
~Transform();
- // FIXME: must match OVERLAY_TRANSFORM_*, pull from hardware.h
enum orientation_flags {
ROT_0 = 0x00000000,
- FLIP_H = 0x00000001,
- FLIP_V = 0x00000002,
- ROT_90 = 0x00000004,
+ FLIP_H = HAL_TRANSFORM_FLIP_H,
+ FLIP_V = HAL_TRANSFORM_FLIP_V,
+ ROT_90 = HAL_TRANSFORM_ROT_90,
ROT_180 = FLIP_H|FLIP_V,
ROT_270 = ROT_180|ROT_90,
ROT_INVALID = 0x80