mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
回退 'Pull Request !16220 : 消除代码差异'
This commit is contained in:
parent
1f9194c3cd
commit
953691448a
@ -794,7 +794,7 @@ void RSSurfaceRenderNodeDrawable::DrawBufferForRotationFixed(RSPaintFilterCanvas
|
|||||||
RS_LOGE("DrawBufferForRotationFixed failed to get invert matrix");
|
RS_LOGE("DrawBufferForRotationFixed failed to get invert matrix");
|
||||||
}
|
}
|
||||||
canvas.ConcatMatrix(inverse);
|
canvas.ConcatMatrix(inverse);
|
||||||
auto params = RSUniRenderUtil::CreateBufferDrawParamForRotationFixed(*this, surfaceParams);
|
auto params = RSUniRenderUtil::CreateBufferDrawParam(*this, surfaceParams);
|
||||||
RSUniRenderThread::Instance().GetRenderEngine()->DrawSurfaceNodeWithParams(canvas, *this, params);
|
RSUniRenderThread::Instance().GetRenderEngine()->DrawSurfaceNodeWithParams(canvas, *this, params);
|
||||||
canvas.Restore();
|
canvas.Restore();
|
||||||
}
|
}
|
||||||
|
@ -222,6 +222,8 @@ public:
|
|||||||
std::shared_ptr<RSDirtyRegionManager> GetSyncDirtyManager() const override;
|
std::shared_ptr<RSDirtyRegionManager> GetSyncDirtyManager() const override;
|
||||||
GraphicColorGamut GetAncestorDisplayColorGamut(const RSSurfaceRenderParams& surfaceParams);
|
GraphicColorGamut GetAncestorDisplayColorGamut(const RSSurfaceRenderParams& surfaceParams);
|
||||||
void DealWithSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
void DealWithSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
||||||
|
void ClipHoleForSelfDrawingNode(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
||||||
|
void DrawBufferForRotationFixed(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
||||||
void ClearCacheSurfaceOnly();
|
void ClearCacheSurfaceOnly();
|
||||||
|
|
||||||
bool PrepareOffscreenRender();
|
bool PrepareOffscreenRender();
|
||||||
@ -257,6 +259,7 @@ private:
|
|||||||
using Registrar = RenderNodeDrawableRegistrar<RSRenderNodeType::SURFACE_NODE, OnGenerate>;
|
using Registrar = RenderNodeDrawableRegistrar<RSRenderNodeType::SURFACE_NODE, OnGenerate>;
|
||||||
static Registrar instance_;
|
static Registrar instance_;
|
||||||
|
|
||||||
|
std::string name_;
|
||||||
bool DrawUIFirstCache(RSPaintFilterCanvas& rscanvas, bool canSkipWait);
|
bool DrawUIFirstCache(RSPaintFilterCanvas& rscanvas, bool canSkipWait);
|
||||||
bool DrawUIFirstCacheWithStarting(RSPaintFilterCanvas& rscanvas, NodeId id);
|
bool DrawUIFirstCacheWithStarting(RSPaintFilterCanvas& rscanvas, NodeId id);
|
||||||
// To be deleted after captureWindow being deleted
|
// To be deleted after captureWindow being deleted
|
||||||
@ -276,11 +279,8 @@ private:
|
|||||||
void DrawSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas,
|
void DrawSelfDrawingNodeBuffer(RSPaintFilterCanvas& canvas,
|
||||||
const RSSurfaceRenderParams& surfaceParams, BufferDrawParam& params);
|
const RSSurfaceRenderParams& surfaceParams, BufferDrawParam& params);
|
||||||
|
|
||||||
void ClipHoleForSelfDrawingNode(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
|
||||||
void DrawBufferForRotationFixed(RSPaintFilterCanvas& canvas, RSSurfaceRenderParams& surfaceParams);
|
|
||||||
|
|
||||||
std::string name_;
|
|
||||||
RSSurfaceNodeType surfaceNodeType_ = RSSurfaceNodeType::DEFAULT;
|
RSSurfaceNodeType surfaceNodeType_ = RSSurfaceNodeType::DEFAULT;
|
||||||
|
|
||||||
#ifndef ROSEN_CROSS_PLATFORM
|
#ifndef ROSEN_CROSS_PLATFORM
|
||||||
sptr<IBufferConsumerListener> consumerListener_ = nullptr;
|
sptr<IBufferConsumerListener> consumerListener_ = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
namespace Rosen {
|
namespace Rosen {
|
||||||
namespace {
|
namespace {
|
||||||
|
constexpr int32_t FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN = -90;
|
||||||
const std::string DUMP_CACHESURFACE_DIR = "/data/cachesurface";
|
const std::string DUMP_CACHESURFACE_DIR = "/data/cachesurface";
|
||||||
|
|
||||||
inline int64_t GenerateCurrentTimeStamp()
|
inline int64_t GenerateCurrentTimeStamp()
|
||||||
@ -1219,7 +1220,9 @@ void RSBaseRenderUtil::DealWithSurfaceRotationAndGravity(GraphicTransformType tr
|
|||||||
// the surface can rotate itself.
|
// the surface can rotate itself.
|
||||||
auto rotationTransform = GetRotateTransform(transform);
|
auto rotationTransform = GetRotateTransform(transform);
|
||||||
int extraRotation = 0;
|
int extraRotation = 0;
|
||||||
int32_t rotationDegree = static_cast<int32_t>(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()) {
|
if (nodeParams != nullptr && nodeParams->GetFixRotationByUser()) {
|
||||||
int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(nodeParams->GetLayerInfo().matrix);
|
int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(nodeParams->GetLayerInfo().matrix);
|
||||||
extraRotation = degree - rotationDegree;
|
extraRotation = degree - rotationDegree;
|
||||||
|
@ -1877,11 +1877,6 @@ void RSRenderServiceConnection::SetCacheEnabledForRotation(bool isEnabled)
|
|||||||
mainThread_->PostTask(task);
|
mainThread_->PostTask(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSRenderServiceConnection::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
RSSystemProperties::SetDefaultDeviceRotationOffset(offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<ActiveDirtyRegionInfo> RSRenderServiceConnection::GetActiveDirtyRegionInfo()
|
std::vector<ActiveDirtyRegionInfo> RSRenderServiceConnection::GetActiveDirtyRegionInfo()
|
||||||
{
|
{
|
||||||
const auto& activeDirtyRegionInfos = GpuDirtyRegionCollection::GetInstance().GetActiveDirtyRegionInfo();
|
const auto& activeDirtyRegionInfos = GpuDirtyRegionCollection::GetInstance().GetActiveDirtyRegionInfo();
|
||||||
|
@ -263,8 +263,6 @@ private:
|
|||||||
|
|
||||||
void SetCacheEnabledForRotation(bool isEnabled) override;
|
void SetCacheEnabledForRotation(bool isEnabled) override;
|
||||||
|
|
||||||
void SetDefaultDeviceRotationOffset(uint32_t offset) override;
|
|
||||||
|
|
||||||
bool SetVirtualScreenStatus(ScreenId id, VirtualScreenStatus screenStatus) override;
|
bool SetVirtualScreenStatus(ScreenId id, VirtualScreenStatus screenStatus) override;
|
||||||
|
|
||||||
std::vector<ActiveDirtyRegionInfo> GetActiveDirtyRegionInfo() override;
|
std::vector<ActiveDirtyRegionInfo> GetActiveDirtyRegionInfo() override;
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
namespace Rosen {
|
namespace Rosen {
|
||||||
namespace {
|
namespace {
|
||||||
|
constexpr int32_t FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN = -90;
|
||||||
constexpr const char* CAPTURE_WINDOW_NAME = "CapsuleWindow";
|
constexpr const char* CAPTURE_WINDOW_NAME = "CapsuleWindow";
|
||||||
constexpr float GAMMA2_2 = 2.2f;
|
constexpr float GAMMA2_2 = 2.2f;
|
||||||
}
|
}
|
||||||
@ -551,7 +552,7 @@ BufferDrawParam RSUniRenderUtil::CreateBufferDrawParam(
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferDrawParam RSUniRenderUtil::CreateBufferDrawParamForRotationFixed(
|
BufferDrawParam RSUniRenderUtil::CreateBufferDrawParam(
|
||||||
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams)
|
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams)
|
||||||
{
|
{
|
||||||
BufferDrawParam params;
|
BufferDrawParam params;
|
||||||
@ -582,6 +583,11 @@ BufferDrawParam RSUniRenderUtil::CreateBufferDrawParamForRotationFixed(
|
|||||||
params.matrix = Drawing::Matrix();
|
params.matrix = Drawing::Matrix();
|
||||||
params.matrix.PreTranslate(static_cast<float>(dstRect.x), static_cast<float>(dstRect.y));
|
params.matrix.PreTranslate(static_cast<float>(dstRect.x), static_cast<float>(dstRect.y));
|
||||||
|
|
||||||
|
auto consumer = surfaceDrawable.GetConsumerOnDraw();
|
||||||
|
if (consumer == nullptr) {
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
auto layerTransform = renderParams.GetLayerInfo().transformType;
|
auto layerTransform = renderParams.GetLayerInfo().transformType;
|
||||||
int realRotation = RSBaseRenderUtil::RotateEnumToInt(RSBaseRenderUtil::GetRotateTransform(layerTransform));
|
int realRotation = RSBaseRenderUtil::RotateEnumToInt(RSBaseRenderUtil::GetRotateTransform(layerTransform));
|
||||||
auto flip = RSBaseRenderUtil::GetFlipTransform(layerTransform);
|
auto flip = RSBaseRenderUtil::GetFlipTransform(layerTransform);
|
||||||
@ -1332,10 +1338,14 @@ GraphicTransformType RSUniRenderUtil::GetRotateTransformForRotationFixed(RSSurfa
|
|||||||
auto transformType = RSBaseRenderUtil::GetRotateTransform(RSBaseRenderUtil::GetSurfaceBufferTransformType(
|
auto transformType = RSBaseRenderUtil::GetRotateTransform(RSBaseRenderUtil::GetSurfaceBufferTransformType(
|
||||||
node.GetRSSurfaceHandler()->GetConsumer(), node.GetRSSurfaceHandler()->GetBuffer()));
|
node.GetRSSurfaceHandler()->GetConsumer(), node.GetRSSurfaceHandler()->GetBuffer()));
|
||||||
int extraRotation = 0;
|
int extraRotation = 0;
|
||||||
int32_t rotationDegree = static_cast<int32_t>(RSSystemProperties::GetDefaultDeviceRotationOffset());
|
static int32_t rotationDegree = (system::GetParameter("const.build.product", "") == "ALT") ||
|
||||||
int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(
|
(system::GetParameter("const.build.product", "") == "ICL") ?
|
||||||
node.GetRenderProperties().GetBoundsGeometry()->GetAbsMatrix());
|
FIX_ROTATION_DEGREE_FOR_FOLD_SCREEN : 0;
|
||||||
extraRotation = degree - rotationDegree;
|
if (node.GetFixRotationByUser()) {
|
||||||
|
int degree = RSUniRenderUtil::GetRotationDegreeFromMatrix(
|
||||||
|
node.GetRenderProperties().GetBoundsGeometry()->GetAbsMatrix());
|
||||||
|
extraRotation = degree - rotationDegree;
|
||||||
|
}
|
||||||
transformType = static_cast<GraphicTransformType>(
|
transformType = static_cast<GraphicTransformType>(
|
||||||
(transformType + extraRotation / RS_ROTATION_90 + SCREEN_ROTATION_NUM) % SCREEN_ROTATION_NUM);
|
(transformType + extraRotation / RS_ROTATION_90 + SCREEN_ROTATION_NUM) % SCREEN_ROTATION_NUM);
|
||||||
return transformType;
|
return transformType;
|
||||||
@ -1388,12 +1398,7 @@ void RSUniRenderUtil::UpdateRealSrcRect(RSSurfaceRenderNode& node, const RectI&
|
|||||||
if (!consumer || !buffer) {
|
if (!consumer || !buffer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE;
|
auto transformType = RSUniRenderUtil::GetRotateTransformForRotationFixed(node, consumer);
|
||||||
if (node.GetFixRotationByUser()) {
|
|
||||||
transformType = RSUniRenderUtil::GetRotateTransformForRotationFixed(node, consumer);
|
|
||||||
} else {
|
|
||||||
transformType = RSBaseRenderUtil::GetRotateTransform(consumer->GetTransform());
|
|
||||||
}
|
|
||||||
auto srcRect = SrcRectRotateTransform(node, transformType);
|
auto srcRect = SrcRectRotateTransform(node, transformType);
|
||||||
const auto& property = node.GetRenderProperties();
|
const auto& property = node.GetRenderProperties();
|
||||||
const auto bufferWidth = buffer->GetSurfaceBufferWidth();
|
const auto bufferWidth = buffer->GetSurfaceBufferWidth();
|
||||||
@ -1549,7 +1554,9 @@ GraphicTransformType RSUniRenderUtil::GetLayerTransform(RSSurfaceRenderNode& nod
|
|||||||
return GraphicTransformType::GRAPHIC_ROTATE_NONE;
|
return GraphicTransformType::GRAPHIC_ROTATE_NONE;
|
||||||
}
|
}
|
||||||
auto consumer = surfaceHandler->GetConsumer();
|
auto consumer = surfaceHandler->GetConsumer();
|
||||||
int32_t rotationDegree = static_cast<int32_t>(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 :
|
int surfaceNodeRotation = node.GetFixRotationByUser() ? -1 * rotationDegree :
|
||||||
RSUniRenderUtil::GetRotationFromMatrix(node.GetTotalMatrix());
|
RSUniRenderUtil::GetRotationFromMatrix(node.GetTotalMatrix());
|
||||||
auto transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE;
|
auto transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE;
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
static BufferDrawParam CreateBufferDrawParam(const RSSurfaceHandler& surfaceHandler, bool forceCPU);
|
static BufferDrawParam CreateBufferDrawParam(const RSSurfaceHandler& surfaceHandler, bool forceCPU);
|
||||||
static BufferDrawParam CreateBufferDrawParam(
|
static BufferDrawParam CreateBufferDrawParam(
|
||||||
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, bool forceCPU, uint32_t threadIndex);
|
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, bool forceCPU, uint32_t threadIndex);
|
||||||
static BufferDrawParam CreateBufferDrawParamForRotationFixed(
|
static BufferDrawParam CreateBufferDrawParam(
|
||||||
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams);
|
const DrawableV2::RSSurfaceRenderNodeDrawable& surfaceDrawable, RSSurfaceRenderParams& renderParams);
|
||||||
static BufferDrawParam CreateLayerBufferDrawParam(const LayerInfoPtr& layer, bool forceCPU);
|
static BufferDrawParam CreateLayerBufferDrawParam(const LayerInfoPtr& layer, bool forceCPU);
|
||||||
static void DealWithRotationAndGravityForRotationFixed(GraphicTransformType transform, Gravity gravity,
|
static void DealWithRotationAndGravityForRotationFixed(GraphicTransformType transform, Gravity gravity,
|
||||||
|
@ -219,10 +219,6 @@ bool RSIRenderServiceConnectionInterfaceCodeAccessVerifier::IsExclusiveVerificat
|
|||||||
hasPermission = IsSystemApp();
|
hasPermission = IsSystemApp();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case static_cast<CodeUnderlyingType>(CodeEnumType::SET_DEFAULT_DEVICE_ROTATION_OFFSET): {
|
|
||||||
hasPermission = IsSystemCalling(codeEnumTypeName_ + "::SET_DEFAULT_DEVICE_ROTATION_OFFSET");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case static_cast<CodeUnderlyingType>(CodeEnumType::SET_SCREEN_REFRESH_RATE): {
|
case static_cast<CodeUnderlyingType>(CodeEnumType::SET_SCREEN_REFRESH_RATE): {
|
||||||
hasPermission = IsSystemCalling(codeEnumTypeName_ + "::SET_SCREEN_REFRESH_RATE");
|
hasPermission = IsSystemCalling(codeEnumTypeName_ + "::SET_SCREEN_REFRESH_RATE");
|
||||||
break;
|
break;
|
||||||
|
@ -123,7 +123,6 @@ static constexpr std::array descriptorCheckList = {
|
|||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK),
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::REGISTER_HGM_CFG_CALLBACK),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::REGISTER_HGM_CFG_CALLBACK),
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_ROTATION_CACHE_ENABLED),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_ROTATION_CACHE_ENABLED),
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_DEFAULT_DEVICE_ROTATION_OFFSET),
|
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_TP_FEATURE_CONFIG),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_TP_FEATURE_CONFIG),
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_VIRTUAL_SCREEN_USING_STATUS),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_VIRTUAL_SCREEN_USING_STATUS),
|
||||||
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::REFRESH_RATE_MODE_CHANGE_CALLBACK),
|
static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::REFRESH_RATE_MODE_CHANGE_CALLBACK),
|
||||||
@ -1586,11 +1585,6 @@ int RSRenderServiceConnectionStub::OnRemoteRequest(
|
|||||||
SetCacheEnabledForRotation(isEnabled);
|
SetCacheEnabledForRotation(isEnabled);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::SET_DEFAULT_DEVICE_ROTATION_OFFSET) : {
|
|
||||||
uint32_t offset = data.ReadUint32();
|
|
||||||
SetDefaultDeviceRotationOffset(offset);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::GET_ACTIVE_DIRTY_REGION_INFO) : {
|
case static_cast<uint32_t>(RSIRenderServiceConnectionInterfaceCode::GET_ACTIVE_DIRTY_REGION_INFO) : {
|
||||||
const auto& activeDirtyRegionInfos = GetActiveDirtyRegionInfo();
|
const auto& activeDirtyRegionInfos = GetActiveDirtyRegionInfo();
|
||||||
if (!reply.WriteInt32(activeDirtyRegionInfos.size())) {
|
if (!reply.WriteInt32(activeDirtyRegionInfos.size())) {
|
||||||
|
@ -169,8 +169,6 @@ public:
|
|||||||
static bool GetDrawTextAsBitmap();
|
static bool GetDrawTextAsBitmap();
|
||||||
static void SetCacheEnabledForRotation(bool flag);
|
static void SetCacheEnabledForRotation(bool flag);
|
||||||
static bool GetCacheEnabledForRotation();
|
static bool GetCacheEnabledForRotation();
|
||||||
static void SetDefaultDeviceRotationOffset(uint32_t offset);
|
|
||||||
static uint32_t GetDefaultDeviceRotationOffset();
|
|
||||||
static ParallelRenderingType GetPrepareParallelRenderingEnabled();
|
static ParallelRenderingType GetPrepareParallelRenderingEnabled();
|
||||||
static ParallelRenderingType GetParallelRenderingEnabled();
|
static ParallelRenderingType GetParallelRenderingEnabled();
|
||||||
static HgmRefreshRates GetHgmRefreshRatesEnabled();
|
static HgmRefreshRates GetHgmRefreshRatesEnabled();
|
||||||
@ -283,7 +281,6 @@ private:
|
|||||||
static inline bool isUniRenderEnabled_ = false;
|
static inline bool isUniRenderEnabled_ = false;
|
||||||
inline static bool isDrawTextAsBitmap_ = false;
|
inline static bool isDrawTextAsBitmap_ = false;
|
||||||
inline static bool cacheEnabledForRotation_ = false;
|
inline static bool cacheEnabledForRotation_ = false;
|
||||||
inline static std::atomic<uint32_t> defaultDeviceRotationOffset_ = 0;
|
|
||||||
static inline bool forceHpsBlurDisabled_ = false;
|
static inline bool forceHpsBlurDisabled_ = false;
|
||||||
static const GpuApiType systemGpuApiType_;
|
static const GpuApiType systemGpuApiType_;
|
||||||
static const DdgrOpincType ddgrOpincType_;
|
static const DdgrOpincType ddgrOpincType_;
|
||||||
|
@ -263,8 +263,6 @@ public:
|
|||||||
|
|
||||||
virtual void SetCacheEnabledForRotation(bool isEnabled) = 0;
|
virtual void SetCacheEnabledForRotation(bool isEnabled) = 0;
|
||||||
|
|
||||||
virtual void SetDefaultDeviceRotationOffset(uint32_t offset) = 0;
|
|
||||||
|
|
||||||
virtual void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) = 0;
|
virtual void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) = 0;
|
||||||
|
|
||||||
virtual void RunOnRemoteDiedCallback() = 0;
|
virtual void RunOnRemoteDiedCallback() = 0;
|
||||||
|
@ -108,7 +108,6 @@ enum class RSIRenderServiceConnectionInterfaceCode : CodeUnderlyingType {
|
|||||||
UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK,
|
UNREGISTER_SURFACE_OCCLUSION_CHANGE_CALLBACK,
|
||||||
REGISTER_HGM_CFG_CALLBACK,
|
REGISTER_HGM_CFG_CALLBACK,
|
||||||
SET_ROTATION_CACHE_ENABLED,
|
SET_ROTATION_CACHE_ENABLED,
|
||||||
SET_DEFAULT_DEVICE_ROTATION_OFFSET,
|
|
||||||
SET_TP_FEATURE_CONFIG,
|
SET_TP_FEATURE_CONFIG,
|
||||||
SET_VIRTUAL_SCREEN_USING_STATUS,
|
SET_VIRTUAL_SCREEN_USING_STATUS,
|
||||||
REFRESH_RATE_MODE_CHANGE_CALLBACK,
|
REFRESH_RATE_MODE_CHANGE_CALLBACK,
|
||||||
|
@ -319,8 +319,6 @@ public:
|
|||||||
|
|
||||||
void SetCacheEnabledForRotation(bool isEnabled);
|
void SetCacheEnabledForRotation(bool isEnabled);
|
||||||
|
|
||||||
void SetDefaultDeviceRotationOffset(uint32_t offset);
|
|
||||||
|
|
||||||
void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback);
|
void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback);
|
||||||
|
|
||||||
std::vector<ActiveDirtyRegionInfo> GetActiveDirtyRegionInfo();
|
std::vector<ActiveDirtyRegionInfo> GetActiveDirtyRegionInfo();
|
||||||
|
@ -523,10 +523,6 @@ void RSRenderServiceClient::SetCacheEnabledForRotation(bool isEnabled)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSRenderServiceClient::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -175,15 +175,6 @@ bool RSSystemProperties::GetCacheEnabledForRotation()
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t RSSystemProperties::SetDefaultDeviceRotationOffset()
|
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef NEW_SKIA
|
#ifndef NEW_SKIA
|
||||||
bool RSSystemProperties::GetReleaseResourceEnabled()
|
bool RSSystemProperties::GetReleaseResourceEnabled()
|
||||||
{
|
{
|
||||||
|
@ -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)
|
void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
||||||
{
|
{
|
||||||
auto renderService = RSRenderServiceConnectHub::GetRenderService();
|
auto renderService = RSRenderServiceConnectHub::GetRenderService();
|
||||||
|
@ -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<uint32_t>(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)
|
void RSRenderServiceConnectionProxy::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
||||||
{
|
{
|
||||||
OnRemoteDiedCallback_ = callback;
|
OnRemoteDiedCallback_ = callback;
|
||||||
|
@ -236,8 +236,6 @@ public:
|
|||||||
|
|
||||||
void SetCacheEnabledForRotation(bool isEnabled) override;
|
void SetCacheEnabledForRotation(bool isEnabled) override;
|
||||||
|
|
||||||
void SetDefaultDeviceRotationOffset(uint32_t offset) override;
|
|
||||||
|
|
||||||
void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) override;
|
void SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback) override;
|
||||||
|
|
||||||
void RunOnRemoteDiedCallback() override;
|
void RunOnRemoteDiedCallback() override;
|
||||||
|
@ -440,16 +440,6 @@ bool RSSystemProperties::GetCacheEnabledForRotation()
|
|||||||
return cacheEnabledForRotation_;
|
return cacheEnabledForRotation_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
defaultDeviceRotationOffset_ = offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t RSSystemProperties::GetDefaultDeviceRotationOffset()
|
|
||||||
{
|
|
||||||
return defaultDeviceRotationOffset_;
|
|
||||||
}
|
|
||||||
|
|
||||||
ParallelRenderingType RSSystemProperties::GetPrepareParallelRenderingEnabled()
|
ParallelRenderingType RSSystemProperties::GetPrepareParallelRenderingEnabled()
|
||||||
{
|
{
|
||||||
static ParallelRenderingType systemPropertiePrepareType = static_cast<ParallelRenderingType>(
|
static ParallelRenderingType systemPropertiePrepareType = static_cast<ParallelRenderingType>(
|
||||||
|
@ -523,10 +523,6 @@ void RSRenderServiceClient::SetCacheEnabledForRotation(bool isEnabled)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSRenderServiceClient::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
void RSRenderServiceClient::SetOnRemoteDiedCallback(const OnRemoteDiedCallback& callback)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -177,10 +177,6 @@ void RSSystemProperties::SetCacheEnabledForRotation(bool flag)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSSystemProperties::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool RSSystemProperties::GetCacheEnabledForRotation()
|
bool RSSystemProperties::GetCacheEnabledForRotation()
|
||||||
{
|
{
|
||||||
return {};
|
return {};
|
||||||
|
@ -584,11 +584,6 @@ void RSInterfaces::EnableCacheForRotation()
|
|||||||
renderServiceClient_->SetCacheEnabledForRotation(true);
|
renderServiceClient_->SetCacheEnabledForRotation(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSInterfaces::SetDefaultDeviceRotationOffset(uint32_t offset)
|
|
||||||
{
|
|
||||||
renderServiceClient_->SetDefaultDeviceRotationOffset(offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RSInterfaces::NotifyLightFactorStatus(bool isSafe)
|
void RSInterfaces::NotifyLightFactorStatus(bool isSafe)
|
||||||
{
|
{
|
||||||
renderServiceClient_->NotifyLightFactorStatus(isSafe);
|
renderServiceClient_->NotifyLightFactorStatus(isSafe);
|
||||||
|
@ -248,8 +248,6 @@ public:
|
|||||||
|
|
||||||
void ReportGameStateData(GameStateData info);
|
void ReportGameStateData(GameStateData info);
|
||||||
|
|
||||||
void SetDefaultDeviceRotationOffset(uint32_t offset);
|
|
||||||
|
|
||||||
void EnableCacheForRotation();
|
void EnableCacheForRotation();
|
||||||
|
|
||||||
void DisableCacheForRotation();
|
void DisableCacheForRotation();
|
||||||
|
@ -456,18 +456,6 @@ HWTEST_F(RSSystemPropertiesTest, GetCacheEnabledForRotation, TestSize.Level1)
|
|||||||
ASSERT_TRUE(RSSystemProperties::GetCacheEnabledForRotation());
|
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.name: GetPrepareParallelRenderingEnabled
|
||||||
* @tc.desc: GetPrepareParallelRenderingEnabled Test
|
* @tc.desc: GetPrepareParallelRenderingEnabled Test
|
||||||
|
Loading…
Reference in New Issue
Block a user