Loading cmds/dumpstate/DumpstateUtil.h +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <cstdint> #include <string> #include <vector> /* * Converts seconds to milliseconds. Loading libs/gui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ filegroup { "android/gui/DropInputMode.aidl", "android/gui/StalledTransactionInfo.aidl", "android/**/TouchOcclusionMode.aidl", "android/gui/TrustedOverlay.aidl", ], } Loading libs/gui/LayerState.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ layer_state_t::layer_state_t() frameRateSelectionStrategy(ANATIVEWINDOW_FRAME_RATE_SELECTION_STRATEGY_PROPAGATE), fixedTransformHint(ui::Transform::ROT_INVALID), autoRefresh(false), isTrustedOverlay(false), trustedOverlay(gui::TrustedOverlay::UNSET), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), dropInputMode(gui::DropInputMode::NONE) { Loading Loading @@ -179,7 +179,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, stretchEffect); SAFE_PARCEL(output.write, bufferCrop); SAFE_PARCEL(output.write, destinationFrame); SAFE_PARCEL(output.writeBool, isTrustedOverlay); SAFE_PARCEL(output.writeInt32, static_cast<uint32_t>(trustedOverlay)); SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dropInputMode)); Loading Loading @@ -308,7 +308,9 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, stretchEffect); SAFE_PARCEL(input.read, bufferCrop); SAFE_PARCEL(input.read, destinationFrame); SAFE_PARCEL(input.readBool, &isTrustedOverlay); uint32_t trustedOverlayInt; SAFE_PARCEL(input.readUint32, &trustedOverlayInt); trustedOverlay = static_cast<gui::TrustedOverlay>(trustedOverlayInt); uint32_t mode; SAFE_PARCEL(input.readUint32, &mode); Loading Loading @@ -674,7 +676,7 @@ void layer_state_t::merge(const layer_state_t& other) { } if (other.what & eTrustedOverlayChanged) { what |= eTrustedOverlayChanged; isTrustedOverlay = other.isTrustedOverlay; trustedOverlay = other.trustedOverlay; } if (other.what & eStretchChanged) { what |= eStretchChanged; Loading Loading @@ -779,7 +781,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eFrameRateSelectionStrategyChanged, other, frameRateSelectionStrategy); CHECK_DIFF(diff, eFixedTransformHintChanged, other, fixedTransformHint); CHECK_DIFF(diff, eAutoRefreshChanged, other, autoRefresh); CHECK_DIFF(diff, eTrustedOverlayChanged, other, isTrustedOverlay); CHECK_DIFF(diff, eTrustedOverlayChanged, other, trustedOverlay); CHECK_DIFF(diff, eStretchChanged, other, stretchEffect); CHECK_DIFF(diff, eBufferCropChanged, other, bufferCrop); CHECK_DIFF(diff, eDestinationFrameChanged, other, destinationFrame); Loading libs/gui/SurfaceComposerClient.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -2179,6 +2179,13 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setAutoR SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrustedOverlay( const sp<SurfaceControl>& sc, bool isTrustedOverlay) { return setTrustedOverlay(sc, isTrustedOverlay ? gui::TrustedOverlay::ENABLED : gui::TrustedOverlay::UNSET); } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrustedOverlay( const sp<SurfaceControl>& sc, gui::TrustedOverlay trustedOverlay) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; Loading @@ -2186,7 +2193,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrust } s->what |= layer_state_t::eTrustedOverlayChanged; s->isTrustedOverlay = isTrustedOverlay; s->trustedOverlay = trustedOverlay; return *this; } Loading Loading @@ -3118,6 +3125,10 @@ status_t SurfaceComposerClient::removeWindowInfosListener( ->removeWindowInfosListener(windowInfosListener, ComposerServiceAIDL::getComposerService()); } void SurfaceComposerClient::notifyShutdown() { ComposerServiceAIDL::getComposerService()->notifyShutdown(); } // ---------------------------------------------------------------------------- status_t ScreenshotClient::captureDisplay(const DisplayCaptureArgs& captureArgs, Loading libs/gui/aidl/android/gui/ISurfaceComposer.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -573,4 +573,11 @@ interface ISurfaceComposer { @nullable StalledTransactionInfo getStalledTransactionInfo(int pid); SchedulingPolicy getSchedulingPolicy(); /** * Notifies the SurfaceFlinger that the ShutdownThread is running. When it is called, * transaction traces will be captured and writted into a file. * This method should not block the ShutdownThread therefore it's handled asynchronously. */ oneway void notifyShutdown(); } Loading
cmds/dumpstate/DumpstateUtil.h +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <cstdint> #include <string> #include <vector> /* * Converts seconds to milliseconds. Loading
libs/gui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ filegroup { "android/gui/DropInputMode.aidl", "android/gui/StalledTransactionInfo.aidl", "android/**/TouchOcclusionMode.aidl", "android/gui/TrustedOverlay.aidl", ], } Loading
libs/gui/LayerState.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ layer_state_t::layer_state_t() frameRateSelectionStrategy(ANATIVEWINDOW_FRAME_RATE_SELECTION_STRATEGY_PROPAGATE), fixedTransformHint(ui::Transform::ROT_INVALID), autoRefresh(false), isTrustedOverlay(false), trustedOverlay(gui::TrustedOverlay::UNSET), bufferCrop(Rect::INVALID_RECT), destinationFrame(Rect::INVALID_RECT), dropInputMode(gui::DropInputMode::NONE) { Loading Loading @@ -179,7 +179,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.write, stretchEffect); SAFE_PARCEL(output.write, bufferCrop); SAFE_PARCEL(output.write, destinationFrame); SAFE_PARCEL(output.writeBool, isTrustedOverlay); SAFE_PARCEL(output.writeInt32, static_cast<uint32_t>(trustedOverlay)); SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dropInputMode)); Loading Loading @@ -308,7 +308,9 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.read, stretchEffect); SAFE_PARCEL(input.read, bufferCrop); SAFE_PARCEL(input.read, destinationFrame); SAFE_PARCEL(input.readBool, &isTrustedOverlay); uint32_t trustedOverlayInt; SAFE_PARCEL(input.readUint32, &trustedOverlayInt); trustedOverlay = static_cast<gui::TrustedOverlay>(trustedOverlayInt); uint32_t mode; SAFE_PARCEL(input.readUint32, &mode); Loading Loading @@ -674,7 +676,7 @@ void layer_state_t::merge(const layer_state_t& other) { } if (other.what & eTrustedOverlayChanged) { what |= eTrustedOverlayChanged; isTrustedOverlay = other.isTrustedOverlay; trustedOverlay = other.trustedOverlay; } if (other.what & eStretchChanged) { what |= eStretchChanged; Loading Loading @@ -779,7 +781,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eFrameRateSelectionStrategyChanged, other, frameRateSelectionStrategy); CHECK_DIFF(diff, eFixedTransformHintChanged, other, fixedTransformHint); CHECK_DIFF(diff, eAutoRefreshChanged, other, autoRefresh); CHECK_DIFF(diff, eTrustedOverlayChanged, other, isTrustedOverlay); CHECK_DIFF(diff, eTrustedOverlayChanged, other, trustedOverlay); CHECK_DIFF(diff, eStretchChanged, other, stretchEffect); CHECK_DIFF(diff, eBufferCropChanged, other, bufferCrop); CHECK_DIFF(diff, eDestinationFrameChanged, other, destinationFrame); Loading
libs/gui/SurfaceComposerClient.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -2179,6 +2179,13 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setAutoR SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrustedOverlay( const sp<SurfaceControl>& sc, bool isTrustedOverlay) { return setTrustedOverlay(sc, isTrustedOverlay ? gui::TrustedOverlay::ENABLED : gui::TrustedOverlay::UNSET); } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrustedOverlay( const sp<SurfaceControl>& sc, gui::TrustedOverlay trustedOverlay) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; Loading @@ -2186,7 +2193,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrust } s->what |= layer_state_t::eTrustedOverlayChanged; s->isTrustedOverlay = isTrustedOverlay; s->trustedOverlay = trustedOverlay; return *this; } Loading Loading @@ -3118,6 +3125,10 @@ status_t SurfaceComposerClient::removeWindowInfosListener( ->removeWindowInfosListener(windowInfosListener, ComposerServiceAIDL::getComposerService()); } void SurfaceComposerClient::notifyShutdown() { ComposerServiceAIDL::getComposerService()->notifyShutdown(); } // ---------------------------------------------------------------------------- status_t ScreenshotClient::captureDisplay(const DisplayCaptureArgs& captureArgs, Loading
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -573,4 +573,11 @@ interface ISurfaceComposer { @nullable StalledTransactionInfo getStalledTransactionInfo(int pid); SchedulingPolicy getSchedulingPolicy(); /** * Notifies the SurfaceFlinger that the ShutdownThread is running. When it is called, * transaction traces will be captured and writted into a file. * This method should not block the ShutdownThread therefore it's handled asynchronously. */ oneway void notifyShutdown(); }