From 60179d7c4df802e80e64e5cdbdaaca9d815a1c4d Mon Sep 17 00:00:00 2001 From: yanansong Date: Thu, 19 Oct 2023 14:12:03 +0800 Subject: [PATCH] remove useless code --- README.en.md | 16 ++---------- README.md | 16 ++---------- .../drm_backend/display_device/hdi_layer.cpp | 26 ------------------- .../display_gralloc/dumb_allocator.cpp | 8 ------ .../display_gralloc/hi_drm_format.cpp | 14 ---------- 5 files changed, 4 insertions(+), 76 deletions(-) diff --git a/README.en.md b/README.en.md index c9dbcd4..9583383 100644 --- a/README.en.md +++ b/README.en.md @@ -11,17 +11,5 @@ FangTian engine mainly focuses on the underlying modules of windowing system, wi 4. Natural animation and effects 5. Compatible with wayland and X11 application -#### Software Architecture -Software architecture description - -#### Compilation -1. Enter the code root directory and perform system environment and dependency checks:/ build/prebuild.sh。 -2. After downloading and installing the dependency package, run it directly/ Build. sh to start building. - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - +#### Wiki +[Ref](https://gitee.com/openeuler/ft_engine/wikis/) diff --git a/README.md b/README.md index 9caacd9..6ddf0ba 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,8 @@ ft engine 主要聚焦于视窗底座,目标在与解决Linux桌面上图形 4. 自然的动效能力 5. 兼容wayland、X11协议 -#### 软件架构 -软件架构说明 +#### WiKi +[请参阅](https://gitee.com/openeuler/ft_engine/wikis/) -#### 源码编译 - -1. 进入代码根目录,执行进行系统环境检查和依赖检查:./build/prebuild.sh。 -2. 完成依赖包的下载及安装后,直接运行 ./build.sh 即可开始构建。 - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - diff --git a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp index cfec79e..4384488 100644 --- a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp @@ -42,8 +42,6 @@ HdiLayerBuffer::HdiLayerBuffer(const BufferHandle &handle) handle.fd, ErrnoToString(errno).c_str(), errno); } } - - // LOG_DEBUG << "HdiLayerBuffer handle width: " << width_ << ", height: " << height_ << ", fd: " << fd_; } HdiLayerBuffer::~HdiLayerBuffer() noexcept {} @@ -56,10 +54,6 @@ int32_t HdiLayer::SetSize(IRect *rect) LOG_ERROR("HdiLayer::SetSize: rect is nullptr."); return DISPLAY_PARAM_ERR; } - - // LOG_DEBUG << "HdiLayer::SetSize: id: " << id_ - // << Fmt(", rect x: %d y : %d w : %d h : %d", rect->x, rect->y, rect->w, rect->h); - displayRect_ = *rect; return DISPLAY_SUCCESS; } @@ -70,24 +64,18 @@ int32_t HdiLayer::SetCrop(IRect *rect) LOG_ERROR("HdiLayer::SetCrop: rect is nullptr."); return DISPLAY_PARAM_ERR; } - - // LOG_DEBUG << "HdiLayer::SetCrop: id: " << id_ - // << Fmt(", crop x: %d y : %d w : %d h : %d", rect->x, rect->y, rect->w, rect->h); - crop_ = *rect; return DISPLAY_SUCCESS; } int32_t HdiLayer::SetZOrder(uint32_t zOrder) { - // LOG_DEBUG << "HdiLayer::SetZOrder: id: " << id_ << ", zOrder: " << zOrder; zOrder_ = zOrder; return DISPLAY_SUCCESS; } int32_t HdiLayer::SetPreMulti(bool preMul) { - // LOG_DEBUG << "HdiLayer::SetPreMulti: id: " << id_ << ", preMul: " << preMul; preMulti_ = preMul; return DISPLAY_SUCCESS; } @@ -98,18 +86,12 @@ int32_t HdiLayer::SetAlpha(LayerAlpha *alpha) LOG_ERROR("HdiLayer::SetAlpha: alpha is nullptr."); return DISPLAY_PARAM_ERR; } - - // LOG_DEBUG << "HdiLayer::SetPreMulti: id: " << id_ << ", alpha: " << alpha->enGlobalAlpha - // << ", gAlpha: " << alpha->gAlpha; - alpha_ = *alpha; return DISPLAY_SUCCESS; } int32_t HdiLayer::SetTransformMode(TransformType type) { - // LOG_DEBUG << "HdiLayer::TransformType: id: " << id_ << ", type: " << type; - transformType_ = type; return DISPLAY_SUCCESS; } @@ -120,9 +102,6 @@ int32_t HdiLayer::SetDirtyRegion(IRect *region) LOG_ERROR("HdiLayer::SetDirtyRegion: region is nullptr."); return DISPLAY_PARAM_ERR; } - - // LOG_DEBUG << "HdiLayer::SetDirtyRegion: id: " << id_ - // << Fmt(", region x: %d, y: %d, w: %d, h: %d", region->x, region->y, region->w, region->h); return DISPLAY_SUCCESS; } @@ -132,8 +111,6 @@ int32_t HdiLayer::SetVisibleRegion(uint32_t num, IRect *rect) LOG_ERROR("HdiLayer::SetVisibleRegion: rect is nullptr."); return DISPLAY_PARAM_ERR; } - // LOG_DEBUG << "HdiLayer::SetVisibleRegion: id: " << id_ - // << Fmt(", rect x: %d, y: %d, w: %d, h: %d", rect->x, rect->y, rect->w, rect->h); return DISPLAY_SUCCESS; } @@ -151,14 +128,12 @@ int32_t HdiLayer::SetBuffer(const BufferHandle *handle, int32_t fence) int32_t HdiLayer::SetCompositionType(CompositionType type) { - // LOG_DEBUG << "HdiLayer::SetCompositionType: id: " << id_ << ", type: " << type; compositionType_ = type; return DISPLAY_SUCCESS; } int32_t HdiLayer::SetBlendType(BlendType type) { - // LOG_DEBUG << "HdiLayer::SetBlendType: id: " << id_ << ", type: " << type; blendType_ = type; return DISPLAY_SUCCESS; } @@ -193,7 +168,6 @@ void HdiLayer::SetPixel(const BufferHandle &handle, int x, int y, uint32_t color void HdiLayer::ClearColor(uint32_t color) { - // LOG_DEBUG << "HdiLayer::ClearColor, color: " << color; const auto &handle = hdiBuffer_->GetBufferHandle(); for (int32_t x = 0; x < handle.width; x++) { for (int32_t y = 0; y < handle.height; y++) { diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp index 51f6d91..567cae2 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp @@ -48,14 +48,6 @@ int32_t DumbAllocator::Init() } drmFd_ = drmFd; - // TODO: enable reopen DrmFd - // int newFd = GrallocUtils::ReopenDrmFd(drmFd); - // if (IsInvalidFd(newFd)) { - // LOG_ERROR << "[Gralloc::DumbAllocator::Init] Failed to reopen DRM fd!"; - // return DISPLAY_FD_ERR; - // } - // drmFd_ = newFd; - LOG_DEBUG("[Gralloc::DumbAllocator::Init] Init done."); return DISPLAY_SUCCESS; diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp index 2db4da7..c72dd75 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp @@ -181,14 +181,6 @@ uint32_t ConvertPixelFormatToDrmFormat(PixelFormat fmtIn) break; } } - // LOG_DEBUG << "Convert pixelFormat(" << fmtIn << " : " << GetHdiPixelFmtStr(fmtIn) << ") to DrmFormat(" << fmtOut - // << " : " << GetDrmFmtStr(fmtOut) << ")"; - // LOG_DEBUG << FT::Fmt( - // "Convert PixelFormat(%u:%s) to DrmFormat(%u:%s)", - // FT::ECast(fmtIn), - // GetHdiPixelFmtStr(fmtIn), - // fmtOut, - // GetDrmFmtStr(fmtOut)); return fmtOut; } @@ -201,12 +193,6 @@ PixelFormat ConvertDrmFormatToPixelFormat(uint32_t fmtIn) break; } } - // LOG_DEBUG << FT::Fmt( - // "Convert DrmFormat(%u:%s) to PixelFormat(%u:%s)", - // fmtIn, - // GetDrmFmtStr(fmtIn), - // FT::ECast(fmtOut), - // GetHdiPixelFmtStr(fmtOut)); return fmtOut; } -- Gitee