OSDN Git Service

sf: Defer DispSync initialization
authorSaurabh Shah <saurshah@codeaurora.org>
Thu, 13 Jul 2017 17:45:07 +0000 (10:45 -0700)
committerDan Stoza <stoza@google.com>
Thu, 27 Jul 2017 21:36:52 +0000 (21:36 +0000)
commitce398e4b0347757558dad84ccab052513b92df5e
tree76c4821cf3ddcb007a24f2d2a8e14d92ad659dfe
parent58ba988476d848598e62376f726f69c567d033ad
sf: Defer DispSync initialization

Some DispSync members are initialized based on uninitialized static
members of sf, that are in turn initialized in sf constructor. Fix
the sequence by deferring DispSync initialization.

Current sequence:
sf constructor|-> DispSync constructor -> Access static sf members
              |-> Initialize sf static members

New sequence:
sf constructor|-> DispSync constructor
              |-> Initialize sf static members
              |-> DispSync init -> Access static sf members

Bug: 63671437
Test: "present fences are ignored" not present in SF dumpsys
Change-Id: I618d2bbbbd4e39fc382e67f85dd8d637dd82cf38
(cherry picked from commit f41745301d5ecfa680dcef3a1948a8a321f80509)
services/surfaceflinger/DispSync.cpp
services/surfaceflinger/DispSync.h
services/surfaceflinger/SurfaceFlinger.cpp