1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef RENDER_SERVICE_BASE_PARAMS_RS_SURFACE_RENDER_PARAMS_H 17 #define RENDER_SERVICE_BASE_PARAMS_RS_SURFACE_RENDER_PARAMS_H 18 19 #include <memory> 20 #include <string> 21 22 #include "common/rs_occlusion_region.h" 23 #include "drawable/rs_render_node_drawable_adapter.h" 24 #include "params/rs_render_params.h" 25 #include "pipeline/rs_base_render_node.h" 26 #ifndef ROSEN_CROSS_PLATFORM 27 #include "surface_buffer.h" 28 #include "sync_fence.h" 29 #endif 30 #include "surface_type.h" 31 32 namespace OHOS::Rosen { 33 class RSSurfaceRenderNode; 34 struct RSLayerInfo { 35 #ifndef ROSEN_CROSS_PLATFORM 36 GraphicIRect srcRect; 37 GraphicIRect dstRect; 38 GraphicIRect boundRect; 39 Drawing::Matrix matrix; 40 int32_t gravity = 0; 41 int32_t zOrder = 0; 42 float alpha = 1.f; 43 GraphicBlendType blendType; 44 GraphicTransformType transformType = GraphicTransformType::GRAPHIC_ROTATE_NONE; 45 int32_t layerSource; 46 bool arsrTag = true; 47 48 bool operator==(const RSLayerInfo& layerInfo) const 49 { 50 return (srcRect == layerInfo.srcRect) && (dstRect == layerInfo.dstRect) && 51 (boundRect == layerInfo.boundRect) && (matrix == layerInfo.matrix) && (gravity == layerInfo.gravity) && 52 (zOrder == layerInfo.zOrder) && (blendType == layerInfo.blendType) && 53 (transformType == layerInfo.transformType) && (ROSEN_EQ(alpha, layerInfo.alpha)) && 54 (layerSource == layerInfo.layerSource) && (arsrTag == layerInfo.arsrTag); 55 } 56 #endif 57 }; 58 struct RSWindowInfo { 59 bool isMainWindowType_ = false; 60 bool isLeashWindow_ = false; 61 bool isAppWindow_ = false; SetWindowInfoRSWindowInfo62 void SetWindowInfo(bool isMainWindowType, bool isLeashWindow, bool isAppWindow) 63 { 64 isMainWindowType_ = isMainWindowType; 65 isLeashWindow_ = isLeashWindow; 66 isAppWindow_ = isAppWindow; 67 } 68 }; 69 class RSB_EXPORT RSSurfaceRenderParams : public RSRenderParams { 70 public: 71 explicit RSSurfaceRenderParams(NodeId id); 72 ~RSSurfaceRenderParams() override = default; IsMainWindowType()73 inline bool IsMainWindowType() const 74 { 75 return windowInfo_.isMainWindowType_; 76 } IsLeashWindow()77 inline bool IsLeashWindow() const override 78 { 79 return windowInfo_.isLeashWindow_; 80 } IsAppWindow()81 bool IsAppWindow() const override 82 { 83 return windowInfo_.isAppWindow_; 84 } SetWindowInfo(bool isMainWindowType,bool isLeashWindow,bool isAppWindow)85 void SetWindowInfo(bool isMainWindowType, bool isLeashWindow, bool isAppWindow) 86 { 87 windowInfo_.SetWindowInfo(isMainWindowType, isLeashWindow, isAppWindow); 88 } GetSurfaceNodeType()89 RSSurfaceNodeType GetSurfaceNodeType() const 90 { 91 return rsSurfaceNodeType_; 92 } GetSelfDrawingNodeType()93 SelfDrawingNodeType GetSelfDrawingNodeType() const 94 { 95 return selfDrawingType_; 96 } SetAncestorDisplayNode(const RSRenderNode::WeakPtr & ancestorDisplayNode)97 void SetAncestorDisplayNode(const RSRenderNode::WeakPtr& ancestorDisplayNode) 98 { 99 ancestorDisplayNode_ = ancestorDisplayNode; 100 auto node = ancestorDisplayNode.lock(); 101 ancestorDisplayDrawable_ = node ? node->GetRenderDrawable() : nullptr; 102 } 103 GetAncestorDisplayNode()104 RSRenderNode::WeakPtr GetAncestorDisplayNode() const 105 { 106 return ancestorDisplayNode_; 107 } GetAncestorDisplayDrawable()108 DrawableV2::RSRenderNodeDrawableAdapter::WeakPtr GetAncestorDisplayDrawable() const 109 { 110 return ancestorDisplayDrawable_; 111 } 112 GetAlpha()113 float GetAlpha() const 114 { 115 return alpha_; 116 } IsSpherizeValid()117 bool IsSpherizeValid() const 118 { 119 return isSpherizeValid_; 120 } IsAttractionValid()121 bool IsAttractionValid() const 122 { 123 return isAttractionValid_; 124 } NeedBilinearInterpolation()125 bool NeedBilinearInterpolation() const 126 { 127 return needBilinearInterpolation_; 128 } GetBackgroundColor()129 const Color& GetBackgroundColor() const 130 { 131 return backgroundColor_; 132 } GetAbsDrawRect()133 const RectI& GetAbsDrawRect() const override 134 { 135 return absDrawRect_; 136 } GetRRect()137 const RRect& GetRRect() const 138 { 139 return rrect_; 140 } 141 GetIsSecurityLayer()142 bool GetIsSecurityLayer() const 143 { 144 return isSecurityLayer_; 145 } GetIsSkipLayer()146 bool GetIsSkipLayer() const 147 { 148 return isSkipLayer_; 149 } GetIsSnapshotSkipLayer()150 bool GetIsSnapshotSkipLayer() const 151 { 152 return isSnapshotSkipLayer_; 153 } GetIsProtectedLayer()154 bool GetIsProtectedLayer() const 155 { 156 return isProtectedLayer_; 157 } GetAnimateState()158 bool GetAnimateState() const 159 { 160 return animateState_; 161 } GetSecurityLayerIds()162 const std::set<NodeId>& GetSecurityLayerIds() const 163 { 164 return securityLayerIds_; 165 } GetSkipLayerIds()166 const std::set<NodeId>& GetSkipLayerIds() const 167 { 168 return skipLayerIds_; 169 } GetSnapshotSkipLayerIds()170 const std::set<NodeId>& GetSnapshotSkipLayerIds() const 171 { 172 return snapshotSkipLayerIds_; 173 } HasSecurityLayer()174 bool HasSecurityLayer() 175 { 176 return securityLayerIds_.size() != 0; 177 } HasSkipLayer()178 bool HasSkipLayer() 179 { 180 return skipLayerIds_.size() != 0; 181 } HasSnapshotSkipLayer()182 bool HasSnapshotSkipLayer() 183 { 184 return snapshotSkipLayerIds_.size() != 0; 185 } HasProtectedLayer()186 bool HasProtectedLayer() 187 { 188 return protectedLayerIds_.size() != 0; 189 } HasPrivacyContentLayer()190 bool HasPrivacyContentLayer() 191 { 192 return privacyContentLayerIds_.size() != 0; 193 } 194 GetLeashPersistentId()195 LeashPersistentId GetLeashPersistentId() const 196 { 197 return leashPersistentId_; 198 } 199 GetName()200 std::string GetName() const 201 { 202 return name_; 203 } 204 SetLeashWindowVisibleRegionEmptyParam(bool isLeashWindowVisibleRegionEmpty)205 void SetLeashWindowVisibleRegionEmptyParam(bool isLeashWindowVisibleRegionEmpty) 206 { 207 if (isLeashWindowVisibleRegionEmpty_ == isLeashWindowVisibleRegionEmpty) { 208 return; 209 } 210 isLeashWindowVisibleRegionEmpty_ = isLeashWindowVisibleRegionEmpty; 211 needSync_ = true; 212 } 213 GetLeashWindowVisibleRegionEmptyParam()214 bool GetLeashWindowVisibleRegionEmptyParam() const 215 { 216 return isLeashWindowVisibleRegionEmpty_; 217 } 218 SetUifirstNodeEnableParam(MultiThreadCacheType isUifirst)219 void SetUifirstNodeEnableParam(MultiThreadCacheType isUifirst) 220 { 221 if (uiFirstFlag_ == isUifirst) { 222 return; 223 } 224 uiFirstFlag_ = isUifirst; 225 needSync_ = true; 226 } 227 GetUifirstNodeEnableParam()228 MultiThreadCacheType GetUifirstNodeEnableParam() const 229 { 230 return uiFirstFlag_; 231 } 232 SetBufferClearCacheSet(const std::set<int32_t> bufferCacheSet)233 void SetBufferClearCacheSet(const std::set<int32_t> bufferCacheSet) 234 { 235 if (bufferCacheSet.size() > 0) { 236 bufferCacheSet_ = bufferCacheSet; 237 needSync_ = true; 238 } 239 } 240 GetBufferClearCacheSet()241 const std::set<int32_t> GetBufferClearCacheSet() 242 { 243 return bufferCacheSet_; 244 } 245 SetIsParentUifirstNodeEnableParam(bool isUifirstParent)246 void SetIsParentUifirstNodeEnableParam(bool isUifirstParent) 247 { 248 if (uiFirstParentFlag_ == isUifirstParent) { 249 return; 250 } 251 uiFirstParentFlag_ = isUifirstParent; 252 needSync_ = true; 253 } 254 SetUifirstUseStarting(NodeId id)255 void SetUifirstUseStarting(NodeId id) 256 { 257 if (uifirstUseStarting_ == id) { 258 return; 259 } 260 uifirstUseStarting_ = id; 261 needSync_ = true; 262 } 263 GetUifirstUseStarting()264 NodeId GetUifirstUseStarting() const 265 { 266 return uifirstUseStarting_; 267 } 268 SetUifirstChildrenDirtyRectParam(const RectI & rect)269 void SetUifirstChildrenDirtyRectParam(const RectI& rect) 270 { 271 childrenDirtyRect_ = rect; 272 needSync_ = true; 273 } 274 GetUifirstChildrenDirtyRectParam()275 RectI& GetUifirstChildrenDirtyRectParam() 276 { 277 return childrenDirtyRect_; 278 } GetDstRect()279 const RectI& GetDstRect() const 280 { 281 return dstRect_; 282 } 283 void SetSurfaceCacheContentStatic(bool contentStatic, bool lastFrameSynced); 284 bool GetSurfaceCacheContentStatic() const; 285 bool GetPreSurfaceCacheContentStatic() const; 286 287 float GetPositionZ() const; 288 289 void SetSurfaceSubTreeDirty(bool isSubTreeDirty); 290 bool GetSurfaceSubTreeDirty() const; 291 GetParentUifirstNodeEnableParam()292 bool GetParentUifirstNodeEnableParam() 293 { 294 return uiFirstParentFlag_; 295 } 296 SetUIFirstFrameGravity(Gravity gravity)297 void SetUIFirstFrameGravity(Gravity gravity) 298 { 299 if (uiFirstFrameGravity_ == gravity) { 300 return; 301 } 302 uiFirstFrameGravity_ = gravity; 303 needSync_ = true; 304 } 305 GetUIFirstFrameGravity()306 Gravity GetUIFirstFrameGravity() const 307 { 308 return uiFirstFrameGravity_; 309 } 310 311 void SetOcclusionVisible(bool visible); 312 bool GetOcclusionVisible() const override; 313 314 void SetIsParentScaling(bool isParentScaling); 315 bool IsParentScaling() const; 316 317 void SetTransparentRegion(const Occlusion::Region& transparentRegion); 318 const Occlusion::Region& GetTransparentRegion() const; 319 320 void SetOldDirtyInSurface(const RectI& oldDirtyInSurface) override; 321 RectI GetOldDirtyInSurface() const override; 322 323 void SetVisibleRegion(const Occlusion::Region& visibleRegion); 324 Occlusion::Region GetVisibleRegion() const override; 325 326 void SetVisibleRegionInVirtual(const Occlusion::Region& visibleRegion); 327 Occlusion::Region GetVisibleRegionInVirtual() const; 328 329 void SetOccludedByFilterCache(bool val); 330 bool GetOccludedByFilterCache() const; 331 332 void SetFilterCacheFullyCovered(bool val); 333 bool GetFilterCacheFullyCovered() const; 334 335 const std::vector<NodeId>& GetVisibleFilterChild() const; 336 bool IsTransparent() const; 337 void CheckValidFilterCacheFullyCoverTarget( 338 bool isFilterCacheValidForOcclusion, const RectI& filterCachedRect, const RectI& targetRect); 339 340 void SetLayerInfo(const RSLayerInfo& layerInfo); 341 const RSLayerInfo& GetLayerInfo() const override; 342 void SetHardwareEnabled(bool enabled); 343 bool GetHardwareEnabled() const override; 344 void SetNeedMakeImage(bool enabled); 345 bool GetNeedMakeImage() const override; 346 void SetLastFrameHardwareEnabled(bool enabled); 347 bool GetLastFrameHardwareEnabled() const override; 348 void SetFixRotationByUser(bool flag); 349 bool GetFixRotationByUser() const; 350 void SetInFixedRotation(bool flag); 351 bool IsInFixedRotation() const; 352 // source crop tuning 353 void SetLayerSourceTuning(int32_t needSourceTuning); 354 int32_t GetLayerSourceTuning() const; 355 356 void SetGpuOverDrawBufferOptimizeNode(bool overDrawNode); 357 bool IsGpuOverDrawBufferOptimizeNode() const; 358 void SetOverDrawBufferNodeCornerRadius(const Vector4f& radius); 359 const Vector4f& GetOverDrawBufferNodeCornerRadius() const; 360 361 void SetIsSubSurfaceNode(bool isSubSurfaceNode); 362 bool IsSubSurfaceNode() const; 363 364 void SetIsNodeToBeCaptured(bool isNodeToBeCaptured); 365 bool IsNodeToBeCaptured() const; 366 367 void SetSkipDraw(bool skip); 368 bool GetSkipDraw() const; 369 370 void SetHidePrivacyContent(bool needHidePrivacyContent); 371 bool GetHidePrivacyContent() const; 372 373 void SetLayerTop(bool isTop); 374 bool IsLayerTop() const; 375 376 bool IsVisibleDirtyRegionEmpty(const Drawing::Region curSurfaceDrawRegion) const; 377 378 #ifndef ROSEN_CROSS_PLATFORM 379 void SetBuffer(const sptr<SurfaceBuffer>& buffer, const Rect& damageRect) override; 380 sptr<SurfaceBuffer> GetBuffer() const override; 381 void SetPreBuffer(const sptr<SurfaceBuffer>& preBuffer) override; 382 sptr<SurfaceBuffer> GetPreBuffer() override; 383 void SetAcquireFence(const sptr<SyncFence>& acquireFence) override; 384 sptr<SyncFence> GetAcquireFence() const override; 385 const Rect& GetBufferDamage() const override; SetBufferSynced(bool bufferSynced)386 inline void SetBufferSynced(bool bufferSynced) 387 { 388 bufferSynced_ = bufferSynced; 389 } IsBufferSynced()390 bool IsBufferSynced() const 391 { 392 return bufferSynced_; 393 } 394 #endif 395 396 virtual void OnSync(const std::unique_ptr<RSRenderParams>& target) override; 397 398 // DFX 399 std::string ToString() const override; 400 // Set/Get OpaqueRegion, currently only used for DFX 401 void SetOpaqueRegion(const Occlusion::Region& opaqueRegion); 402 const Occlusion::Region& GetOpaqueRegion() const; 403 SetNeedOffscreen(bool needOffscreen)404 void SetNeedOffscreen(bool needOffscreen) 405 { 406 if (needOffscreen_ == needOffscreen) { 407 return; 408 } 409 needOffscreen_ = needOffscreen; 410 needSync_ = true; 411 } 412 GetNeedOffscreen()413 bool GetNeedOffscreen() const 414 { 415 return RSSystemProperties::GetSurfaceOffscreenEnadbled() ? needOffscreen_ : false; 416 } 417 SetLayerCreated(bool layerCreated)418 void SetLayerCreated(bool layerCreated) override 419 { 420 layerCreated_ = layerCreated; 421 } 422 GetLayerCreated()423 bool GetLayerCreated() const override 424 { 425 return layerCreated_; 426 } SetTotalMatrix(const Drawing::Matrix & totalMatrix)427 void SetTotalMatrix(const Drawing::Matrix& totalMatrix) override 428 { 429 if (totalMatrix_ == totalMatrix) { 430 return; 431 } 432 totalMatrix_ = totalMatrix; 433 needSync_ = true; 434 } GetTotalMatrix()435 const Drawing::Matrix& GetTotalMatrix() override 436 { 437 return totalMatrix_; 438 } SetFingerprint(bool hasFingerprint)439 void SetFingerprint(bool hasFingerprint) override 440 { 441 if (hasFingerprint_ == hasFingerprint) { 442 return; 443 } 444 hasFingerprint_ = hasFingerprint; 445 needSync_ = true; 446 } GetFingerprint()447 bool GetFingerprint() override { 448 return false; 449 } 450 SetCornerRadiusInfoForDRM(const std::vector<float> & drmCornerRadiusInfo)451 void SetCornerRadiusInfoForDRM(const std::vector<float>& drmCornerRadiusInfo) 452 { 453 if (drmCornerRadiusInfo_ == drmCornerRadiusInfo) { 454 return; 455 } 456 drmCornerRadiusInfo_ = drmCornerRadiusInfo; 457 needSync_ = true; 458 } 459 GetCornerRadiusInfoForDRM()460 const std::vector<float>& GetCornerRadiusInfoForDRM() const 461 { 462 return drmCornerRadiusInfo_; 463 } 464 SetSdrNit(float sdrNit)465 void SetSdrNit(float sdrNit) 466 { 467 if (ROSEN_EQ(sdrNit_, sdrNit)) { 468 return; 469 } 470 sdrNit_ = sdrNit; 471 needSync_ = true; 472 } 473 GetSdrNit()474 float GetSdrNit() const 475 { 476 return sdrNit_; 477 } 478 SetDisplayNit(float displayNit)479 void SetDisplayNit(float displayNit) 480 { 481 if (ROSEN_EQ(displayNit_, displayNit)) { 482 return; 483 } 484 displayNit_ = displayNit; 485 needSync_ = true; 486 } 487 GetDisplayNit()488 float GetDisplayNit() const 489 { 490 return displayNit_; 491 } 492 SetBrightnessRatio(float brightnessRatio)493 void SetBrightnessRatio(float brightnessRatio) 494 { 495 if (ROSEN_EQ(brightnessRatio_, brightnessRatio)) { 496 return; 497 } 498 brightnessRatio_ = brightnessRatio; 499 needSync_ = true; 500 } 501 GetBrightnessRatio()502 float GetBrightnessRatio() const 503 { 504 return brightnessRatio_; 505 } 506 HasSubSurfaceNodes()507 inline bool HasSubSurfaceNodes() const 508 { 509 return hasSubSurfaceNodes_; 510 } GetAllSubSurfaceNodeIds()511 const std::unordered_set<NodeId>& GetAllSubSurfaceNodeIds() const 512 { 513 return allSubSurfaceNodeIds_; 514 } GetIsHwcEnabledBySolidLayer()515 bool GetIsHwcEnabledBySolidLayer() 516 { 517 return isHwcEnabledBySolidLayer_; 518 } 519 SetIsHwcEnabledBySolidLayer(bool isHwcEnabledBySolidLayer)520 void SetIsHwcEnabledBySolidLayer(bool isHwcEnabledBySolidLayer) 521 { 522 isHwcEnabledBySolidLayer_ = isHwcEnabledBySolidLayer; 523 } 524 SetApiCompatibleVersion(uint32_t apiCompatibleVersion)525 void SetApiCompatibleVersion(uint32_t apiCompatibleVersion) 526 { 527 if (ROSEN_EQ(apiCompatibleVersion_, apiCompatibleVersion)) { 528 return; 529 } 530 apiCompatibleVersion_ = apiCompatibleVersion; 531 needSync_ = true; 532 } GetApiCompatibleVersion()533 uint32_t GetApiCompatibleVersion() const 534 { 535 return apiCompatibleVersion_; 536 } 537 538 void SetNeedCacheSurface(bool needCacheSurface); 539 bool GetNeedCacheSurface() const; 540 MarkSurfaceCapturePipeline()541 void MarkSurfaceCapturePipeline() 542 { 543 isSurfaceCapturePipeline_ = true; 544 } 545 546 protected: 547 private: 548 RSSurfaceNodeType rsSurfaceNodeType_ = RSSurfaceNodeType::DEFAULT; 549 SelfDrawingNodeType selfDrawingType_ = SelfDrawingNodeType::DEFAULT; 550 RSRenderNode::WeakPtr ancestorDisplayNode_; 551 DrawableV2::RSRenderNodeDrawableAdapter::WeakPtr ancestorDisplayDrawable_; 552 553 float alpha_ = 0; 554 bool isTransparent_ = false; 555 bool isSpherizeValid_ = false; 556 bool isAttractionValid_ = false; 557 bool isParentScaling_ = false; 558 bool needBilinearInterpolation_ = false; 559 MultiThreadCacheType uiFirstFlag_ = MultiThreadCacheType::NONE; 560 bool uiFirstParentFlag_ = false; 561 NodeId uifirstUseStarting_ = INVALID_NODEID; 562 Color backgroundColor_ = RgbPalette::Transparent(); 563 bool isHwcEnabledBySolidLayer_ = false; 564 565 RectI dstRect_; 566 RectI oldDirtyInSurface_; 567 RectI childrenDirtyRect_; 568 RectI absDrawRect_; 569 RRect rrect_; 570 Occlusion::Region transparentRegion_; 571 Occlusion::Region opaqueRegion_; 572 573 LeashPersistentId leashPersistentId_ = INVALID_LEASH_PERSISTENTID; 574 575 bool surfaceCacheContentStatic_ = false; 576 bool preSurfaceCacheContentStatic_ = false; 577 bool isSubTreeDirty_ = false; 578 float positionZ_ = 0.0f; 579 bool occlusionVisible_ = false; 580 bool isLeashWindowVisibleRegionEmpty_ = false; 581 Occlusion::Region visibleRegion_; 582 Occlusion::Region visibleRegionInVirtual_; 583 bool isOccludedByFilterCache_ = false; 584 // if current surfaceNode has filter cache to occlude the back surfaceNode 585 bool isFilterCacheFullyCovered_ = false; 586 std::vector<NodeId> visibleFilterChild_; 587 RSLayerInfo layerInfo_; 588 RSWindowInfo windowInfo_; 589 #ifndef ROSEN_CROSS_PLATFORM 590 sptr<SurfaceBuffer> buffer_ = nullptr; 591 sptr<SurfaceBuffer> preBuffer_ = nullptr; 592 sptr<SyncFence> acquireFence_ = SyncFence::InvalidFence(); 593 Rect damageRect_ = {0, 0, 0, 0}; 594 bool bufferSynced_ = true; 595 #endif 596 bool isHardwareEnabled_ = false; 597 bool needMakeImage_ = false; 598 bool isLastFrameHardwareEnabled_ = false; 599 bool isFixRotationByUser_ = false; 600 bool isInFixedRotation_ = false; 601 int32_t releaseInHardwareThreadTaskNum_ = 0; 602 bool isSecurityLayer_ = false; 603 bool isSkipLayer_ = false; 604 bool isSnapshotSkipLayer_ = false; 605 bool isProtectedLayer_ = false; 606 bool animateState_ = false; 607 bool isSubSurfaceNode_ = false; 608 Gravity uiFirstFrameGravity_ = Gravity::TOP_LEFT; 609 bool isNodeToBeCaptured_ = false; 610 std::set<NodeId> skipLayerIds_= {}; 611 std::set<NodeId> snapshotSkipLayerIds_= {}; 612 std::set<NodeId> securityLayerIds_= {}; 613 std::set<NodeId> protectedLayerIds_= {}; 614 std::set<NodeId> privacyContentLayerIds_ = {}; 615 std::set<int32_t> bufferCacheSet_ = {}; 616 std::string name_= ""; 617 Vector4f overDrawBufferNodeCornerRadius_; 618 bool isGpuOverDrawBufferOptimizeNode_ = false; 619 bool isSkipDraw_ = false; 620 bool isLayerTop_ = false; 621 bool needHidePrivacyContent_ = false; 622 bool needOffscreen_ = false; 623 bool layerCreated_ = false; 624 int32_t layerSource_ = 0; 625 std::vector<float> drmCornerRadiusInfo_; 626 627 Drawing::Matrix totalMatrix_; 628 float globalAlpha_ = 1.0f; 629 bool hasFingerprint_ = false; 630 // hdr 631 float sdrNit_ = 500.0f; // default sdrNit 632 float displayNit_ = 500.0f; // default displayNit_ 633 float brightnessRatio_ = 1.0f; // 1.0f means no discount. 634 bool needCacheSurface_ = false; 635 636 bool hasSubSurfaceNodes_ = false; 637 std::unordered_set<NodeId> allSubSurfaceNodeIds_ = {}; 638 639 uint32_t apiCompatibleVersion_ = 0; 640 641 bool isSurfaceCapturePipeline_ = false; 642 643 friend class RSSurfaceRenderNode; 644 friend class RSUniRenderProcessor; 645 friend class RSUniRenderThread; 646 }; 647 } // namespace OHOS::Rosen 648 #endif // RENDER_SERVICE_BASE_PARAMS_RS_SURFACE_RENDER_PARAMS_H 649