• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 &timestamp)
393     {
394         presentTimestamp_ = timestamp;
395     }
396 
GetSdrNit()397     int32_t GetSdrNit() const
398     {
399         return sdrNit_;
400     }
401 
GetDisplayNit()402     int32_t GetDisplayNit() const
403     {
404         return displayNit_;
405     }
406 
GetBrightnessRatio()407     float GetBrightnessRatio() const
408     {
409         return brightnessRatio_;
410     }
411 
SetSdrNit(int32_t sdrNit)412     int32_t SetSdrNit(int32_t sdrNit)
413     {
414         return sdrNit_ = sdrNit;
415     }
416 
SetDisplayNit(int32_t displayNit)417     int32_t SetDisplayNit(int32_t displayNit)
418     {
419         return displayNit_ = displayNit;
420     }
421 
SetBrightnessRatio(float brightnessRatio)422     int32_t SetBrightnessRatio(float brightnessRatio)
423     {
424         return brightnessRatio_ = brightnessRatio;
425     }
426 
SetScalingMode(ScalingMode scalingMode)427     void SetScalingMode(ScalingMode scalingMode)
428     {
429         scalingMode_ = scalingMode;
430     }
431 
GetScalingMode()432     ScalingMode GetScalingMode() const
433     {
434         return scalingMode_;
435     }
436     // source crop tuning
GetLayerSourceTuning()437     int32_t GetLayerSourceTuning() const
438     {
439         return layerSource_;
440     }
441 
SetLayerSourceTuning(int32_t layerSouce)442     void SetLayerSourceTuning(int32_t layerSouce)
443     {
444         layerSource_ = layerSouce;
445     }
446 
SetClearCacheSet(const std::set<int32_t> & clearCacheSet)447     void SetClearCacheSet(const std::set<int32_t>& clearCacheSet)
448     {
449         clearCacheSet_ = clearCacheSet;
450     }
451 
GetClearCacheSet()452     std::set<int32_t> GetClearCacheSet() const
453     {
454         return clearCacheSet_;
455     }
456 
SetRotationFixed(bool rotationFixed)457     void SetRotationFixed(bool rotationFixed)
458     {
459         rotationFixed_ = rotationFixed;
460     }
461 
GetRotationFixed()462     bool GetRotationFixed() const
463     {
464         return rotationFixed_;
465     }
466 
SetLayerArsr(bool arsrTag)467     void SetLayerArsr(bool arsrTag)
468     {
469         arsrTag_ = arsrTag;
470     }
471 
GetLayerArsr()472     bool GetLayerArsr() const
473     {
474         return arsrTag_;
475     }
476 
CopyLayerInfo(const std::shared_ptr<HdiLayerInfo> & layerInfo)477     void CopyLayerInfo(const std::shared_ptr<HdiLayerInfo> &layerInfo)
478     {
479         std::lock_guard<std::mutex> lock(mutex_);
480         zOrder_ = layerInfo->GetZorder();
481         layerRect_ = layerInfo->GetLayerSize();
482         boundRect_ = layerInfo->GetBoundSize();
483         visibleRegions_ = layerInfo->GetVisibleRegions();
484         dirtyRegions_ = layerInfo->GetDirtyRegions();
485         cropRect_ = layerInfo->GetCropRect();
486         matrix_ = layerInfo->GetMatrix();
487         gravity_ = layerInfo->GetGravity();
488         layerAlpha_ = layerInfo->GetAlpha();
489         transformType_ = layerInfo->GetTransformType();
490         compositionType_ = layerInfo->GetCompositionType();
491         blendType_ = layerInfo->GetBlendType();
492         colorTransformMatrix_ = layerInfo->GetColorTransform();
493         colorSpace_ = layerInfo->GetColorDataSpace();
494         layerColor_ = layerInfo->GetLayerColor();
495         metaData_ = layerInfo->GetMetaData();
496         metaDataSet_ = layerInfo->GetMetaDataSet();
497         tunnelHandle_ = layerInfo->GetTunnelHandle();
498         tunnelHandleChange_ = layerInfo->GetTunnelHandleChange();
499         sbuffer_ = layerInfo->GetBuffer();
500         pbuffer_= layerInfo->GetPreBuffer();
501         acquireFence_ = layerInfo->GetAcquireFence();
502         preMulti_ = layerInfo->IsPreMulti();
503         displayNit_ = layerInfo->GetDisplayNit();
504         brightnessRatio_ = layerInfo->GetBrightnessRatio();
505         scalingMode_ = layerInfo->GetScalingMode();
506         layerSource_ = layerInfo->GetLayerSourceTuning();
507         clearCacheSet_ = layerInfo->GetClearCacheSet();
508         rotationFixed_ = layerInfo->GetRotationFixed();
509         arsrTag_ = layerInfo->GetLayerArsr();
510     }
511 
Dump(std::string & result)512     void Dump(std::string &result) const
513     {
514         std::lock_guard<std::mutex> lock(mutex_);
515         if (TransformTypeStrs.find(transformType_) != TransformTypeStrs.end() &&
516             CompositionTypeStrs.find(compositionType_) != CompositionTypeStrs.end() &&
517             BlendTypeStrs.find(blendType_) != BlendTypeStrs.end()) {
518             result += " zOrder = " + std::to_string(zOrder_) +
519                 ", visibleNum = " + std::to_string(visibleRegions_.size()) +
520                 ", transformType = " + TransformTypeStrs.at(transformType_) +
521                 ", compositionType = " + CompositionTypeStrs.at(compositionType_) +
522                 ", blendType = " + BlendTypeStrs.at(blendType_) +
523                 ", layerAlpha = [enGlobalAlpha(" + std::to_string(layerAlpha_.enGlobalAlpha) + "), enPixelAlpha(" +
524                 std::to_string(layerAlpha_.enPixelAlpha) + "), alpha0(" +
525                 std::to_string(layerAlpha_.alpha0) + "), alpha1(" +
526                 std::to_string(layerAlpha_.alpha1) + "), gAlpha(" +
527                 std::to_string(layerAlpha_.gAlpha) + ")].\n";
528         }
529         result += " layerRect = [" + std::to_string(layerRect_.x) + ", " +
530             std::to_string(layerRect_.y) + ", " +
531             std::to_string(layerRect_.w) + ", " +
532             std::to_string(layerRect_.h) + "], ";
533         result += "cropRect = [" + std::to_string(cropRect_.x) + ", " +
534             std::to_string(cropRect_.y) + ", " +
535             std::to_string(cropRect_.w) + ", " +
536             std::to_string(cropRect_.h) + "],";
537         for (decltype(visibleRegions_.size()) i = 0; i < visibleRegions_.size(); i++) {
538             result += "visibleRegions[" + std::to_string(i) + "] = [" +
539                 std::to_string(visibleRegions_[i].x) + ", " +
540                 std::to_string(visibleRegions_[i].y) + ", " +
541                 std::to_string(visibleRegions_[i].w) + ", " +
542                 std::to_string(visibleRegions_[i].h) + "], ";
543         }
544         for (decltype(dirtyRegions_.size()) i = 0; i < dirtyRegions_.size(); i++) {
545             result += "dirtyRegions[" + std::to_string(i) + "] = [" +
546                 std::to_string(dirtyRegions_[i].x) + ", " +
547                 std::to_string(dirtyRegions_[i].y) + ", " +
548                 std::to_string(dirtyRegions_[i].w) + ", " +
549                 std::to_string(dirtyRegions_[i].h) + "], ";
550         }
551         if (cSurface_ != nullptr) {
552             cSurface_->Dump(result);
553         }
554         result += " displayNit = " + std::to_string(displayNit_) +
555             ", brightnessRatio = " + std::to_string(brightnessRatio_) + ", ";
556     }
557 
SetLayerMaskInfo(LayerMask mask)558     RosenError SetLayerMaskInfo(LayerMask mask)
559     {
560         switch (mask) {
561             case LayerMask::LAYER_MASK_NORMAL:
562             case LayerMask::LAYER_MASK_HBM_SYNC:
563                 break;
564             default:
565                 HLOGE("Invalid argument [mask:%{public}d]", static_cast<int32_t>(mask));
566                 return ROSEN_ERROR_INVALID_ARGUMENTS;
567         }
568 
569         layerMask_ = mask;
570         return ROSEN_ERROR_OK;
571     }
572 
GetLayerMaskInfo()573     LayerMask GetLayerMaskInfo()
574     {
575         return layerMask_;
576     }
577 
GetNodeId()578     inline uint64_t GetNodeId()
579     {
580         return nodeId_;
581     }
582 
SetNodeId(uint64_t nodeId)583     void SetNodeId(uint64_t nodeId)
584     {
585         nodeId_ = nodeId;
586     }
587     /* hdiLayer get layer info end */
588 
589 private:
590     uint32_t zOrder_ = 0;
591     GraphicIRect layerRect_;
592     GraphicIRect boundRect_; // node's bound width and height related to this layer, used for uni render redraw
593     std::vector<GraphicIRect> visibleRegions_;
594     std::vector<GraphicIRect> dirtyRegions_;
595     GraphicIRect cropRect_;
596     GraphicMatrix matrix_; // matrix used for uni render redraw
597     int32_t gravity_; // used for uni render redraw
598     bool isUniRender_ = false; // true for uni render layer (DisplayNode)
599     GraphicLayerAlpha layerAlpha_;
600     GraphicTransformType transformType_ = GraphicTransformType::GRAPHIC_ROTATE_BUTT;
601     GraphicCompositionType compositionType_;
602     GraphicBlendType blendType_;
603     std::vector<float> colorTransformMatrix_;
604     GraphicLayerColor layerColor_;
605     GraphicLayerColor backgroundColor_;
606     GraphicColorDataSpace colorSpace_ = GraphicColorDataSpace::GRAPHIC_COLOR_DATA_SPACE_UNKNOWN;
607     std::vector<GraphicHDRMetaData> metaData_;
608     GraphicHDRMetaDataSet metaDataSet_;
609     sptr<SurfaceTunnelHandle> tunnelHandle_ = nullptr;
610     std::vector<std::string> windowsName_;
611     bool tunnelHandleChange_ = false;
612     bool IsSupportedPresentTimestamp_ = false;
613     GraphicPresentTimestamp presentTimestamp_ = {GRAPHIC_DISPLAY_PTS_UNSUPPORTED, 0};
614 
615     sptr<IConsumerSurface> cSurface_ = nullptr;
616     sptr<SyncFence> acquireFence_ = SyncFence::InvalidFence();
617     sptr<SurfaceBuffer> sbuffer_ = nullptr;
618     sptr<SurfaceBuffer> pbuffer_ = nullptr;
619     bool preMulti_ = false;
620     LayerMask layerMask_ = LayerMask::LAYER_MASK_NORMAL;
621     mutable std::mutex mutex_;
622     int32_t sdrNit_ = 500; // default sdr nit
623     int32_t displayNit_ = 500; // default luminance for sdr
624     float brightnessRatio_ = 1.0f; // default ratio for sdr
625     uint64_t nodeId_ = 0;
626     ScalingMode scalingMode_;
627     int32_t layerSource_ = 0; // default layer source tag
628     std::set<int32_t> clearCacheSet_;
629     bool rotationFixed_ = false;
630     bool arsrTag_ = true;
631     std::vector<float> drmCornerRadiusInfo_;
632 };
633 } // namespace Rosen
634 } // namespace OHOS
635 
636 #endif // HDI_BACKEND_HDI_LAYER_INFO_H