Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINT
- fixed uninitialized variable
- set hint to indentity when transform is too complex
- make sure FrameBufferNativeWindow doesn't fail on needed perform commands
Bug: 4487161
Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
diff --git a/services/surfaceflinger/SurfaceTextureLayer.cpp b/services/surfaceflinger/SurfaceTextureLayer.cpp
index 11f61cc..40659d4 100644
--- a/services/surfaceflinger/SurfaceTextureLayer.cpp
+++ b/services/surfaceflinger/SurfaceTextureLayer.cpp
@@ -60,6 +60,10 @@
sp<Layer> layer(mLayer.promote());
if (layer != NULL) {
+ uint32_t orientation = layer->getOrientation();
+ if (orientation & Transform::ROT_INVALID) {
+ orientation = 0;
+ }
*outTransform = layer->getOrientation();
}