1 /* 2 * Copyright (c) 2021 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 HDI_BACKEND_HDI_LAYER_INFO_H 17 #define HDI_BACKEND_HDI_LAYER_INFO_H 18 19 #include <string> 20 #include <set> 21 #include "iconsumer_surface.h" 22 #include <surface.h> 23 #include <sync_fence.h> 24 #include "graphic_error.h" 25 #include "hdi_log.h" 26 #include "hdi_display_type.h" 27 28 namespace OHOS { 29 namespace Rosen { 30 static const std::map<GraphicTransformType, std::string> TransformTypeStrs = { 31 {GRAPHIC_ROTATE_NONE, "0 <no rotation>"}, 32 {GRAPHIC_ROTATE_90, "1 <rotation by 90 degrees>"}, 33 {GRAPHIC_ROTATE_180, "2 <rotation by 180 degrees>"}, 34 {GRAPHIC_ROTATE_270, "3 <rotation by 270 degrees>"}, 35 {GRAPHIC_FLIP_H, "4 <flip horizontally>"}, 36 {GRAPHIC_FLIP_V, "5 <flip vertically>"}, 37 {GRAPHIC_FLIP_H_ROT90, "6 <flip horizontally and rotate 90 degrees>"}, 38 {GRAPHIC_FLIP_V_ROT90, "7 <flip vertically and rotate 90 degrees>"}, 39 {GRAPHIC_FLIP_H_ROT180, "8 <flip horizontally and rotate 180 degrees>"}, 40 {GRAPHIC_FLIP_V_ROT180, "9 <flip vertically and rotate 180 degrees>"}, 41 {GRAPHIC_FLIP_H_ROT270, "10 <flip horizontally and rotate 270 degrees>"}, 42 {GRAPHIC_FLIP_V_ROT270, "11 <flip vertically and rotate 270 degrees>"}, 43 {GRAPHIC_ROTATE_BUTT, "12 <uninitialized>"}, 44 }; 45 46 static const std::map<GraphicCompositionType, std::string> CompositionTypeStrs = { 47 {GRAPHIC_COMPOSITION_CLIENT, "0 <client composistion>"}, 48 {GRAPHIC_COMPOSITION_DEVICE, "1 <device composistion>"}, 49 {GRAPHIC_COMPOSITION_CURSOR, "2 <cursor composistion>"}, 50 {GRAPHIC_COMPOSITION_VIDEO, "3 <video composistion>"}, 51 {GRAPHIC_COMPOSITION_DEVICE_CLEAR, "4 <device clear composistion>"}, 52 {GRAPHIC_COMPOSITION_CLIENT_CLEAR, "5 <client clear composistion>"}, 53 {GRAPHIC_COMPOSITION_TUNNEL, "6 <tunnel composistion>"}, 54 {GRAPHIC_COMPOSITION_SOLID_COLOR, "7 <layercolor composition>"}, 55 {GRAPHIC_COMPOSITION_BUTT, "8 <uninitialized>"}, 56 }; 57 58 static const std::map<GraphicBlendType, std::string> BlendTypeStrs = { 59 {GRAPHIC_BLEND_NONE, "0 <No blending>"}, 60 {GRAPHIC_BLEND_CLEAR, "1 <CLEAR blending>"}, 61 {GRAPHIC_BLEND_SRC, "2 <SRC blending>"}, 62 {GRAPHIC_BLEND_SRCOVER, "3 <SRC_OVER blending>"}, 63 {GRAPHIC_BLEND_DSTOVER, "4 <DST_OVER blending>"}, 64 {GRAPHIC_BLEND_SRCIN, "5 <SRC_IN blending>"}, 65 {GRAPHIC_BLEND_DSTIN, "6 <DST_IN blending>"}, 66 {GRAPHIC_BLEND_SRCOUT, "7 <SRC_OUT blending>"}, 67 {GRAPHIC_BLEND_DSTOUT, "8 <DST_OUT blending>"}, 68 {GRAPHIC_BLEND_SRCATOP, "9 <SRC_ATOP blending>"}, 69 {GRAPHIC_BLEND_DSTATOP, "10 <DST_ATOP blending>"}, 70 {GRAPHIC_BLEND_ADD, "11 <ADD blending>"}, 71 {GRAPHIC_BLEND_XOR, "12 <XOR blending>"}, 72 {GRAPHIC_BLEND_DST, "13 <DST blending>"}, 73 {GRAPHIC_BLEND_AKS, "14 <AKS blending>"}, 74 {GRAPHIC_BLEND_AKD, "15 <AKD blending>"}, 75 {GRAPHIC_BLEND_BUTT, "16 <Uninitialized>"}, 76 }; 77 78 class HdiLayerInfo { 79 public: 80 HdiLayerInfo() = default; 81 virtual ~HdiLayerInfo() = default; 82 83 enum class LayerMask { 84 LAYER_MASK_NORMAL = 0, 85 LAYER_MASK_HBM_SYNC = 1, // enable fingerprint 86 }; 87 88 /* rs create and set/get layer info begin */ CreateHdiLayerInfo()89 static std::shared_ptr<HdiLayerInfo> CreateHdiLayerInfo() 90 { 91 return std::make_shared<HdiLayerInfo>(); 92 } 93 SetSurface(const sptr<IConsumerSurface> & surface)94 void SetSurface(const sptr<IConsumerSurface> &surface) 95 { 96 cSurface_ = surface; 97 } 98 SetBuffer(const sptr<SurfaceBuffer> & sbuffer,const sptr<SyncFence> & acquireFence)99 void SetBuffer(const sptr<SurfaceBuffer> &sbuffer, const sptr<SyncFence> &acquireFence) 100 { 101 sbuffer_ = sbuffer; 102 acquireFence_ = acquireFence; 103 } 104 SetPreBuffer(const sptr<SurfaceBuffer> & buffer)105 void SetPreBuffer(const sptr<SurfaceBuffer> &buffer) 106 { 107 pbuffer_ = buffer; 108 } 109 SetZorder(int32_t zOrder)110 void SetZorder(int32_t zOrder) 111 { 112 zOrder_ = static_cast<uint32_t>(zOrder); 113 } 114 SetAlpha(const GraphicLayerAlpha & alpha)115 void SetAlpha(const GraphicLayerAlpha &alpha) 116 { 117 layerAlpha_ = alpha; 118 } 119 SetTransform(GraphicTransformType type)120 void SetTransform(GraphicTransformType type) 121 { 122 transformType_ = type; 123 } 124 SetCompositionType(GraphicCompositionType type)125 void SetCompositionType(GraphicCompositionType type) 126 { 127 compositionType_ = type; 128 } 129 SetVisibleRegions(const std::vector<GraphicIRect> & visibleRegions)130 void SetVisibleRegions(const std::vector<GraphicIRect> &visibleRegions) 131 { 132 std::lock_guard<std::mutex> lock(mutex_); 133 visibleRegions_ = visibleRegions; 134 } 135 SetDirtyRegions(const std::vector<GraphicIRect> & dirtyRegions)136 void SetDirtyRegions(const std::vector<GraphicIRect> &dirtyRegions) 137 { 138 std::lock_guard<std::mutex> lock(mutex_); 139 dirtyRegions_ = dirtyRegions; 140 } 141 SetBlendType(GraphicBlendType type)142 void SetBlendType(GraphicBlendType type) 143 { 144 blendType_ = type; 145 } 146 SetCropRect(const GraphicIRect & crop)147 void SetCropRect(const GraphicIRect &crop) 148 { 149 cropRect_ = crop; 150 } 151 SetPreMulti(bool preMulti)152 void SetPreMulti(bool preMulti) 153 { 154 preMulti_ = preMulti; 155 } 156 SetLayerSize(const GraphicIRect & layerRect)157 void SetLayerSize(const GraphicIRect &layerRect) 158 { 159 layerRect_ = layerRect; 160 } 161 SetBoundSize(const GraphicIRect & boundRect)162 void SetBoundSize(const GraphicIRect &boundRect) 163 { 164 boundRect_ = boundRect; 165 } 166 SetLayerColor(GraphicLayerColor layerColor)167 void SetLayerColor(GraphicLayerColor layerColor) 168 { 169 layerColor_ = layerColor; 170 } 171 SetBackgroundColor(GraphicLayerColor backgroundColor)172 void SetBackgroundColor(GraphicLayerColor backgroundColor) 173 { 174 backgroundColor_ = backgroundColor; 175 } 176 SetCornerRadiusInfoForDRM(const std::vector<float> & drmCornerRadiusInfo)177 void SetCornerRadiusInfoForDRM(const std::vector<float>& drmCornerRadiusInfo) 178 { 179 drmCornerRadiusInfo_ = drmCornerRadiusInfo; 180 } 181 SetColorTransform(const std::vector<float> & matrix)182 void SetColorTransform(const std::vector<float> &matrix) 183 { 184 colorTransformMatrix_ = matrix; 185 } 186 SetColorDataSpace(GraphicColorDataSpace colorSpace)187 void SetColorDataSpace(GraphicColorDataSpace colorSpace) 188 { 189 colorSpace_ = colorSpace; 190 } 191 SetMetaData(const std::vector<GraphicHDRMetaData> & metaData)192 void SetMetaData(const std::vector<GraphicHDRMetaData> &metaData) 193 { 194 metaData_ = metaData; 195 } 196 SetMetaDataSet(const GraphicHDRMetaDataSet & metaDataSet)197 void SetMetaDataSet(const GraphicHDRMetaDataSet &metaDataSet) 198 { 199 metaDataSet_ = metaDataSet; 200 } 201 SetMatrix(GraphicMatrix matrix)202 void SetMatrix(GraphicMatrix matrix) 203 { 204 matrix_ = matrix; 205 } 206 SetGravity(int32_t gravity)207 void SetGravity(int32_t gravity) 208 { 209 gravity_ = gravity; 210 } 211 SetUniRenderFlag(bool isUniRender)212 void SetUniRenderFlag(bool isUniRender) 213 { 214 isUniRender_ = isUniRender; 215 } 216 SetTunnelHandleChange(bool change)217 void SetTunnelHandleChange(bool change) 218 { 219 tunnelHandleChange_ = change; 220 } 221 SetTunnelHandle(const sptr<SurfaceTunnelHandle> & handle)222 void SetTunnelHandle(const sptr<SurfaceTunnelHandle> &handle) 223 { 224 tunnelHandle_ = handle; 225 } 226 IsSupportedPresentTimestamp()227 bool IsSupportedPresentTimestamp() const 228 { 229 return IsSupportedPresentTimestamp_; 230 } 231 GetPresentTimestamp()232 const GraphicPresentTimestamp &GetPresentTimestamp() 233 { 234 return presentTimestamp_; 235 } 236 237 /* rs create and set/get layer info end */ 238 239 /* hdiLayer get layer info begin */ GetSurface()240 sptr<IConsumerSurface> GetSurface() const 241 { 242 return cSurface_; 243 } 244 GetBuffer()245 sptr<SurfaceBuffer> GetBuffer() const 246 { 247 return sbuffer_; 248 } 249 GetPreBuffer()250 sptr<SurfaceBuffer> GetPreBuffer() const 251 { 252 return pbuffer_; 253 } 254 GetZorder()255 uint32_t GetZorder() const 256 { 257 return zOrder_; 258 } 259 GetAcquireFence()260 sptr<SyncFence> GetAcquireFence() const 261 { 262 return acquireFence_; 263 } 264 GetAlpha()265 const GraphicLayerAlpha &GetAlpha() 266 { 267 return layerAlpha_; 268 } 269 GetTransformType()270 GraphicTransformType GetTransformType() const 271 { 272 return transformType_; 273 } 274 GetCompositionType()275 GraphicCompositionType GetCompositionType() const 276 { 277 return compositionType_; 278 } 279 GetVisibleRegions()280 const std::vector<GraphicIRect> &GetVisibleRegions() 281 { 282 std::lock_guard<std::mutex> lock(mutex_); 283 return visibleRegions_; 284 } 285 GetDirtyRegions()286 const std::vector<GraphicIRect> &GetDirtyRegions() 287 { 288 std::lock_guard<std::mutex> lock(mutex_); 289 return dirtyRegions_; 290 } 291 GetBlendType()292 GraphicBlendType GetBlendType() const 293 { 294 return blendType_; 295 } 296 GetCropRect()297 const GraphicIRect &GetCropRect() 298 { 299 return cropRect_; 300 } 301 GetLayerSize()302 const GraphicIRect &GetLayerSize() 303 { 304 return layerRect_; 305 } 306 GetBoundSize()307 GraphicIRect GetBoundSize() const 308 { 309 return boundRect_; 310 } 311 GetMatrix()312 GraphicMatrix GetMatrix() const 313 { 314 return matrix_; 315 } 316 GetGravity()317 int32_t GetGravity() const 318 { 319 return gravity_; 320 } 321 GetUniRenderFlag()322 bool GetUniRenderFlag() const 323 { 324 return isUniRender_; 325 } 326 IsPreMulti()327 bool IsPreMulti() const 328 { 329 return preMulti_; 330 } 331 SetWindowsName(std::vector<std::string> & windowsName)332 void SetWindowsName(std::vector<std::string>& windowsName) 333 { 334 windowsName_ = windowsName; 335 } 336 GetWindowsName()337 const std::vector<std::string>& GetWindowsName() 338 { 339 return windowsName_; 340 } 341 GetColorTransform()342 const std::vector<float> &GetColorTransform() 343 { 344 return colorTransformMatrix_; 345 } 346 GetColorDataSpace()347 GraphicColorDataSpace GetColorDataSpace() const 348 { 349 return colorSpace_; 350 } 351 GetLayerColor()352 GraphicLayerColor GetLayerColor() const 353 { 354 return layerColor_; 355 } 356 GetBackgroundColor()357 GraphicLayerColor GetBackgroundColor() const 358 { 359 return backgroundColor_; 360 } 361 GetCornerRadiusInfoForDRM()362 const std::vector<float>& GetCornerRadiusInfoForDRM() const 363 { 364 return drmCornerRadiusInfo_; 365 } 366 GetMetaData()367 std::vector<GraphicHDRMetaData> &GetMetaData() 368 { 369 return metaData_; 370 } 371 GetMetaDataSet()372 GraphicHDRMetaDataSet &GetMetaDataSet() 373 { 374 return metaDataSet_; 375 } 376 GetTunnelHandleChange()377 bool GetTunnelHandleChange() const 378 { 379 return tunnelHandleChange_; 380 } 381 GetTunnelHandle()382 sptr<SurfaceTunnelHandle> GetTunnelHandle() const 383 { 384 return tunnelHandle_; 385 } 386 SetIsSupportedPresentTimestamp(bool isSupported)387 void SetIsSupportedPresentTimestamp(bool isSupported) 388 { 389 IsSupportedPresentTimestamp_ = isSupported; 390 } 391 SetPresentTimestamp(const GraphicPresentTimestamp & timestamp)392 void SetPresentTimestamp(const GraphicPresentTimestamp ×tamp) 393 { 394 presentTimestamp_ = timestamp; 395 } 396 GetSdrNit()397 float GetSdrNit() const 398 { 399 return sdrNit_; 400 } 401 GetDisplayNit()402 float GetDisplayNit() const 403 { 404 return displayNit_; 405 } 406 GetBrightnessRatio()407 float GetBrightnessRatio() const 408 { 409 return brightnessRatio_; 410 } 411 SetSdrNit(float sdrNit)412 void SetSdrNit(float sdrNit) 413 { 414 sdrNit_ = sdrNit; 415 } 416 SetDisplayNit(float displayNit)417 void SetDisplayNit(float displayNit) 418 { 419 displayNit_ = displayNit; 420 } 421 SetBrightnessRatio(float brightnessRatio)422 void SetBrightnessRatio(float brightnessRatio) 423 { 424 brightnessRatio_ = brightnessRatio; 425 } 426 427 // source crop tuning GetLayerSourceTuning()428 int32_t GetLayerSourceTuning() const 429 { 430 return layerSource_; 431 } 432 SetLayerSourceTuning(int32_t layerSouce)433 void SetLayerSourceTuning(int32_t layerSouce) 434 { 435 layerSource_ = layerSouce; 436 } 437 SetClearCacheSet(const std::set<int32_t> & clearCacheSet)438 void SetClearCacheSet(const std::set<int32_t>& clearCacheSet) 439 { 440 clearCacheSet_ = clearCacheSet; 441 } 442 GetClearCacheSet()443 std::set<int32_t> GetClearCacheSet() const 444 { 445 return clearCacheSet_; 446 } 447 SetRotationFixed(bool rotationFixed)448 void SetRotationFixed(bool rotationFixed) 449 { 450 rotationFixed_ = rotationFixed; 451 } 452 GetRotationFixed()453 bool GetRotationFixed() const 454 { 455 return rotationFixed_; 456 } 457 SetLayerArsr(bool arsrTag)458 void SetLayerArsr(bool arsrTag) 459 { 460 arsrTag_ = arsrTag; 461 } 462 GetLayerArsr()463 bool GetLayerArsr() const 464 { 465 return arsrTag_; 466 } 467 CopyLayerInfo(const std::shared_ptr<HdiLayerInfo> & layerInfo)468 void CopyLayerInfo(const std::shared_ptr<HdiLayerInfo> &layerInfo) 469 { 470 std::lock_guard<std::mutex> lock(mutex_); 471 zOrder_ = layerInfo->GetZorder(); 472 layerRect_ = layerInfo->GetLayerSize(); 473 boundRect_ = layerInfo->GetBoundSize(); 474 visibleRegions_ = layerInfo->GetVisibleRegions(); 475 dirtyRegions_ = layerInfo->GetDirtyRegions(); 476 cropRect_ = layerInfo->GetCropRect(); 477 matrix_ = layerInfo->GetMatrix(); 478 gravity_ = layerInfo->GetGravity(); 479 layerAlpha_ = layerInfo->GetAlpha(); 480 transformType_ = layerInfo->GetTransformType(); 481 compositionType_ = layerInfo->GetCompositionType(); 482 blendType_ = layerInfo->GetBlendType(); 483 colorTransformMatrix_ = layerInfo->GetColorTransform(); 484 colorSpace_ = layerInfo->GetColorDataSpace(); 485 layerColor_ = layerInfo->GetLayerColor(); 486 metaData_ = layerInfo->GetMetaData(); 487 metaDataSet_ = layerInfo->GetMetaDataSet(); 488 tunnelHandle_ = layerInfo->GetTunnelHandle(); 489 tunnelHandleChange_ = layerInfo->GetTunnelHandleChange(); 490 sbuffer_ = layerInfo->GetBuffer(); 491 pbuffer_= layerInfo->GetPreBuffer(); 492 acquireFence_ = layerInfo->GetAcquireFence(); 493 preMulti_ = layerInfo->IsPreMulti(); 494 displayNit_ = layerInfo->GetDisplayNit(); 495 brightnessRatio_ = layerInfo->GetBrightnessRatio(); 496 layerSource_ = layerInfo->GetLayerSourceTuning(); 497 clearCacheSet_ = layerInfo->GetClearCacheSet(); 498 rotationFixed_ = layerInfo->GetRotationFixed(); 499 arsrTag_ = layerInfo->GetLayerArsr(); 500 } 501 Dump(std::string & result)502 void Dump(std::string &result) const 503 { 504 std::lock_guard<std::mutex> lock(mutex_); 505 if (TransformTypeStrs.find(transformType_) != TransformTypeStrs.end() && 506 CompositionTypeStrs.find(compositionType_) != CompositionTypeStrs.end() && 507 BlendTypeStrs.find(blendType_) != BlendTypeStrs.end()) { 508 result += " zOrder = " + std::to_string(zOrder_) + 509 ", visibleNum = " + std::to_string(visibleRegions_.size()) + 510 ", transformType = " + TransformTypeStrs.at(transformType_) + 511 ", compositionType = " + CompositionTypeStrs.at(compositionType_) + 512 ", blendType = " + BlendTypeStrs.at(blendType_) + 513 ", layerAlpha = [enGlobalAlpha(" + std::to_string(layerAlpha_.enGlobalAlpha) + "), enPixelAlpha(" + 514 std::to_string(layerAlpha_.enPixelAlpha) + "), alpha0(" + 515 std::to_string(layerAlpha_.alpha0) + "), alpha1(" + 516 std::to_string(layerAlpha_.alpha1) + "), gAlpha(" + 517 std::to_string(layerAlpha_.gAlpha) + ")].\n"; 518 } 519 result += " layerRect = [" + std::to_string(layerRect_.x) + ", " + 520 std::to_string(layerRect_.y) + ", " + 521 std::to_string(layerRect_.w) + ", " + 522 std::to_string(layerRect_.h) + "], "; 523 result += "cropRect = [" + std::to_string(cropRect_.x) + ", " + 524 std::to_string(cropRect_.y) + ", " + 525 std::to_string(cropRect_.w) + ", " + 526 std::to_string(cropRect_.h) + "],"; 527 for (decltype(visibleRegions_.size()) i = 0; i < visibleRegions_.size(); i++) { 528 result += "visibleRegions[" + std::to_string(i) + "] = [" + 529 std::to_string(visibleRegions_[i].x) + ", " + 530 std::to_string(visibleRegions_[i].y) + ", " + 531 std::to_string(visibleRegions_[i].w) + ", " + 532 std::to_string(visibleRegions_[i].h) + "], "; 533 } 534 for (decltype(dirtyRegions_.size()) i = 0; i < dirtyRegions_.size(); i++) { 535 result += "dirtyRegions[" + std::to_string(i) + "] = [" + 536 std::to_string(dirtyRegions_[i].x) + ", " + 537 std::to_string(dirtyRegions_[i].y) + ", " + 538 std::to_string(dirtyRegions_[i].w) + ", " + 539 std::to_string(dirtyRegions_[i].h) + "], "; 540 } 541 result += "layerColor = [R:" + std::to_string(layerColor_.r) + ", G:" + 542 std::to_string(layerColor_.g) + ", B:" + 543 std::to_string(layerColor_.b) + ", A:" + 544 std::to_string(layerColor_.a) + "],"; 545 if (cSurface_ != nullptr) { 546 cSurface_->Dump(result); 547 } 548 result += " displayNit = " + std::to_string(displayNit_) + 549 ", brightnessRatio = " + std::to_string(brightnessRatio_) + ", "; 550 } 551 SetLayerMaskInfo(LayerMask mask)552 RosenError SetLayerMaskInfo(LayerMask mask) 553 { 554 switch (mask) { 555 case LayerMask::LAYER_MASK_NORMAL: 556 case LayerMask::LAYER_MASK_HBM_SYNC: 557 break; 558 default: 559 HLOGE("Invalid argument [mask:%{public}d]", static_cast<int32_t>(mask)); 560 return ROSEN_ERROR_INVALID_ARGUMENTS; 561 } 562 563 layerMask_ = mask; 564 return ROSEN_ERROR_OK; 565 } 566 GetLayerMaskInfo()567 LayerMask GetLayerMaskInfo() 568 { 569 return layerMask_; 570 } 571 GetNodeId()572 inline uint64_t GetNodeId() 573 { 574 return nodeId_; 575 } 576 SetNodeId(uint64_t nodeId)577 void SetNodeId(uint64_t nodeId) 578 { 579 nodeId_ = nodeId; 580 } 581 /* hdiLayer get layer info end */ 582 583 private: 584 uint32_t zOrder_ = 0; 585 GraphicIRect layerRect_; 586 GraphicIRect boundRect_; // node's bound width and height related to this layer, used for uni render redraw 587 std::vector<GraphicIRect> visibleRegions_; 588 std::vector<GraphicIRect> dirtyRegions_; 589 GraphicIRect cropRect_; 590 GraphicMatrix matrix_; // matrix used for uni render redraw 591 int32_t gravity_; // used for uni render redraw 592 bool isUniRender_ = false; // true for uni render layer (DisplayNode) 593 GraphicLayerAlpha layerAlpha_; 594 GraphicTransformType transformType_ = GraphicTransformType::GRAPHIC_ROTATE_BUTT; 595 GraphicCompositionType compositionType_; 596 GraphicBlendType blendType_; 597 std::vector<float> colorTransformMatrix_; 598 GraphicLayerColor layerColor_; 599 GraphicLayerColor backgroundColor_; 600 GraphicColorDataSpace colorSpace_ = GraphicColorDataSpace::GRAPHIC_COLOR_DATA_SPACE_UNKNOWN; 601 std::vector<GraphicHDRMetaData> metaData_; 602 GraphicHDRMetaDataSet metaDataSet_; 603 sptr<SurfaceTunnelHandle> tunnelHandle_ = nullptr; 604 std::vector<std::string> windowsName_; 605 bool tunnelHandleChange_ = false; 606 bool IsSupportedPresentTimestamp_ = false; 607 GraphicPresentTimestamp presentTimestamp_ = {GRAPHIC_DISPLAY_PTS_UNSUPPORTED, 0}; 608 609 sptr<IConsumerSurface> cSurface_ = nullptr; 610 sptr<SyncFence> acquireFence_ = SyncFence::InvalidFence(); 611 sptr<SurfaceBuffer> sbuffer_ = nullptr; 612 sptr<SurfaceBuffer> pbuffer_ = nullptr; 613 bool preMulti_ = false; 614 LayerMask layerMask_ = LayerMask::LAYER_MASK_NORMAL; 615 mutable std::mutex mutex_; 616 int32_t sdrNit_ = 500; // default sdr nit 617 int32_t displayNit_ = 500; // default luminance for sdr 618 float brightnessRatio_ = 1.0f; // default ratio for sdr 619 uint64_t nodeId_ = 0; 620 int32_t layerSource_ = 0; // default layer source tag 621 std::set<int32_t> clearCacheSet_; 622 bool rotationFixed_ = false; 623 bool arsrTag_ = true; 624 std::vector<float> drmCornerRadiusInfo_; 625 }; 626 } // namespace Rosen 627 } // namespace OHOS 628 629 #endif // HDI_BACKEND_HDI_LAYER_INFO_H