OSDN Git Service

SF: Fix camera orientation on virtual displays
authorPablo Ceballos <pceballos@google.com>
Sat, 16 Apr 2016 00:31:51 +0000 (17:31 -0700)
committerPablo Ceballos <pceballos@google.com>
Tue, 19 Apr 2016 02:03:00 +0000 (19:03 -0700)
commit021623b5a82e44e8dc1a7def1abfed351187593c
treeefa5c680893fca1ba96d65d994a3b78b919fd290
parent9ffa1a4da16edc23067070f5605917ddd57739e8
SF: Fix camera orientation on virtual displays

Camera uses NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY to make the camera
preview always look upright on the device display. This commit changes
the behavior of this flag slightly. Instead of applying the inverse
transform of the current display when compositing, apply the inverse
transform of the primary display to all displays. This assumes that
the camera orientation is tied to the primary display.

Bug 2628180

Change-Id: I0da22423490a93fe943fd59e6c122aa6aaf30b11
services/surfaceflinger/DisplayDevice.cpp
services/surfaceflinger/DisplayDevice.h
services/surfaceflinger/Layer.cpp