From 2143fe05e3a1aeae641ca126e76db82d17e8b8e6 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 23 Aug 2011 18:03:18 -0700 Subject: 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 --- services/surfaceflinger/Layer.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/Layer.cpp') 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; +} + // --------------------------------------------------------------------------- -- cgit v1.2.3-59-g8ed1b