fix camera API 2.0 orientation

we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h
index 3327b37..0e35f13 100644
--- a/include/gui/IGraphicBufferConsumer.h
+++ b/include/gui/IGraphicBufferConsumer.h
@@ -91,6 +91,10 @@
 
         // Indicates whether this buffer has been seen by a consumer yet
         bool mAcquireCalled;
+
+        // Indicates this buffer must be transformed by the inverse transform of the screen
+        // it is displayed onto. This is applied after mTransform.
+        bool mTransformToDisplayInverse;
     };
 
 
diff --git a/include/ui/TMatHelpers.h b/include/ui/TMatHelpers.h
index cead10a..a6aadca 100644
--- a/include/ui/TMatHelpers.h
+++ b/include/ui/TMatHelpers.h
@@ -245,7 +245,7 @@
 class TMatDebug {
 public:
     String8 asString() const {
-        return matrix::asString(*this);
+        return matrix::asString( static_cast< const BASE<T>& >(*this) );
     }
 };