diff --git a/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.cpp b/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.cpp index 3289791509..d42c7d1a23 100644 --- a/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.cpp +++ b/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.cpp @@ -794,7 +794,7 @@ void RSSurfaceRenderNodeDrawable::DrawBufferForRotationFixed(RSPaintFilterCanvas RS_LOGE("DrawBufferForRotationFixed failed to get invert matrix"); } canvas.ConcatMatrix(inverse); - auto params = RSUniRenderUtil::CreateBufferDrawParamForRotationFixed(*this, surfaceParams); + auto params = RSUniRenderUtil::CreateBufferDrawParam(*this, surfaceParams); RSUniRenderThread::Instance().GetRenderEngine()->DrawSurfaceNodeWithParams(canvas, *this, params); canvas.Restore(); } diff --git a/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.h b/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.h index 7f58e9fbb4..798e9a08c1 100644 --- a/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.h +++ b/rosen/modules/render_service/core/drawable/rs_surface_render_node_drawable.h @@ -222,6 +222,8 @@ public: std::shared_ptr GetSyncDirtyManager() const override; GraphicColorGamut GetAncestorDisplayColorGamut(const RSSurfaceRenderParams& surfaceParams); void DealWithSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams); + void ClipHoleForSelfDrawingNode(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams); + void DrawBufferForRotationFixed(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams); void ClearCacheSurfaceOnly(); bool PrepareOffscreenRender(); @@ -257,6 +259,7 @@ private: using Registrar = RenderNodeDrawableRegistrar; static Registrar instance_; + std::string name_; bool DrawUIFirstCache(RSPaintFilterCanvas& rscanvas, bool canSkipWait); bool DrawUIFirstCacheWithStarting(RSPaintFilterCanvas& rscanvas, NodeId id); // To be deleted after captureWindow being deleted @@ -276,11 +279,8 @@ private: void DrawSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas, const RSSurfaceRenderParams& surfaceParams, BufferDrawParam& params); - void ClipHoleForSelfDrawingNode(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams); - void DrawBufferForRotationFixed(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams); - - std::string name_; RSSurfaceNodeType surfaceNodeType_ = RSSurfaceNodeType::DEFAULT; + #ifndef ROSEN_CROSS_PLATFORM sptr consumerListener_ = nullptr; #endif diff --git a/rosen/modules/render_service/core/pipeline/rs_base_render_util.cpp b/rosen/modules/render_service/core/pipeline/rs_base_render_util.cpp index 6dcdc0aee9..1397a91fb0 100644 --- a/rosen/modules/render_service/core/pipeline/rs_base_render_util.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_base_render_util.cpp @@ -45,6 +45,7 @@ namespace OHOS { namespace Rosen { namespace { +constexpr int32_t FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN = -90; const std::string DUMP_CACHESURFACE_DIR = "/data/cachesurface"; inline int64_t GenerateCurrentTimeStamp() @@ -1219,7 +1220,9 @@ void RSBaseRenderUtil::DealWithSurfaceRotationAndGravity(GraphicTransformType tr // the surface can rotate itself. auto rotationTransform = GetRotateTransform(transform); int extraRotation = 0; - int32_t rotationDegree = static_cast(RSSystemProperties::GetDefaultDeviceRotationOffset()); + 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->GetFixRotationByUser()) { int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(nodeParams->GetLayerInfo().matrix); extraRotation = degree - rotationDegree; diff --git a/rosen/modules/render_service/core/pipeline/rs_render_service_connection.cpp b/rosen/modules/render_service/core/pipeline/rs_render_service_connection.cpp index a68b138e82..2678f73f5b 100644 --- a/rosen/modules/render_service/core/pipeline/rs_render_service_connection.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_render_service_connection.cpp @@ -1877,11 +1877,6 @@ void RSRenderServiceConnection::SetCacheEnabledForRotation(bool isEnabled) mainThread_->PostTask(task); } -void RSRenderServiceConnection::SetDefaultDeviceRotationOffset(uint32_t offset) -{ - RSSystemProperties::SetDefaultDeviceRotationOffset(offset); -} - std::vector RSRenderServiceConnection::GetActiveDirtyRegionInfo() { const auto& activeDirtyRegionInfos = GpuDirtyRegionCollection::GetInstance().GetActiveDirtyRegionInfo(); diff --git a/rosen/modules/render_service/core/pipeline/rs_render_service_connection.h b/rosen/modules/render_service/core/pipeline/rs_render_service_connection.h index 34c0aa5c3a..fcce9975de 100644 --- a/rosen/modules/render_service/core/pipeline/rs_render_service_connection.h +++ b/rosen/modules/render_service/core/pipeline/rs_render_service_connection.h @@ -263,8 +263,6 @@ private: void SetCacheEnabledForRotation(bool isEnabled) override; - void SetDefaultDeviceRotationOffset(uint32_t offset) override; - bool SetVirtualScreenStatus(ScreenId id, VirtualScreenStatus screenStatus) override; std::vector GetActiveDirtyRegionInfo() override; diff --git a/rosen/modules/render_service/core/pipeline/rs_uni_render_util.cpp b/rosen/modules/render_service/core/pipeline/rs_uni_render_util.cpp index b3d99bbb6b..1dd54b9c03 100644 --- a/rosen/modules/render_service/core/pipeline/rs_uni_render_util.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_uni_render_util.cpp @@ -53,6 +53,7 @@ namespace OHOS { namespace Rosen { namespace { +constexpr int32_t FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN = -90; constexpr const char* CAPTURE_WINDOW_NAME = "CapsuleWindow"; constexpr float GAMMA2_2 = 2.2f; } @@ -551,7 +552,7 @@ BufferDrawParam RSUniRenderUtil::CreateBufferDrawParam( return params; } -BufferDrawParam RSUniRenderUtil::CreateBufferDrawParamForRotationFixed( +BufferDrawParam RSUniRenderUtil::CreateBufferDrawParam( const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams) { BufferDrawParam params; @@ -582,6 +583,11 @@ BufferDrawParam RSUniRenderUtil::CreateBufferDrawParamForRotationFixed( params.matrix = Drawing::Matrix(); params.matrix.PreTranslate(static_cast(dstRect.x), static_cast(dstRect.y)); + auto consumer = surfaceDrawable.GetConsumerOnDraw(); + if (consumer == nullptr) { + return params; + } + auto layerTransform = renderParams.GetLayerInfo().transformType; int realRotation = RSBaseRenderUtil::RotateEnumToInt(RSBaseRenderUtil::GetRotateTransform(layerTransform)); auto flip = RSBaseRenderUtil::GetFlipTransform(layerTransform); @@ -1332,10 +1338,14 @@ GraphicTransformType RSUniRenderUtil::GetRotateTransformForRotationFixed(RSSurfa auto transformType = RSBaseRenderUtil::GetRotateTransform(RSBaseRenderUtil::GetSurfaceBufferTransformType( node.GetRSSurfaceHandler()->GetConsumer(), node.GetRSSurfaceHandler()->GetBuffer())); int extraRotation = 0; - int32_t rotationDegree = static_cast(RSSystemProperties::GetDefaultDeviceRotationOffset()); - int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix( - node.GetRenderProperties().GetBoundsGeometry()->GetAbsMatrix()); - extraRotation = degree - rotationDegree; + static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") || + (system::GetParameter("const.build.product", "") == "ICL") ? + FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN : 0; + if (node.GetFixRotationByUser()) { + int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix( + node.GetRenderProperties().GetBoundsGeometry()->GetAbsMatrix()); + extraRotation = degree - rotationDegree; + } transformType = static_cast( (transformType + extraRotation / RS_ROTATION_90 + SCREEN_ROTATION_NUM) % SCREEN_ROTATION_NUM); return transformType; @@ -1388,12 +1398,7 @@ void RSUniRenderUtil::UpdateRealSrcRect(RSSurfaceRenderNode& node, const RectI& if (!consumer || !buffer) { return; } - auto transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE; - if (node.GetFixRotationByUser()) { - transformType = RSUniRenderUtil::GetRotateTransformForRotationFixed(node, consumer); - } else { - transformType = RSBaseRenderUtil::GetRotateTransform(consumer->GetTransform()); - } + auto transformType = RSUniRenderUtil::GetRotateTransformForRotationFixed(node, consumer); auto srcRect = SrcRectRotateTransform(node, transformType); const auto& property = node.GetRenderProperties(); const auto bufferWidth = buffer->GetSurfaceBufferWidth(); @@ -1549,7 +1554,9 @@ GraphicTransformType RSUniRenderUtil::GetLayerTransform(RSSurfaceRenderNode& nod return GraphicTransformType::GRAPHIC_ROTATE_NONE; } auto consumer = surfaceHandler->GetConsumer(); - int32_t rotationDegree = static_cast(RSSystemProperties::GetDefaultDeviceRotationOffset()); + 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.GetFixRotationByUser() ? -1 * rotationDegree : RSUniRenderUtil::GetRotationFromMatrix(node.GetTotalMatrix()); auto transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE; diff --git a/rosen/modules/render_service/core/pipeline/rs_uni_render_util.h b/rosen/modules/render_service/core/pipeline/rs_uni_render_util.h index 06a5c15eee..bceef2168f 100644 --- a/rosen/modules/render_service/core/pipeline/rs_uni_render_util.h +++ b/rosen/modules/render_service/core/pipeline/rs_uni_render_util.h @@ -81,7 +81,7 @@ public: static BufferDrawParam CreateBufferDrawParam(const RSSurfaceHandler& surfaceHandler, bool forceCPU); static BufferDrawParam CreateBufferDrawParam( const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, bool forceCPU, uint32_t threadIndex); - static BufferDrawParam CreateBufferDrawParamForRotationFixed( + static BufferDrawParam CreateBufferDrawParam( const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams); static BufferDrawParam CreateLayerBufferDrawParam(const LayerInfoPtr& layer, bool forceCPU); static void DealWithRotationAndGravityForRotationFixed(GraphicTransformType transform, Gravity gravity, diff --git a/rosen/modules/render_service/core/transaction/rs_irender_service_connection_ipc_interface_code_access_verifier.cpp b/rosen/modules/render_service/core/transaction/rs_irender_service_connection_ipc_interface_code_access_verifier.cpp index bb0d6bf365..b1bc4a8ba8 100644 --- a/rosen/modules/render_service/core/transaction/rs_irender_service_connection_ipc_interface_code_access_verifier.cpp +++ b/rosen/modules/render_service/core/transaction/rs_irender_service_connection_ipc_interface_code_access_verifier.cpp @@ -219,10 +219,6 @@ bool RSIRenderServiceConnectionInterfaceCodeAccessVerifier::IsExclusiveVerificat hasPermission = IsSystemApp(); break; } - case static_cast(CodeEnumType::SET_DEFAULT_DEVICE_ROTATION_OFFSET): { - hasPermission = IsSystemCalling(codeEnumTypeName_ + "::SET_DEFAULT_DEVICE_ROTATION_OFFSET"); - break; - } case static_cast(CodeEnumType::SET_SCREEN_REFRESH_RATE): { hasPermission = IsSystemCalling(codeEnumTypeName_ + "::SET_SCREEN_REFRESH_RATE"); break; diff --git a/rosen/modules/render_service/core/transaction/rs_render_service_connection_stub.cpp b/rosen/modules/render_service/core/transaction/rs_render_service_connection_stub.cpp index 3026a0e4cd..abf0fb49ba 100644 --- a/rosen/modules/render_service/core/transaction/rs_render_service_connection_stub.cpp +++ b/rosen/modules/render_service/core/transaction/rs_render_service_connection_stub.cpp @@ -123,7 +123,6 @@ static constexpr std::array descriptorCheckList = { static_cast(RSIRenderServiceConnectionInterfaceCode::UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK), static_cast(RSIRenderServiceConnectionInterfaceCode::REGISTER_HGM_CFG_CALLBACK), static_cast(RSIRenderServiceConnectionInterfaceCode::SET_ROTATION_CACHE_ENABLED), - static_cast(RSIRenderServiceConnectionInterfaceCode::SET_DEFAULT_DEVICE_ROTATION_OFFSET), static_cast(RSIRenderServiceConnectionInterfaceCode::SET_TP_FEATURE_CONFIG), static_cast(RSIRenderServiceConnectionInterfaceCode::SET_VIRTUAL_SCREEN_USING_STATUS), static_cast(RSIRenderServiceConnectionInterfaceCode::REFRESH_RATE_MODE_CHANGE_CALLBACK), @@ -1586,11 +1585,6 @@ int RSRenderServiceConnectionStub::OnRemoteRequest( SetCacheEnabledForRotation(isEnabled); break; } - case static_cast(RSIRenderServiceConnectionInterfaceCode::SET_DEFAULT_DEVICE_ROTATION_OFFSET) : { - uint32_t offset = data.ReadUint32(); - SetDefaultDeviceRotationOffset(offset); - break; - } case static_cast(RSIRenderServiceConnectionInterfaceCode::GET_ACTIVE_DIRTY_REGION_INFO) : { const auto& activeDirtyRegionInfos = GetActiveDirtyRegionInfo(); if (!reply.WriteInt32(activeDirtyRegionInfos.size())) { diff --git a/rosen/modules/render_service_base/include/platform/common/rs_system_properties.h b/rosen/modules/render_service_base/include/platform/common/rs_system_properties.h index d15caa61c3..2cdd75e7e4 100644 --- a/rosen/modules/render_service_base/include/platform/common/rs_system_properties.h +++ b/rosen/modules/render_service_base/include/platform/common/rs_system_properties.h @@ -169,8 +169,6 @@ public: static bool GetDrawTextAsBitmap(); static void SetCacheEnabledForRotation(bool flag); static bool GetCacheEnabledForRotation(); - static void SetDefaultDeviceRotationOffset(uint32_t offset); - static uint32_t GetDefaultDeviceRotationOffset(); static ParallelRenderingType GetPrepareParallelRenderingEnabled(); static ParallelRenderingType GetParallelRenderingEnabled(); static HgmRefreshRates GetHgmRefreshRatesEnabled(); @@ -283,7 +281,6 @@ private: static inline bool isUniRenderEnabled_ = false; inline static bool isDrawTextAsBitmap_ = false; inline static bool cacheEnabledForRotation_ = false; - inline static std::atomic defaultDeviceRotationOffset_ = 0; static inline bool forceHpsBlurDisabled_ = false; static const GpuApiType systemGpuApiType_; static const DdgrOpincType ddgrOpincType_; diff --git a/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection.h b/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection.h index f643dfc8dc..1c79ce692c 100644 --- a/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection.h +++ b/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection.h @@ -263,8 +263,6 @@ public: virtual void SetCacheEnabledForRotation(bool isEnabled) = 0; - virtual void SetDefaultDeviceRotationOffset(uint32_t offset) = 0; - virtual void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) = 0; virtual void RunOnRemoteDiedCallback() = 0; diff --git a/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection_ipc_interface_code.h b/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection_ipc_interface_code.h index ce66a9cb1e..234bfcf121 100644 --- a/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection_ipc_interface_code.h +++ b/rosen/modules/render_service_base/include/platform/ohos/rs_irender_service_connection_ipc_interface_code.h @@ -108,7 +108,6 @@ enum class RSIRenderServiceConnectionInterfaceCode : CodeUnderlyingType { UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK, REGISTER_HGM_CFG_CALLBACK, SET_ROTATION_CACHE_ENABLED, - SET_DEFAULT_DEVICE_ROTATION_OFFSET, SET_TP_FEATURE_CONFIG, SET_VIRTUAL_SCREEN_USING_STATUS, REFRESH_RATE_MODE_CHANGE_CALLBACK, diff --git a/rosen/modules/render_service_base/include/transaction/rs_render_service_client.h b/rosen/modules/render_service_base/include/transaction/rs_render_service_client.h index 53d328102d..2280f552c7 100644 --- a/rosen/modules/render_service_base/include/transaction/rs_render_service_client.h +++ b/rosen/modules/render_service_base/include/transaction/rs_render_service_client.h @@ -319,8 +319,6 @@ public: void SetCacheEnabledForRotation(bool isEnabled); - void SetDefaultDeviceRotationOffset(uint32_t offset); - void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback); std::vector GetActiveDirtyRegionInfo(); diff --git a/rosen/modules/render_service_base/src/platform/darwin/rs_render_service_client.cpp b/rosen/modules/render_service_base/src/platform/darwin/rs_render_service_client.cpp index 2272295f75..21a9ea3949 100644 --- a/rosen/modules/render_service_base/src/platform/darwin/rs_render_service_client.cpp +++ b/rosen/modules/render_service_base/src/platform/darwin/rs_render_service_client.cpp @@ -523,10 +523,6 @@ void RSRenderServiceClient::SetCacheEnabledForRotation(bool isEnabled) { } -void RSRenderServiceClient::SetDefaultDeviceRotationOffset(uint32_t offset) -{ -} - void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) { } diff --git a/rosen/modules/render_service_base/src/platform/darwin/rs_system_properties.cpp b/rosen/modules/render_service_base/src/platform/darwin/rs_system_properties.cpp index 90d6348e23..2c8d1d8d8b 100644 --- a/rosen/modules/render_service_base/src/platform/darwin/rs_system_properties.cpp +++ b/rosen/modules/render_service_base/src/platform/darwin/rs_system_properties.cpp @@ -175,15 +175,6 @@ bool RSSystemProperties::GetCacheEnabledForRotation() return {}; } -void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset) -{ -} - -uint32_t RSSystemProperties::SetDefaultDeviceRotationOffset() -{ - return {}; -} - #ifndef NEW_SKIA bool RSSystemProperties::GetReleaseResourceEnabled() { diff --git a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_client.cpp b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_client.cpp index 2af590630e..8cb34ba5b6 100644 --- a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_client.cpp +++ b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_client.cpp @@ -1322,14 +1322,6 @@ void RSRenderServiceClient::SetCacheEnabledForRotation(bool isEnabled) } } -void RSRenderServiceClient::SetDefaultDeviceRotationOffset(uint32_t offset) -{ - auto renderService = RSRenderServiceConnectHub::GetRenderService(); - if (renderService != nullptr) { - renderService->SetDefaultDeviceRotationOffset(offset); - } -} - void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) { auto renderService = RSRenderServiceConnectHub::GetRenderService(); diff --git a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.cpp b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.cpp index ffd18d8d5a..79b552f96f 100644 --- a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.cpp +++ b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.cpp @@ -2464,26 +2464,6 @@ void RSRenderServiceConnectionProxy::SetCacheEnabledForRotation(bool isEnabled) } } -void RSRenderServiceConnectionProxy::SetDefaultDeviceRotationOffset(uint32_t offset) -{ - MessageParcel data; - MessageParcel reply; - MessageOption option; - if (!data.WriteInterfaceToken(RSIRenderServiceConnection::GetDescriptor())) { - return; - } - if (!data.WriteUint32(offset)) { - return; - } - option.SetFlags(MessageOption::TF_ASYNC); - uint32_t code = static_cast(RSIRenderServiceConnectionInterfaceCode::SET_DEFAULT_DEVICE_ROTATION_OFFSET); - int32_t err = Remote()->SendRequest(code, data, reply, option); - if (err != NO_ERROR) { - ROSEN_LOGE("RSRenderServiceConnectionProxy::SetDefaultDeviceRotationOffset: Send Request err."); - return; - } -} - void RSRenderServiceConnectionProxy::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) { OnRemoteDiedCallback_ = callback; diff --git a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.h b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.h index 7ae6a14fe6..7fb190d929 100644 --- a/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.h +++ b/rosen/modules/render_service_base/src/platform/ohos/rs_render_service_connection_proxy.h @@ -236,8 +236,6 @@ public: void SetCacheEnabledForRotation(bool isEnabled) override; - void SetDefaultDeviceRotationOffset(uint32_t offset) override; - void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) override; void RunOnRemoteDiedCallback() override; diff --git a/rosen/modules/render_service_base/src/platform/ohos/rs_system_properties.cpp b/rosen/modules/render_service_base/src/platform/ohos/rs_system_properties.cpp index 6efef54b37..7c53a0fe92 100644 --- a/rosen/modules/render_service_base/src/platform/ohos/rs_system_properties.cpp +++ b/rosen/modules/render_service_base/src/platform/ohos/rs_system_properties.cpp @@ -440,16 +440,6 @@ bool RSSystemProperties::GetCacheEnabledForRotation() return cacheEnabledForRotation_; } -void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset) -{ - defaultDeviceRotationOffset_ = offset; -} - -uint32_t RSSystemProperties::GetDefaultDeviceRotationOffset() -{ - return defaultDeviceRotationOffset_; -} - ParallelRenderingType RSSystemProperties::GetPrepareParallelRenderingEnabled() { static ParallelRenderingType systemPropertiePrepareType = static_cast( diff --git a/rosen/modules/render_service_base/src/platform/windows/rs_render_service_client.cpp b/rosen/modules/render_service_base/src/platform/windows/rs_render_service_client.cpp index 8b1d32b1cf..904d1741c5 100644 --- a/rosen/modules/render_service_base/src/platform/windows/rs_render_service_client.cpp +++ b/rosen/modules/render_service_base/src/platform/windows/rs_render_service_client.cpp @@ -523,10 +523,6 @@ void RSRenderServiceClient::SetCacheEnabledForRotation(bool isEnabled) { } -void RSRenderServiceClient::SetDefaultDeviceRotationOffset(uint32_t offset) -{ -} - void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) { } diff --git a/rosen/modules/render_service_base/src/platform/windows/rs_system_properties.cpp b/rosen/modules/render_service_base/src/platform/windows/rs_system_properties.cpp index 84379742aa..4b574969e2 100644 --- a/rosen/modules/render_service_base/src/platform/windows/rs_system_properties.cpp +++ b/rosen/modules/render_service_base/src/platform/windows/rs_system_properties.cpp @@ -177,10 +177,6 @@ void RSSystemProperties::SetCacheEnabledForRotation(bool flag) { } -void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset) -{ -} - bool RSSystemProperties::GetCacheEnabledForRotation() { return {}; diff --git a/rosen/modules/render_service_client/core/transaction/rs_interfaces.cpp b/rosen/modules/render_service_client/core/transaction/rs_interfaces.cpp index 7c88343497..c59bac6c97 100644 --- a/rosen/modules/render_service_client/core/transaction/rs_interfaces.cpp +++ b/rosen/modules/render_service_client/core/transaction/rs_interfaces.cpp @@ -584,11 +584,6 @@ void RSInterfaces::EnableCacheForRotation() renderServiceClient_->SetCacheEnabledForRotation(true); } -void RSInterfaces::SetDefaultDeviceRotationOffset(uint32_t offset) -{ - renderServiceClient_->SetDefaultDeviceRotationOffset(offset); -} - void RSInterfaces::NotifyLightFactorStatus(bool isSafe) { renderServiceClient_->NotifyLightFactorStatus(isSafe); diff --git a/rosen/modules/render_service_client/core/transaction/rs_interfaces.h b/rosen/modules/render_service_client/core/transaction/rs_interfaces.h index 2635392e7f..c6b09bd7be 100644 --- a/rosen/modules/render_service_client/core/transaction/rs_interfaces.h +++ b/rosen/modules/render_service_client/core/transaction/rs_interfaces.h @@ -248,8 +248,6 @@ public: void ReportGameStateData(GameStateData info); - void SetDefaultDeviceRotationOffset(uint32_t offset); - void EnableCacheForRotation(); void DisableCacheForRotation(); diff --git a/rosen/test/render_service/render_service_base/unittest/platform/ohos/rs_system_properties_test.cpp b/rosen/test/render_service/render_service_base/unittest/platform/ohos/rs_system_properties_test.cpp index da368b6754..8c45a147b3 100644 --- a/rosen/test/render_service/render_service_base/unittest/platform/ohos/rs_system_properties_test.cpp +++ b/rosen/test/render_service/render_service_base/unittest/platform/ohos/rs_system_properties_test.cpp @@ -456,18 +456,6 @@ HWTEST_F(RSSystemPropertiesTest, GetCacheEnabledForRotation, TestSize.Level1) ASSERT_TRUE(RSSystemProperties::GetCacheEnabledForRotation()); } -/** - * @tc.name: GetDefaultDeviceRotationOffset - * @tc.desc: GetDefaultDeviceRotationOffset Test - * @tc.type:FUNC - * @tc.require: issueI9JZWC - */ -HWTEST_F(RSSystemPropertiesTest, GetDefaultDeviceRotationOffset, TestSize.Level1) -{ - RSSystemProperties::SetDefaultDeviceRotationOffset(90); - ASSERT_TRUE(RSSystemProperties::GetDefaultDeviceRotationOffset() == 90); -} - /** * @tc.name: GetPrepareParallelRenderingEnabled * @tc.desc: GetPrepareParallelRenderingEnabled Test