mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-02-18 19:09:32 +00:00
给屏幕挖孔增加回调
Signed-off-by: chuchengcheng <chuchengcheng4@huawei.com> Change-Id: Ie940649978b0247a7e6a7a7ae6db5c3da8658e08
This commit is contained in:
parent
051f7341f0
commit
c91df57aba
@ -20,3 +20,4 @@ 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
|
||||
persist.sys.graphic.hideNotch.status = graphics:graphics:0777
|
@ -1155,7 +1155,8 @@ void RSBaseRenderUtil::DealWithSurfaceRotationAndGravity(GraphicTransformType tr
|
||||
// the surface can rotate itself.
|
||||
auto rotationTransform = GetRotateTransform(transform);
|
||||
int extraRotation = 0;
|
||||
static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") ?
|
||||
static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") ||
|
||||
(system::GetParameter("const.build.product", "") == "ICL") ?
|
||||
FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN : 0;
|
||||
if (nodeParams != nullptr && nodeParams->GetForceHardwareByUser()) {
|
||||
int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(nodeParams->GetLayerInfo().matrix);
|
||||
|
@ -169,6 +169,7 @@ constexpr const char* MEM_MGR = "MemMgr";
|
||||
constexpr const char* DESKTOP_NAME_FOR_ROTATION = "SCBDesktop";
|
||||
const std::string PERF_FOR_BLUR_IF_NEEDED_TASK_NAME = "PerfForBlurIfNeeded";
|
||||
constexpr const char* CAPTURE_WINDOW_NAME = "CapsuleWindow";
|
||||
constexpr const char* HIDE_NOTCH_STATUS = "persist.sys.graphic.hideNotch.status";
|
||||
#ifdef RS_ENABLE_GL
|
||||
constexpr size_t DEFAULT_SKIA_CACHE_SIZE = 96 * (1 << 20);
|
||||
constexpr int DEFAULT_SKIA_CACHE_COUNT = 2 * (1 << 12);
|
||||
@ -432,6 +433,7 @@ void RSMainThread::Init()
|
||||
});
|
||||
RSTaskDispatcher::GetInstance().RegisterTaskDispatchFunc(gettid(), taskDispatchFunc);
|
||||
RsFrameReport::GetInstance().Init();
|
||||
RSSystemProperties::WatchSystemProperty(HIDE_NOTCH_STATUS, OnHideNotchStatusCallback, nullptr);
|
||||
if (isUniRender_) {
|
||||
unmarshalBarrierTask_ = [this]() {
|
||||
auto cachedTransactionData = RSUnmarshalThread::Instance().GetCachedTransactionData();
|
||||
@ -1669,6 +1671,14 @@ void RSMainThread::NotifyUniRenderFinish()
|
||||
}
|
||||
}
|
||||
|
||||
void RSMainThread::OnHideNotchStatusCallback(const char *key, const char *value, void *context)
|
||||
{
|
||||
if (strcmp(key, HIDE_NOTCH_STATUS) != 0) {
|
||||
return;
|
||||
}
|
||||
RSMainThread::Instance()->RequestNextVSync();
|
||||
}
|
||||
|
||||
void RSMainThread::NotifyDisplayNodeBufferReleased()
|
||||
{
|
||||
RS_TRACE_NAME("RSMainThread::NotifyDisplayNodeBufferReleased");
|
||||
|
@ -399,6 +399,7 @@ private:
|
||||
uint32_t GetRefreshRate() const;
|
||||
uint32_t GetDynamicRefreshRate() const;
|
||||
void SkipCommandByNodeId(std::vector<std::unique_ptr<RSTransactionData>>& transactionVec, pid_t pid);
|
||||
static void OnHideNotchStatusCallback(const char *key, const char *value, void *context);
|
||||
|
||||
bool DoParallelComposition(std::shared_ptr<RSBaseRenderNode> rootNode);
|
||||
|
||||
|
@ -1453,7 +1453,8 @@ void RSUniRenderUtil::LayerRotate(RSSurfaceRenderNode& node, const ScreenInfo& s
|
||||
GraphicTransformType RSUniRenderUtil::GetLayerTransform(RSSurfaceRenderNode& node, const ScreenInfo& screenInfo)
|
||||
{
|
||||
auto consumer = node.GetConsumer();
|
||||
static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") ?
|
||||
static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") ||
|
||||
(system::GetParameter("const.build.product", "") == "ICL") ?
|
||||
FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN : 0;
|
||||
int surfaceNodeRotation = node.GetForceHardwareByUser() ? -1 * rotationDegree :
|
||||
RSUniRenderUtil::GetRotationFromMatrix(node.GetTotalMatrix());
|
||||
|
Loading…
x
Reference in New Issue
Block a user