summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorSteven Thomas <steventhomas@google.com>2017-04-26 14:34:01 -0700
committerSteven Thomas <steventhomas@google.com>2017-04-26 15:15:56 -0700
commit0af4b9f88a48a6ecc705b4a8cec3d3ba24c53ead (patch)
tree8a0c0c796bd685f39dab51bdaaecbdaf685326d4 /opengl/tests/gl_basic/gl_basic.cpp
parent0e9dcf6657a9101b02e1e1182f6fe3d652679a9a (diff)
Call validateDisplay() when skipping frames
Layer management was getting screwed up in vr flinger in the following scenario: 1. In frame X, post a new buffer to layer L. 2. Decide to skip frame X (e.g. because we're behind our target schedule). 3. In frame X+1, delete layer L. When we skip the frame in step 2, we weren't calling validateDisplay() or presentDisplay() on the hardware composer, so the composer's internal command queue wasn't being flushed. When we called validateDisplay() for frame X+1 the update buffer call from frame X would be run, referencing the deleted layer L, causing a crash. Now we always call validateDisplay() when we change the layer state, even if we decide to skip the frame. I also added code to explicitly clear the Composer object's internal command buffer when we transfer control from surface flinger to vr flinger and back. There were certain cases where there could be commands left in the command buffer after the display handoff. Bug: 37159844 Test: I used an app switcher script that quickly switches vr apps, which would consistently trigger the setLayerBuffer crash. I confirmed with this CL applied I can run the app switcher until surface flinger runs out of file descriptors (that's a separate bug), and I never see the setLayerBuffer crash. I also confirmed from the log output there are no additional hardware composer errors. Change-Id: I85832b87f393754dc6b034eb38f2937d7b58ed74
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions