Merge pull request !1193 from 张必荣/iwyu
This commit is contained in:
openharmony_ci
2022-07-16 13:40:23 +00:00
committed by Gitee
28 changed files with 128 additions and 93 deletions
+6 -4
View File
@@ -16,11 +16,14 @@
#ifndef OHOS_ROSEN_DISPLAY_MANAGER_AGENT_STUB_H
#define OHOS_ROSEN_DISPLAY_MANAGER_AGENT_STUB_H
#include <cstdint>
#include <iremote_stub.h>
#include <message_option.h>
#include <message_parcel.h>
#include "display_manager_agent_interface.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
class DisplayManagerAgentStub : public IRemoteStub<IDisplayManagerAgent> {
public:
DisplayManagerAgentStub() = default;
@@ -29,6 +32,5 @@ public:
virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
MessageOption& option) override;
};
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
#endif // OHOS_ROSEN_DISPLAY_MANAGER_AGENT_STUB_H
+7 -1
View File
@@ -12,10 +12,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "display.h"
#include <cstdint>
#include <new>
#include <refbase.h>
#include "class_var_definition.h"
#include "display_info.h"
#include "display_manager_adapter.h"
#include "singleton_container.h"
#include "window_manager_hilog.h"
namespace OHOS::Rosen {
+6
View File
@@ -15,8 +15,14 @@
#include "screen.h"
#include <cstdint>
#include <new>
#include <refbase.h>
#include "class_var_definition.h"
#include "display_manager_adapter.h"
#include "screen_info.h"
#include "singleton_container.h"
#include "window_manager_hilog.h"
namespace OHOS::Rosen {
+5 -1
View File
@@ -15,9 +15,13 @@
#include "screen_group.h"
#include <new>
#include "class_var_definition.h"
#include "display_manager_adapter.h"
#include "screen.h"
#include "screen_group_info.h"
#include "screen_info.h"
#include "singleton_container.h"
#include "window_manager_hilog.h"
namespace OHOS::Rosen {
+8 -6
View File
@@ -12,14 +12,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "zidl/display_manager_agent_stub.h"
#include "ipc_skeleton.h"
#include <vector>
#include "display_info.h"
#include "dm_common.h"
#include "marshalling_helper.h"
#include "screen_info.h"
#include "window_manager_hilog.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentStub"};
}
@@ -112,5 +115,4 @@ int32_t DisplayManagerAgentStub::OnRemoteRequest(uint32_t code, MessageParcel& d
}
return 0;
}
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
+3 -4
View File
@@ -14,9 +14,9 @@
*/
#include "screen_manager_utils.h"
#include "window_manager_hilog.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerUtils"};
}
@@ -37,5 +37,4 @@ bool ScreenManagerUtils::CreateSurface()
}
return true;
}
} // namespace ROSEN
} // namespace OHOS
} // namespace OHOS::Rosen
+6 -10
View File
@@ -16,20 +16,17 @@
#ifndef FRAMEWORKS_DM_TEST_UT_SCREEN_MANAGER_UTILS_H
#define FRAMEWORKS_DM_TEST_UT_SCREEN_MANAGER_UTILS_H
#include <securec.h>
#include <cstdint>
#include <refbase.h>
#include <string>
#include <surface.h>
#include "display.h"
#include "display_manager.h"
#include "dm_common.h"
#include "screen.h"
#include "screen_manager.h"
#include "window_manager_hilog.h"
#include "unique_fd.h"
#include "core/ui/rs_surface_node.h"
#include "core/ui/rs_display_node.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
class ScreenManagerUtils {
public:
bool CreateSurface();
@@ -40,7 +37,6 @@ public:
const float defaultDensity_ = 2.0;
const int32_t defaultFlags_ = 0;
};
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
#endif // FRAMEWORKS_DM_TEST_UT_SCREEN_MANAGER_UTILS_H
+2
View File
@@ -14,6 +14,8 @@
*/
#include "snapshot_utils_test.h"
#include "display_manager.h"
#include "mock_display_manager_adapter.h"
#include "singleton_mocker.h"
#include "snapshot_utils.h"
+3 -6
View File
@@ -12,20 +12,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "test_utils.h"
#include <access_token.h>
#include <accesstoken_kit.h>
#include <nativetoken_kit.h>
#include <token_setproc.h>
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
void TestUtils::InjectTokenInfoByHapName(int userID, const std::string& bundleName, int instIndex)
{
Security::AccessToken::AccessTokenID tokenId =
Security::AccessToken::AccessTokenKit::GetHapTokenID(userID, bundleName, instIndex);
SetSelfTokenID(tokenId);
}
} // Rosen
} // OHOS
} // namespace OHOS::Rosen
+2 -4
View File
@@ -18,12 +18,10 @@
#include <string>
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
class TestUtils {
public:
static void InjectTokenInfoByHapName(int userID, const std::string& bundleName, int instIndex);
};
} // Rosen
} // OHOS
} // namespace OHOS::Rosen
#endif // TEST_UTILS_H
+1 -2
View File
@@ -17,12 +17,11 @@
#define OHOS_ROSEN_DISPLAY_MANAGER_CONFIG_H
#include <map>
#include <refbase.h>
#include <string>
#include <vector>
#include <refbase.h>
#include "libxml/parser.h"
#include "libxml/tree.h"
namespace OHOS::Rosen {
class DisplayManagerConfig : public RefBase {
+14 -5
View File
@@ -12,13 +12,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "display_manager_config.h"
#include <climits>
#include <cstdint>
#include <cstdlib>
#include <libxml/globals.h>
#include <libxml/xmlstring.h>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "config_policy_utils.h"
#include "window_manager_hilog.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerConfig"};
}
@@ -147,5 +157,4 @@ void DisplayManagerConfig::DumpConfig()
}
}
}
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
+3 -4
View File
@@ -16,11 +16,10 @@
#ifndef FOUNDATION_DM_SCREEN_H
#define FOUNDATION_DM_SCREEN_H
#include <string>
#include <vector>
#include <surface.h>
#include <screen_manager/screen_types.h>
#include <string>
#include <surface.h>
#include <vector>
#include "dm_common.h"
#include "noncopyable.h"
@@ -18,8 +18,6 @@
#include <securec.h>
#include <string>
#include <hilog/log.h>
#include "accesstoken_kit.h"
#include "bundle_constants.h"
#include "ipc_skeleton.h"
+4 -7
View File
@@ -16,19 +16,16 @@
#ifndef INTERFACES_KITS_NAPI_GRAPHIC_COMMON_COMMON_H
#define INTERFACES_KITS_NAPI_GRAPHIC_COMMON_COMMON_H
#include <cstring>
#include <cstdint>
#include <node_api.h>
#include <node_api_types.h>
#include <memory>
#include <string>
#include <hilog/log.h>
#include <napi/native_api.h>
#include <napi/native_common.h>
#include <napi/native_node_api.h>
#include "js_native_api.h"
#include "js_native_api_types.h"
#include "wm_common.h"
#include "window_manager_hilog.h"
#include "wm_common.h"
constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, OHOS::Rosen::HILOG_DOMAIN_WINDOW,
"NapiWindowManagerCommonLayer" };
@@ -12,18 +12,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "native_screenshot_module.h"
#include <cinttypes>
#include <cstddef>
#include <cstdint>
#include <image_type.h>
#include <iosfwd>
#include <js_native_api.h>
#include <js_native_api_types.h>
#include <memory>
#include <napi/native_api.h>
#include <napi/native_common.h>
#include <string>
#include <type_traits>
#include "display_manager.h"
#include "display_property.h"
#include "pixel_map.h"
#include "pixel_map_napi.h"
#include "window_manager_hilog.h"
#include "wm_common.h"
#include "wm_napi_common.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace save {
struct Option {
Media::Rect rect;
@@ -252,8 +263,7 @@ napi_value ScreenshotModuleInit(napi_env env, napi_value exports)
exports, sizeof(properties) / sizeof(properties[0]), properties));
return exports;
}
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
extern "C" __attribute__((constructor)) void RegisterModule(void)
{
+7
View File
@@ -14,7 +14,14 @@
*/
#include <cstdio>
#include <image_type.h>
#include <iosfwd>
#include <iostream>
#include <memory>
#include <ostream>
#include <refbase.h>
#include "display_manager.h"
#include "snapshot_utils.h"
using namespace OHOS;
+15 -3
View File
@@ -15,12 +15,24 @@
#include "snapshot_utils.h"
#include <cerrno>
#include <climits>
#include <cstdio>
#include <hitrace_meter.h>
#include <sys/time.h>
#include <cstdlib>
#include <ctime>
#include <getopt.h>
#include <securec.h>
#include <hitrace_meter.h>
#include <image_type.h>
#include <iostream>
#include <ostream>
#include <pixel_map.h>
#include <png.h>
#include <securec.h>
#include <string>
#include <sys/time.h>
#include "display_manager.h"
using namespace OHOS::Media;
using namespace OHOS::Rosen;
+2 -3
View File
@@ -17,11 +17,10 @@
#define SNAPSHOT_UTILS_H
#include <cstdint>
#include <iostream>
#include <string>
#include <pixel_map.h>
#include <string>
#include "display_manager.h"
#include "dm_common.h"
namespace OHOS {
struct WriteToPngParam {
+2
View File
@@ -16,11 +16,13 @@
#ifndef FOUNDATION_DMSERVER_DISPLAY_INFO_H
#define FOUNDATION_DMSERVER_DISPLAY_INFO_H
#include <cstdint>
#include <parcel.h>
#include "class_var_definition.h"
#include "display.h"
#include "dm_common.h"
#include "noncopyable.h"
namespace OHOS::Rosen {
class DisplayInfo : public Parcelable {
+4 -4
View File
@@ -17,10 +17,11 @@
#define SURFACE_READER_HANDLER_IMPL_H
#include <mutex>
#include <pixel_map.h>
#include <refbase.h>
#include "surface_reader_handler.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
class SurfaceReaderHandlerImpl : public SurfaceReaderHandler {
public:
bool OnImageAvailable(sptr<Media::PixelMap> pixelMap) override;
@@ -33,7 +34,6 @@ private:
sptr<Media::PixelMap> pixelMap_ = nullptr;
std::recursive_mutex mutex_;
};
}
}
} // namespace OHOS::Rosen
#endif // SURFACE_READER_HANDLER_IMPL_H
+3 -5
View File
@@ -16,11 +16,10 @@
#ifndef OHOS_ROSEN_WM_MATH_H
#define OHOS_ROSEN_WM_MATH_H
#include <limits>
#include <cmath>
#include <limits>
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace MathHelper {
constexpr float PI = 3.14159265f;
constexpr float INF = std::numeric_limits<float>::infinity();
@@ -217,6 +216,5 @@ Vector2 Transform(const Vector2& vec, const Matrix3& mat);
// Transform a Vector3 in 3D world by matrix4
Vector3 Transform(const Vector3& vec, const Matrix4& mat);
} // namespace TransformHelper
} // namespace OHOS
} // namespace Rosen
} // namespace OHOS::Rosen
#endif // OHOS_ROSEN_WM_MATH_H
+4
View File
@@ -15,6 +15,10 @@
#include "display_info.h"
#include <new>
#include <parcel.h>
namespace OHOS::Rosen {
bool DisplayInfo::Marshalling(Parcel &parcel) const
{
+2 -5
View File
@@ -12,12 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "surface_reader_handler_impl.h"
#include "window_manager_hilog.h"
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SurfaceReaderHandlerImpl"};
} // namespace
@@ -51,5 +49,4 @@ sptr<Media::PixelMap> SurfaceReaderHandlerImpl::GetPixelMap()
std::lock_guard<std::recursive_mutex> lock(mutex_);
return pixelMap_;
}
}
}
} // namespace OHOS::Rosen
+3 -5
View File
@@ -13,10 +13,9 @@
* limitations under the License.
*/
#include "wm_math.h"
#include <memory>
#include <cstdlib>
namespace OHOS {
namespace Rosen {
namespace OHOS::Rosen {
namespace TransformHelper {
const Matrix3 Matrix3::Identity = { {
{ 1, 0, 0 },
@@ -315,5 +314,4 @@ Vector3 Transform(const Vector3& vec, const Matrix4& mat)
return retVal;
}
} // namespace TransformHelper
} // namespace Rosen
} // namespace OHOS
} // namespace OHOS::Rosen
-2
View File
@@ -23,8 +23,6 @@ config("libwm_private_config") {
"${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
"${ability_runtime_inner_api_path}/ability_manager/include",
"${ability_runtime_inner_api_path}/app_manager/include/appmgr",
"//third_party/jsoncpp/include",
"//third_party/json/include",
]
}
-2
View File
@@ -273,8 +273,6 @@ config("wm_systemtest_common_public_config") {
"//base/global/resource_management/interfaces/inner_api/include",
"//third_party/node/deps/icu-small/source/common",
"${ability_runtime_inner_api_path}/ability_manager/include",
"//third_party/jsoncpp/include",
"//third_party/json/include",
# abilityContext end
]
-2
View File
@@ -149,8 +149,6 @@ config("wm_unittest_common_public_config") {
"//base/global/resource_management/interfaces/inner_api/include",
"//third_party/node/deps/icu-small/source/common",
"${ability_runtime_inner_api_path}/ability_manager/include",
"//third_party/jsoncpp/include",
"//third_party/json/include",
# abilityContext end
]