summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2011-08-23 18:03:18 -0700
committer Mathias Agopian <mathias@google.com> 2011-08-23 21:10:35 -0700
commit2143fe05e3a1aeae641ca126e76db82d17e8b8e6 (patch)
treefae61baf7497e29e2a57ab2ed6713ce124a7aa23 /services/surfaceflinger/Layer.cpp
parent7f76a3cf667b95caccb3e6d3f5cf160180717340 (diff)
Add a debug option to turn the "transformation hint" off
transformation hint is disabled with: adb shell service call SurfaceFlinger 1009 i32 1 Change-Id: I9aafe6f280f88ce41569ed69a06dc522b10e3a88
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 19c7ddd4fbab..44df9849d065 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -541,9 +541,9 @@ void Layer::dump(String8& result, char* buffer, size_t SIZE) const
snprintf(buffer, SIZE,
" "
"format=%2d, activeBuffer=[%4ux%4u:%4u,%3X],"
- " freezeLock=%p, queued-frames=%d\n",
+ " freezeLock=%p, transform-hint=0x%02x, queued-frames=%d\n",
mFormat, w0, h0, s0,f0,
- getFreezeLock().get(), mQueuedFrames);
+ getFreezeLock().get(), getTransformHint(), mQueuedFrames);
result.append(buffer);
@@ -562,6 +562,17 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const
return usage;
}
+uint32_t Layer::getTransformHint() const {
+ uint32_t orientation = 0;
+ if (!mFlinger->mDebugDisableTransformHint) {
+ orientation = getOrientation();
+ if (orientation & Transform::ROT_INVALID) {
+ orientation = 0;
+ }
+ }
+ return orientation;
+}
+
// ---------------------------------------------------------------------------