mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-19 06:47:09 +00:00
!2632 统一渲染支持快速启动窗口(StartingWindow)
Merge pull request !2632 from 赵路/master
This commit is contained in:
commit
c54e9efeea
@ -35,9 +35,10 @@ public:
|
||||
|
||||
virtual int32_t GetFocusWindow(sptr<IRemoteObject>& abilityToken) = 0;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap, uint32_t bgColor) = 0;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor) = 0;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap) = 0;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap) = 0;
|
||||
|
||||
virtual void CancelStartingWindow(sptr<IRemoteObject> abilityToken) = 0;
|
||||
|
||||
|
@ -32,10 +32,10 @@ public:
|
||||
|
||||
virtual int32_t GetFocusWindow(sptr<IRemoteObject>& abilityToken) override;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap,
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap,
|
||||
uint32_t bgColor) override;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap) override;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap) override;
|
||||
|
||||
virtual void CancelStartingWindow(sptr<IRemoteObject> abilityToken) override;
|
||||
|
||||
|
@ -73,8 +73,8 @@ int32_t WindowManagerServiceHandlerProxy::GetFocusWindow(sptr<IRemoteObject>& ab
|
||||
return ret;
|
||||
}
|
||||
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap,
|
||||
uint32_t bgColor)
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor)
|
||||
{
|
||||
HILOG_DEBUG("%{public}s is called.", __func__);
|
||||
MessageParcel data;
|
||||
@ -86,7 +86,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
HILOG_ERROR("Write info failed.");
|
||||
return;
|
||||
}
|
||||
if (!data.WriteParcelable(pixelMap.GetRefPtr())) {
|
||||
if (!data.WriteParcelable(pixelMap.get())) {
|
||||
HILOG_ERROR("Write pixelMap failed.");
|
||||
return;
|
||||
}
|
||||
@ -102,7 +102,8 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap)
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap)
|
||||
{
|
||||
HILOG_DEBUG("%{public}s is called.", __func__);
|
||||
MessageParcel data;
|
||||
@ -114,7 +115,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
HILOG_ERROR("Write info failed.");
|
||||
return;
|
||||
}
|
||||
if (!data.WriteParcelable(pixelMap.GetRefPtr())) {
|
||||
if (!data.WriteParcelable(pixelMap.get())) {
|
||||
HILOG_ERROR("Write pixelMap failed.");
|
||||
return;
|
||||
}
|
||||
|
@ -111,8 +111,9 @@ int WindowManagerServiceHandlerStub::StartingWindowCold(MessageParcel &data, Mes
|
||||
HILOG_ERROR("To read info failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
sptr<Media::PixelMap> pixelMap(data.ReadParcelable<Media::PixelMap>());
|
||||
if (!pixelMap) {
|
||||
std::shared_ptr<Media::PixelMap> pixelMap
|
||||
= std::shared_ptr<Media::PixelMap>(data.ReadParcelable<Media::PixelMap>());
|
||||
if (pixelMap == nullptr) {
|
||||
HILOG_ERROR("To read pixelMap failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
@ -129,8 +130,9 @@ int WindowManagerServiceHandlerStub::StartingWindowHot(MessageParcel &data, Mess
|
||||
HILOG_ERROR("To read info failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
sptr<Media::PixelMap> pixelMap(data.ReadParcelable<Media::PixelMap>());
|
||||
if (!pixelMap) {
|
||||
std::shared_ptr<Media::PixelMap> pixelMap
|
||||
= std::shared_ptr<Media::PixelMap>(data.ReadParcelable<Media::PixelMap>());
|
||||
if (pixelMap == nullptr) {
|
||||
HILOG_ERROR("To read pixelMap failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ private:
|
||||
const std::shared_ptr<Want> &want, const AbilityRequest &abilityRequest);
|
||||
std::shared_ptr<Global::Resource::ResourceManager> CreateResourceManager(
|
||||
const AppExecFwk::AbilityInfo &abilityInfo) const;
|
||||
sptr<Media::PixelMap> GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Media::PixelMap> GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Global::Resource::ResourceManager> resourceMgr) const;
|
||||
void StartingWindowHot(const std::shared_ptr<StartOptions> &startOptions, const std::shared_ptr<Want> &want,
|
||||
const AbilityRequest &abilityRequest);
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int missionId, bool isLowResolution = false) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int missionId, bool isLowResolution = false) const;
|
||||
|
||||
std::unique_ptr<Media::PixelMap> GetPixelMap(int missionId, bool isLowResolution) const;
|
||||
#endif
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int32_t missionId) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int32_t missionId) const;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int missionId) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int missionId) const;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -613,7 +613,7 @@ std::shared_ptr<Global::Resource::ResourceManager> AbilityRecord::CreateResource
|
||||
return resourceMgr;
|
||||
}
|
||||
|
||||
sptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Global::Resource::ResourceManager> resourceMgr) const
|
||||
{
|
||||
std::string iconPath;
|
||||
@ -639,7 +639,7 @@ sptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
return nullptr;
|
||||
}
|
||||
HILOG_DEBUG("%{public}s OUT.", __func__);
|
||||
return sptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
return std::shared_ptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
}
|
||||
|
||||
sptr<AbilityTransitionInfo> AbilityRecord::CreateAbilityTransitionInfo(
|
||||
|
@ -342,14 +342,14 @@ void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId, bool isLowReso
|
||||
}
|
||||
}
|
||||
|
||||
sptr<Media::PixelMap> MissionDataStorage::GetSnapshot(int missionId, bool isLowResolution) const
|
||||
std::shared_ptr<Media::PixelMap> MissionDataStorage::GetSnapshot(int missionId, bool isLowResolution) const
|
||||
{
|
||||
auto pixelMapPtr = GetPixelMap(missionId, isLowResolution);
|
||||
if (!pixelMapPtr) {
|
||||
HILOG_ERROR("%{public}s: GetPixelMap failed.", __func__);
|
||||
return nullptr;
|
||||
}
|
||||
return sptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
return std::shared_ptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
}
|
||||
|
||||
std::unique_ptr<Media::PixelMap> MissionDataStorage::GetPixelMap(int missionId, bool isLowResolution) const
|
||||
|
@ -464,7 +464,7 @@ bool MissionInfoMgr::UpdateMissionSnapshot(int32_t missionId, const sptr<IRemote
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
sptr<Media::PixelMap> MissionInfoMgr::GetSnapshot(int32_t missionId) const
|
||||
std::shared_ptr<Media::PixelMap> MissionInfoMgr::GetSnapshot(int32_t missionId) const
|
||||
{
|
||||
HILOG_INFO("mission_list_info GetSnapshot, missionId:%{public}d", missionId);
|
||||
auto it = find_if(missionInfoList_.begin(), missionInfoList_.end(), [missionId](const InnerMissionInfo &info) {
|
||||
|
@ -140,7 +140,7 @@ bool TaskDataPersistenceMgr::SaveMissionSnapshot(int missionId, const MissionSna
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
sptr<Media::PixelMap> TaskDataPersistenceMgr::GetSnapshot(int missionId) const
|
||||
std::shared_ptr<Media::PixelMap> TaskDataPersistenceMgr::GetSnapshot(int missionId) const
|
||||
{
|
||||
if (!currentMissionDataStorage_) {
|
||||
HILOG_ERROR("snapshot: currentMissionDataStorage_ is nullptr");
|
||||
|
Loading…
Reference in New Issue
Block a user