diff options
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index e1e3dfb4d2..bf17d50b37 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -297,7 +297,9 @@ SurfaceFlinger::SurfaceFlinger(surfaceflinger::Factory& factory, mNumLayers(0), mVrFlingerRequestsDisplay(false), mMainThreadId(std::this_thread::get_id()), - mCompositionEngine{getFactory().createCompositionEngine()} {} + mCompositionEngine{getFactory().createCompositionEngine()} { + mSetInputWindowsListener = new SetInputWindowsListener(this); +} SurfaceFlinger::SurfaceFlinger(surfaceflinger::Factory& factory) : SurfaceFlinger(factory, SkipInitialization) { @@ -2948,7 +2950,10 @@ void SurfaceFlinger::updateInputWindowInfo() { inputHandles.add(layer->fillInputInfo()); } }); - mInputFlinger->setInputWindows(inputHandles); + + mInputFlinger->setInputWindows(inputHandles, + mInputWindowCommands.syncInputWindows ? mSetInputWindowsListener + : nullptr); } void SurfaceFlinger::commitInputWindowCommands() { @@ -4907,8 +4912,7 @@ status_t SurfaceFlinger::CheckTransactCodeCredentials(uint32_t code) { case GET_COLOR_MANAGEMENT: case GET_COMPOSITION_PREFERENCE: case GET_PROTECTED_CONTENT_SUPPORT: - case IS_WIDE_COLOR_DISPLAY: - case SET_INPUT_WINDOWS_FINISHED: { + case IS_WIDE_COLOR_DISPLAY: { return OK; } case CAPTURE_LAYERS: @@ -5667,6 +5671,12 @@ void SurfaceFlinger::traverseLayersInDisplay(const sp<const DisplayDevice>& disp } } +// ---------------------------------------------------------------------------- + +void SetInputWindowsListener::onSetInputWindowsFinished() { + mFlinger->setInputWindowsFinished(); +} + }; // namespace android |