Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -949,9 +949,11 @@ void SurfaceFlinger::setDesiredActiveConfig(const sp<IBinder>& displayToken, int } // Don't check against the current mode yet. Worst case we set the desired // config twice. // config twice. However event generation config might have changed so we need to update it // accordingly std::lock_guard<std::mutex> lock(mActiveConfigLock); mDesiredActiveConfig = ActiveConfigInfo{mode, displayToken, event}; const ConfigEvent desiredConfig = mDesiredActiveConfig.event | event; mDesiredActiveConfig = ActiveConfigInfo{mode, displayToken, desiredConfig}; if (!mDesiredActiveConfigChanged) { // This is the first time we set the desired Loading services/surfaceflinger/SurfaceFlinger.h +7 −0 Original line number Diff line number Diff line Loading @@ -523,6 +523,13 @@ private: enum class ConfigEvent { None, Changed }; // logical or operator with the semantics of at least one of the events is Changed friend ConfigEvent operator|(const ConfigEvent& first, const ConfigEvent& second) { if (first == ConfigEvent::Changed) return ConfigEvent::Changed; if (second == ConfigEvent::Changed) return ConfigEvent::Changed; return ConfigEvent::None; } // called on the main thread in response to initializeDisplays() void onInitializeDisplays() REQUIRES(mStateLock); // Sets the desired active config bit. It obtains the lock, and sets mDesiredActiveConfig. Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -949,9 +949,11 @@ void SurfaceFlinger::setDesiredActiveConfig(const sp<IBinder>& displayToken, int } // Don't check against the current mode yet. Worst case we set the desired // config twice. // config twice. However event generation config might have changed so we need to update it // accordingly std::lock_guard<std::mutex> lock(mActiveConfigLock); mDesiredActiveConfig = ActiveConfigInfo{mode, displayToken, event}; const ConfigEvent desiredConfig = mDesiredActiveConfig.event | event; mDesiredActiveConfig = ActiveConfigInfo{mode, displayToken, desiredConfig}; if (!mDesiredActiveConfigChanged) { // This is the first time we set the desired Loading
services/surfaceflinger/SurfaceFlinger.h +7 −0 Original line number Diff line number Diff line Loading @@ -523,6 +523,13 @@ private: enum class ConfigEvent { None, Changed }; // logical or operator with the semantics of at least one of the events is Changed friend ConfigEvent operator|(const ConfigEvent& first, const ConfigEvent& second) { if (first == ConfigEvent::Changed) return ConfigEvent::Changed; if (second == ConfigEvent::Changed) return ConfigEvent::Changed; return ConfigEvent::None; } // called on the main thread in response to initializeDisplays() void onInitializeDisplays() REQUIRES(mStateLock); // Sets the desired active config bit. It obtains the lock, and sets mDesiredActiveConfig. Loading