bugfix about lower log level

Signed-off-by: thelastking <chenlulu16@huawei.com>
Change-Id: I5a1c9ba503ed56cf91bcf7c264e1bb7ff8afd0d1
This commit is contained in:
thelastking 2022-02-21 11:42:16 +08:00
parent d9a069d587
commit 54f95a733f
4 changed files with 17 additions and 11 deletions

View File

@ -40,10 +40,8 @@ void RSHardwareProcessor::Init(ScreenId id)
ROSEN_LOGE("RSHardwareProcessor::Init output_ is nullptr"); ROSEN_LOGE("RSHardwareProcessor::Init output_ is nullptr");
return; return;
} }
currScreenInfo_ = screenManager_->QueryScreenInfo(id); currScreenInfo_ = screenManager_->QueryScreenInfo(id);
ROSEN_LOGI("RSHardwareProcessor::Init screen w:%{public}d, w:%{public}d", ROSEN_LOGI("RSHardwareProcessor::Init screen w:%d, w:%d", currScreenInfo_.width, currScreenInfo_.height);
currScreenInfo_.width, currScreenInfo_.height);
IRect damageRect; IRect damageRect;
damageRect.x = 0; damageRect.x = 0;
damageRect.y = 0; damageRect.y = 0;
@ -114,8 +112,8 @@ void RSHardwareProcessor::CropLayers()
void RSHardwareProcessor::ProcessSurface(RSSurfaceRenderNode &node) void RSHardwareProcessor::ProcessSurface(RSSurfaceRenderNode &node)
{ {
ROSEN_LOGE("RsDebug RSHardwareProcessor::ProcessSurface start node id:%llu available buffer:%d", node.GetId(), ROSEN_LOGI("RsDebug RSHardwareProcessor::ProcessSurface start node id:%llu available buffer:%d name:[%s]",
node.GetAvailableBufferCount()); node.GetId(), node.GetAvailableBufferCount(), node.GetName().c_str());
if (!output_) { if (!output_) {
ROSEN_LOGE("RSHardwareProcessor::ProcessSurface output is nullptr"); ROSEN_LOGE("RSHardwareProcessor::ProcessSurface output is nullptr");
return; return;
@ -129,7 +127,7 @@ void RSHardwareProcessor::ProcessSurface(RSSurfaceRenderNode &node)
RSProcessor::SpecialTask task = [] () -> void{}; RSProcessor::SpecialTask task = [] () -> void{};
bool ret = ConsumeAndUpdateBuffer(node, task, cbuffer); bool ret = ConsumeAndUpdateBuffer(node, task, cbuffer);
if (!ret) { if (!ret) {
ROSEN_LOGE("RsDebug RSHardwareProcessor::ProcessSurface consume buffer fail"); ROSEN_LOGI("RsDebug RSHardwareProcessor::ProcessSurface consume buffer fail");
return; return;
} }
if (!node.IsBufferAvailable()) { if (!node.IsBufferAvailable()) {

View File

@ -42,13 +42,13 @@ RSMainThread::~RSMainThread() noexcept
void RSMainThread::Init() void RSMainThread::Init()
{ {
mainLoop_ = [&]() { mainLoop_ = [&]() {
ROSEN_LOGE("RsDebug mainLoop start"); ROSEN_LOGI("RsDebug mainLoop start");
ROSEN_TRACE_BEGIN(BYTRACE_TAG_GRAPHIC_AGP, "RSMainThread::DoComposition"); ROSEN_TRACE_BEGIN(BYTRACE_TAG_GRAPHIC_AGP, "RSMainThread::DoComposition");
ProcessCommand(); ProcessCommand();
Animate(timestamp_); Animate(timestamp_);
Draw(); Draw();
ROSEN_TRACE_END(BYTRACE_TAG_GRAPHIC_AGP); ROSEN_TRACE_END(BYTRACE_TAG_GRAPHIC_AGP);
ROSEN_LOGE("RsDebug mainLoop end"); ROSEN_LOGI("RsDebug mainLoop end");
}; };
threadLooper_ = RSThreadLooper::Create(); threadLooper_ = RSThreadLooper::Create();

View File

@ -232,6 +232,10 @@ sptr<Surface> RSRenderServiceConnection::CreateNodeAndSurface(const RSSurfaceRen
ROSEN_LOGE("RSRenderService::CreateNodeAndSurface get consumer surface fail"); ROSEN_LOGE("RSRenderService::CreateNodeAndSurface get consumer surface fail");
return nullptr; return nullptr;
} }
std::string surfaceName;
surface->GetName(surfaceName);
ROSEN_LOGE("RsDebug RSRenderService::CreateNodeAndSurface node id:%llu name:%s surface id:%llu name:%s",
node->GetId(), node->GetName().c_str(), surface->GetUniqueId(), surfaceName.c_str());
node->SetConsumer(surface); node->SetConsumer(surface);
std::function<void()> registerNode = [node, this]() -> void { std::function<void()> registerNode = [node, this]() -> void {
this->mainThread_->GetContext().GetMutableNodeMap().RegisterRenderNode(node); this->mainThread_->GetContext().GetMutableNodeMap().RegisterRenderNode(node);

View File

@ -507,10 +507,14 @@ void RsRenderServiceUtil::DrawBuffer(SkCanvas* canvas, sptr<OHOS::SurfaceBuffer>
ROSEN_LOGE("RsRenderServiceUtil::DrawBuffer buffer is nullptr"); ROSEN_LOGE("RsRenderServiceUtil::DrawBuffer buffer is nullptr");
return; return;
} }
auto addr = buffer->GetVirAddr(); auto addr = buffer->GetVirAddr();
if (addr == nullptr || buffer->GetWidth() <= 0 || buffer->GetHeight() <= 0) { if (addr == nullptr) {
ROSEN_LOGE("RsRenderServiceUtil::DrawBuffer this buffer have no vir add or width or height is negative"); ROSEN_LOGE("RsRenderServiceUtil::DrawBuffer this buffer have no vir addr");
return;
}
if (buffer->GetWidth() <= 0 || buffer->GetHeight() <= 0) {
ROSEN_LOGE("RsRenderServiceUtil::DrawBuffer this buffer width or height is negative [%d %d]",
buffer->GetWidth(), buffer->GetHeight());
return; return;
} }