已开启
lock2 #32
wangdi创建于  9月2日
wangdi成员
9月2日 创建

lock2

likedislike
wangdi成员
9月13日 评论:
    static std::map<std::string, std::string> GetScreenSettingValue(const std::string& key);
    static bool ParseScreenSettingValue(std::map<std::string, std::string>& valueMap,
        const std::string& value);
    static std::map<std::string, float> GetDpiModeWithScreenId(const std::string& key =
        SETTING_EXTEND_INDEP_DPI_KEY);
    static std::map<std::string, SupportedScreenModes> GetResolutionModeWithScreenId(const std::string& key =
        SETTING_SCREEN_RESOLUTION_MODE_KEY);
    static std::map<std::string, Orientation> GetOrientationModeWithScreenId(const std::string& key =
        SETTING_SCREEN_ORIENTATION_KEY);
    template<typename T>
    static typename std::map<std::string, T>::const_iterator FindScreenSettingValue(
        const std::map<std::string, T>& valueMap, const std::string& serialNumber, ScreenId screenId)
    {
        auto it = valueMap.find(serialNumber + " " + std::to_string(screenId));
        if (it == valueMap.end()) {
            it = valueMap.find(serialNumber);
        }
        return it;
    }
likedislike
wangdi成员
9月13日 评论:

likedislike
wangdi成员
9月13日 评论:
constexpr uint32_t VALID_SCREEN_SETTING_SIZE = 2;
constexpr uint32_t INDEX_SCREEN_VALUE = 1;
likedislike
wangdi成员
9月13日 评论:

0屏大小问题

likedislike
wangdi成员
9月15日 评论:

给出该笔PR代码设计理念分析,比如运用了什么设计原则、模式,带来了什么好处。
说明模块设计及其模块划分对应的代码结构说明(模块名,对应模块的代码文件),说明接口设计对应的代码结构说明(那些文件是对外接口),类图或者关键数据结构设计及其对应的代码结构说明(例如那些文件是父类,那些是子类

likedislike
wangdi成员
9月20日 评论:
void ScreenProperty::SetSerialNumber(const std::string& serialNumber)
{
    std::strncpy(serialNumber_, serialNumber.c_str(), sizeof(serialNumber_) - 1);
    serialNumber_[sizeof(serialNumber_) - 1] = '\0';
}

std::string ScreenProperty::GetSerialNumber() const
{
    return std::string(serialNumber_);
}
likedislike
wangdi成员
9月24日 评论:
        if (!ScreenSessionManager::GetInstance().HasInternalScreen()) {
            std::shared_ptr<RSDisplayNode> mirrorDisplayNode = innerScreen->GetDisplayNode();
            ScreenSessionManager::GetInstance().ClearMirrorScreenModifiers(mirrorDisplayNode);
        }
likedislike
wangdi成员
12 天前 评论:

likedislike
wangdi成员
12 天前 评论:
    if (!HasInternalScreen()) {
        std::vector<sptr<ScreenSession>> externalSessions = GetExternalSessions();
        for (auto& session : externalSessions) {
            if (session->GetScreenCombination() == ScreenCombination::SCREEN_MAIN) {
                innerSession = session;
            } else {
                externalSession = session;
            }
        }
    } else {
        GetInternalAndExternalSession(innerSession, externalSession);
    }
    if (!innerSession || !externalSession) {
        TLOGNFE(WmsLogTag::DMS, "screen session is null.");
        return;
    }
    if (!HasInternalScreen) {
        // The screenSession with the smallest rsId is used as the anchor to avoid inconsistency
        // between the primary and secondary relationships of the foundation and clients of different users.
        if (innerSession->GetRSScreenId() > externalSession->GetRSScreenId()) {
            std::swap(innerSession, externalSession);
        }
    }
likedislike