From 84bb3b7e83bb00fcf5a21f7034cccd16f5063254 Mon Sep 17 00:00:00 2001 From: benb365 Date: Fri, 19 Mar 2021 15:47:35 +0800 Subject: [PATCH] Embrace template "Vector" in namespace "Graphic" --- .gitignore | 2 +- frameworks/components/root_view.cpp | 1 + interfaces/kits/components/root_view.h | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7ff7443..15e75b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/huawei_proprietary +tools/qt/build* \ No newline at end of file diff --git a/frameworks/components/root_view.cpp b/frameworks/components/root_view.cpp index 9d34da4..1c216bb 100755 --- a/frameworks/components/root_view.cpp +++ b/frameworks/components/root_view.cpp @@ -59,6 +59,7 @@ inline bool RootView::IntersectScreenRect(Rect& rect) } #if LOCAL_RENDER +using namespace Graphic; static void DivideInvalidateRect(const Rect& originRect, Rect& leftoverRect, Vector& splitRects) { Rect mask; diff --git a/interfaces/kits/components/root_view.h b/interfaces/kits/components/root_view.h index 291bc88..3840ba4 100755 --- a/interfaces/kits/components/root_view.h +++ b/interfaces/kits/components/root_view.h @@ -38,7 +38,6 @@ #ifndef GRAPHIC_LITE_ROOT_VIEW_H #define GRAPHIC_LITE_ROOT_VIEW_H -#include #if defined __linux__ || defined __LITEOS__ || defined __APPLE__ #include #endif @@ -46,9 +45,13 @@ #include "components/ui_view_group.h" #include "events/key_event.h" #include "events/virtual_device_event.h" -#include "gfx_utils/vector.h" #include "gfx_utils/list.h" +#if LOCAL_RENDER +#include +#include "gfx_utils/vector.h" +#endif + namespace OHOS { #if ENABLE_WINDOW class Window; @@ -285,7 +288,7 @@ private: void OptimizeInvalidView(UIView* curview, UIView* backgroud, List &renderedRects); void OptimizeInvalidMap(); - std::map> invalidateMap_; + std::map> invalidateMap_; #else bool renderFlag_ = false; Rect invalidRect_; -- GitLab