mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-26 16:53:18 +00:00
render service cpu boost enable
Signed-off-by: hanchangyou <hanchangyou@hisilicon.com>
This commit is contained in:
parent
a63c8e4fed
commit
1907eaeebe
@ -27,7 +27,7 @@
|
||||
"critical" : [1, 5, 60],
|
||||
"importance" : -20,
|
||||
"uid" : "graphics",
|
||||
"gid" : ["system", "tp_host", "data_reserve"],
|
||||
"gid" : ["system", "tp_host", "data_reserve", "dev_dma_heap"],
|
||||
"writepid" : ["/dev/memcg/perf_sensitive/cgroup.procs"],
|
||||
"caps" : ["SYS_NICE"],
|
||||
"bootevents": [
|
||||
|
@ -59,6 +59,8 @@
|
||||
#include "drawable/dfx/rs_skp_capture_dfx.h"
|
||||
#include "platform/ohos/overdraw/rs_overdraw_controller.h"
|
||||
#include "utils/performanceCaculate.h"
|
||||
// cpu boost
|
||||
#include "c/ffrt_cpu_boost.h"
|
||||
namespace OHOS::Rosen::DrawableV2 {
|
||||
namespace {
|
||||
constexpr const char* CLEAR_GPU_CACHE = "ClearGpuCache";
|
||||
@ -793,7 +795,11 @@ void RSDisplayRenderNodeDrawable::OnDraw(Drawing::Canvas& canvas)
|
||||
}
|
||||
|
||||
curCanvas_->SetHighContrast(RSUniRenderThread::Instance().IsHighContrastTextModeOn());
|
||||
// cpu boost feature start
|
||||
ffrt_cpu_boost_start(CPUBOOST_START_POINT + 1);
|
||||
RSRenderNodeDrawable::OnDraw(*curCanvas_);
|
||||
// cpu boost feature end
|
||||
ffrt_cpu_boost_end(CPUBOOST_START_POINT + 1);
|
||||
DrawCurtainScreen();
|
||||
if (needOffscreen) {
|
||||
if (canvasBackup_ != nullptr) {
|
||||
|
@ -131,6 +131,9 @@
|
||||
#include <iservice_registry.h>
|
||||
#endif
|
||||
|
||||
// cpu boost
|
||||
#include "c/ffrt_cpu_boost.h"
|
||||
|
||||
using namespace FRAME_TRACE;
|
||||
static const std::string RS_INTERVAL_NAME = "renderservice";
|
||||
|
||||
@ -450,8 +453,12 @@ void RSMainThread::Init()
|
||||
RSUifirstManager::Instance().PrepareCurrentFrameEvent();
|
||||
ProcessHgmFrameRate(timestamp_);
|
||||
RS_PROFILER_ON_RENDER_BEGIN();
|
||||
// cpu boost feature start
|
||||
ffrt_cpu_boost_start(CPUBOOST_START_POINT);
|
||||
// may mark rsnotrendering
|
||||
Render(); // now render is traverse tree to prepare
|
||||
// cpu boost feature end
|
||||
ffrt_cpu_boost_end(CPUBOOST_START_POINT);
|
||||
TraverseCanvasDrawingNodesNotOnTree();
|
||||
RS_PROFILER_ON_RENDER_END();
|
||||
OnUniRenderDraw();
|
||||
|
Loading…
Reference in New Issue
Block a user