mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-02-09 21:26:42 +00:00
add system parmas for renderservice with bootevent.
Signed-off-by: SuellaSun <sunyang34@huawei.com>
This commit is contained in:
parent
80e1a3f44b
commit
570a67c9d2
@ -19,3 +19,4 @@ persist.rosen.sethgmrefreshratemode.enabled = graphics:graphics:0775
|
||||
persist.graphic.bootsound.enabled = graphics:servicectrl:0775
|
||||
rosen.dirtyregiondebug.enabled = graphics:servicectrl:0775
|
||||
rosen.drawingCache.enabledDfx = graphics:servicectrl:0775
|
||||
bootevent.renderservice.ready = graphics:graphics:0777
|
||||
|
@ -29,6 +29,9 @@
|
||||
"uid" : "graphics",
|
||||
"gid" : ["system", "tp_host"],
|
||||
"caps" : ["SYS_NICE"],
|
||||
"bootevents": [
|
||||
"bootevent.renderservice.ready"
|
||||
],
|
||||
"permission" : [
|
||||
"ohos.permission.REPORT_RESOURCE_SCHEDULE_EVENT"
|
||||
],
|
||||
|
@ -17,7 +17,9 @@
|
||||
|
||||
#include <iservice_registry.h>
|
||||
#include <malloc.h>
|
||||
#include <parameters.h>
|
||||
#include <platform/common/rs_log.h>
|
||||
#include "platform/common/rs_system_properties.h"
|
||||
#include <string>
|
||||
#include <system_ability_definition.h>
|
||||
#include <unistd.h>
|
||||
@ -44,6 +46,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr uint32_t UNI_RENDER_VSYNC_OFFSET = 5000000;
|
||||
const std::string BOOTEVENT_RENDER_SERVICE_READY = "bootevent.renderservice.ready";
|
||||
}
|
||||
RSRenderService::RSRenderService() {}
|
||||
|
||||
@ -121,6 +124,12 @@ bool RSRenderService::Init()
|
||||
samgr->AddSystemAbility(RENDER_SERVICE, this);
|
||||
|
||||
RS_PROFILER_INIT(this);
|
||||
|
||||
if (!system::GetBoolParameter(BOOTEVENT_RENDER_SERVICE_READY.c_str(), false)) {
|
||||
system::SetParameter(BOOTEVENT_RENDER_SERVICE_READY.c_str(), "true");
|
||||
RS_LOGI("set boot render service started true");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user