OSDN Git Service

SurfaceFlinger: setGeometryAppliesWithResize crop latching fixes.
authorRobert Carr <racarr@google.com>
Thu, 18 May 2017 21:02:49 +0000 (14:02 -0700)
committerRobert Carr <racarr@google.com>
Thu, 18 May 2017 22:21:46 +0000 (15:21 -0700)
commit7bf247e2db180da661b18084d50e0b389686fc0c
tree2a37f827807592f430d50be7f8b916b8fcc14e0b
parent3851225fddb6f1755a8034aa7a9f9ae7397b56a9
SurfaceFlinger: setGeometryAppliesWithResize crop latching fixes.

The same sort of thing we had with setPosition...not sure why I didn't
realize we would need the fixes here too! In particular we need to ensure
the following scenarios work:

1. Additional calls to set(Final)Crop while in the setGeometryAppliesWithResize
   state are eventually applied.
2. Additional calls to set(Final)Crop while in the setGeometryAppliesWithResize
   state are not immediately applied.
3. In LayerRejector.cpp we have to be sure we are not just latching a buffer
   at the old size, which we still allow. This is the correct time to latch
   the transparentRegion as it is content dependent, but doesn't represent
   a size changing.

The difference between this and the original CL which was reverted has to do with
point 3. The original CL tried to solve point 3 by moving the latching logic from
the LayerRejecter in to Layer::doTransaction. However, in general doTransaction
will not be called in between Latching the buffer and drawing the frame, so this
introduced errors. The new test "FinalCropLatchingBufferOldSize" encapsulates this.

Bug: 37621737
Bug: 37531386
Test: Included in Transaction_test.cpp
Change-Id: I14bd09d01ac6b85895caa1b707d6fa7dac962074
services/surfaceflinger/Layer.cpp
services/surfaceflinger/Layer.h
services/surfaceflinger/LayerRejecter.cpp
services/surfaceflinger/LayerRejecter.h
services/surfaceflinger/tests/Transaction_test.cpp