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 #include "params/rs_surface_render_params.h"
17 #include "rs_trace.h"
18
19 namespace OHOS::Rosen {
RSSurfaceRenderParams(NodeId id)20 RSSurfaceRenderParams::RSSurfaceRenderParams(NodeId id) : RSRenderParams(id) {}
21
SetOcclusionVisible(bool visible)22 void RSSurfaceRenderParams::SetOcclusionVisible(bool visible)
23 {
24 if (occlusionVisible_ == visible) {
25 return;
26 }
27 occlusionVisible_ = visible;
28 needSync_ = true;
29 }
30
GetOcclusionVisible() const31 bool RSSurfaceRenderParams::GetOcclusionVisible() const
32 {
33 return occlusionVisible_;
34 }
35
SetOldDirtyInSurface(const RectI & oldDirtyInSurface)36 void RSSurfaceRenderParams::SetOldDirtyInSurface(const RectI& oldDirtyInSurface)
37 {
38 oldDirtyInSurface_ = oldDirtyInSurface;
39 }
40
GetOldDirtyInSurface() const41 RectI RSSurfaceRenderParams::GetOldDirtyInSurface() const
42 {
43 return oldDirtyInSurface_;
44 }
45
SetIsParentScaling(bool isParentScaling)46 void RSSurfaceRenderParams::SetIsParentScaling(bool isParentScaling)
47 {
48 isParentScaling_ = isParentScaling;
49 }
50
IsParentScaling() const51 bool RSSurfaceRenderParams::IsParentScaling() const
52 {
53 return isParentScaling_;
54 }
55
SetTransparentRegion(const Occlusion::Region & transparentRegion)56 void RSSurfaceRenderParams::SetTransparentRegion(const Occlusion::Region& transparentRegion)
57 {
58 transparentRegion_ = transparentRegion;
59 }
60
GetTransparentRegion() const61 const Occlusion::Region& RSSurfaceRenderParams::GetTransparentRegion() const
62 {
63 return transparentRegion_;
64 }
65
GetVisibleRegion() const66 Occlusion::Region RSSurfaceRenderParams::GetVisibleRegion() const
67 {
68 return visibleRegion_;
69 }
70
SetVisibleRegion(const Occlusion::Region & visibleRegion)71 void RSSurfaceRenderParams::SetVisibleRegion(const Occlusion::Region& visibleRegion)
72 {
73 visibleRegion_ = visibleRegion;
74 needSync_ = true;
75 }
76
GetVisibleRegionInVirtual() const77 Occlusion::Region RSSurfaceRenderParams::GetVisibleRegionInVirtual() const
78 {
79 return visibleRegionInVirtual_;
80 }
81
SetVisibleRegionInVirtual(const Occlusion::Region & visibleRegion)82 void RSSurfaceRenderParams::SetVisibleRegionInVirtual(const Occlusion::Region& visibleRegion)
83 {
84 visibleRegionInVirtual_ = visibleRegion;
85 needSync_ = true;
86 }
87
SetOccludedByFilterCache(bool val)88 void RSSurfaceRenderParams::SetOccludedByFilterCache(bool val)
89 {
90 if (isOccludedByFilterCache_ == val) {
91 return;
92 }
93 isOccludedByFilterCache_ = val;
94 needSync_ = true;
95 }
96
GetOccludedByFilterCache() const97 bool RSSurfaceRenderParams::GetOccludedByFilterCache() const
98 {
99 return isOccludedByFilterCache_;
100 }
101
SetFilterCacheFullyCovered(bool val)102 void RSSurfaceRenderParams::SetFilterCacheFullyCovered(bool val)
103 {
104 isFilterCacheFullyCovered_ = val;
105 }
106
GetFilterCacheFullyCovered() const107 bool RSSurfaceRenderParams::GetFilterCacheFullyCovered() const
108 {
109 return isFilterCacheFullyCovered_;
110 }
111
GetVisibleFilterChild() const112 const std::vector<NodeId>& RSSurfaceRenderParams::GetVisibleFilterChild() const
113 {
114 return visibleFilterChild_;
115 }
116
IsTransparent() const117 bool RSSurfaceRenderParams::IsTransparent() const
118 {
119 return isTransparent_;
120 }
121
CheckValidFilterCacheFullyCoverTarget(bool isFilterCacheValidForOcclusion,const RectI & filterCachedRect,const RectI & targetRect)122 void RSSurfaceRenderParams::CheckValidFilterCacheFullyCoverTarget(
123 bool isFilterCacheValidForOcclusion, const RectI& filterCachedRect, const RectI& targetRect)
124 {
125 if (isFilterCacheFullyCovered_ || !isFilterCacheValidForOcclusion) {
126 return;
127 }
128 // AbsRect may not update here, so use filterCachedRegion to occlude
129 isFilterCacheFullyCovered_ = targetRect.IsInsideOf(filterCachedRect);
130 }
131
SetLayerInfo(const RSLayerInfo & layerInfo)132 void RSSurfaceRenderParams::SetLayerInfo(const RSLayerInfo& layerInfo)
133 {
134 #ifndef ROSEN_CROSS_PLATFORM
135 layerInfo_ = layerInfo;
136 needSync_ = true;
137 dirtyType_.set(RSRenderParamsDirtyType::LAYER_INFO_DIRTY);
138 #endif
139 }
140
GetLayerInfo() const141 const RSLayerInfo& RSSurfaceRenderParams::GetLayerInfo() const
142 {
143 return layerInfo_;
144 }
145
SetHidePrivacyContent(bool needHidePrivacyContent)146 void RSSurfaceRenderParams::SetHidePrivacyContent(bool needHidePrivacyContent)
147 {
148 needHidePrivacyContent_ = needHidePrivacyContent;
149 }
150
GetHidePrivacyContent() const151 bool RSSurfaceRenderParams::GetHidePrivacyContent() const
152 {
153 return needHidePrivacyContent_;
154 }
155
SetHardwareEnabled(bool enabled)156 void RSSurfaceRenderParams::SetHardwareEnabled(bool enabled)
157 {
158 if (isHardwareEnabled_ == enabled) {
159 return;
160 }
161 isHardwareEnabled_ = enabled;
162 needSync_ = true;
163 }
164
GetHardwareEnabled() const165 bool RSSurfaceRenderParams::GetHardwareEnabled() const
166 {
167 return isHardwareEnabled_;
168 }
169
SetHardCursorStatus(bool status)170 void RSSurfaceRenderParams::SetHardCursorStatus(bool status)
171 {
172 if (isHardCursor_ == status) {
173 return;
174 }
175 isHardCursor_ = status;
176 needSync_ = true;
177 }
178
GetHardCursorStatus() const179 bool RSSurfaceRenderParams::GetHardCursorStatus() const
180 {
181 return isHardCursor_;
182 }
183
SetLastFrameHardwareEnabled(bool enabled)184 void RSSurfaceRenderParams::SetLastFrameHardwareEnabled(bool enabled)
185 {
186 if (isLastFrameHardwareEnabled_ == enabled) {
187 return;
188 }
189 isLastFrameHardwareEnabled_ = enabled;
190 needSync_ = true;
191 }
192
SetLayerSourceTuning(int32_t needSourceTuning)193 void RSSurfaceRenderParams::SetLayerSourceTuning(int32_t needSourceTuning)
194 {
195 if (layerSource_ == needSourceTuning) {
196 return;
197 }
198 layerSource_ = needSourceTuning;
199 needSync_ = true;
200 }
201
GetLayerSourceTuning() const202 int32_t RSSurfaceRenderParams::GetLayerSourceTuning() const
203 {
204 return layerSource_;
205 }
206
GetLastFrameHardwareEnabled() const207 bool RSSurfaceRenderParams::GetLastFrameHardwareEnabled() const
208 {
209 return isLastFrameHardwareEnabled_;
210 }
211
SetFixRotationByUser(bool flag)212 void RSSurfaceRenderParams::SetFixRotationByUser(bool flag)
213 {
214 if (isFixRotationByUser_ == flag) {
215 return;
216 }
217 isFixRotationByUser_ = flag;
218 needSync_ = true;
219 }
220
GetFixRotationByUser() const221 bool RSSurfaceRenderParams::GetFixRotationByUser() const
222 {
223 return isFixRotationByUser_;
224 }
225
SetInFixedRotation(bool flag)226 void RSSurfaceRenderParams::SetInFixedRotation(bool flag)
227 {
228 if (isInFixedRotation_ == flag) {
229 return;
230 }
231 isInFixedRotation_ = flag;
232 needSync_ = true;
233 }
234
IsInFixedRotation() const235 bool RSSurfaceRenderParams::IsInFixedRotation() const
236 {
237 return isInFixedRotation_;
238 }
239
240 #ifndef ROSEN_CROSS_PLATFORM
SetBuffer(const sptr<SurfaceBuffer> & buffer,const Rect & damageRect)241 void RSSurfaceRenderParams::SetBuffer(const sptr<SurfaceBuffer>& buffer, const Rect& damageRect)
242 {
243 buffer_ = buffer;
244 damageRect_ = damageRect;
245 needSync_ = true;
246 if (GetParamsType() == RSRenderParamsType::RS_PARAM_OWNED_BY_DRAWABLE) {
247 return;
248 }
249 dirtyType_.set(RSRenderParamsDirtyType::BUFFER_INFO_DIRTY);
250 }
251
GetBuffer() const252 sptr<SurfaceBuffer> RSSurfaceRenderParams::GetBuffer() const
253 {
254 return buffer_;
255 }
256
GetBufferDamage() const257 const Rect& RSSurfaceRenderParams::GetBufferDamage() const
258 {
259 return damageRect_;
260 }
261
SetPreBuffer(const sptr<SurfaceBuffer> & preBuffer)262 void RSSurfaceRenderParams::SetPreBuffer(const sptr<SurfaceBuffer>& preBuffer)
263 {
264 preBuffer_ = preBuffer;
265 needSync_ = true;
266 if (GetParamsType() == RSRenderParamsType::RS_PARAM_OWNED_BY_DRAWABLE) {
267 return;
268 }
269 dirtyType_.set(RSRenderParamsDirtyType::BUFFER_INFO_DIRTY);
270 }
271
GetPreBuffer()272 sptr<SurfaceBuffer> RSSurfaceRenderParams::GetPreBuffer()
273 {
274 return preBuffer_;
275 }
276
SetAcquireFence(const sptr<SyncFence> & acquireFence)277 void RSSurfaceRenderParams::SetAcquireFence(const sptr<SyncFence>& acquireFence)
278 {
279 acquireFence_ = acquireFence;
280 needSync_ = true;
281 dirtyType_.set(RSRenderParamsDirtyType::BUFFER_INFO_DIRTY);
282 }
283
GetAcquireFence() const284 sptr<SyncFence> RSSurfaceRenderParams::GetAcquireFence() const
285 {
286 return acquireFence_;
287 }
288 #endif
289
GetPreSurfaceCacheContentStatic() const290 bool RSSurfaceRenderParams::GetPreSurfaceCacheContentStatic() const
291 {
292 return preSurfaceCacheContentStatic_;
293 }
294
SetSurfaceCacheContentStatic(bool contentStatic,bool lastFrameSynced)295 void RSSurfaceRenderParams::SetSurfaceCacheContentStatic(bool contentStatic, bool lastFrameSynced)
296 {
297 // 1. don't sync while contentStatic not change
298 if (surfaceCacheContentStatic_ == contentStatic) {
299 return;
300 }
301 // 2. don't sync while last frame isn't static and skip sync
302 if (!surfaceCacheContentStatic_ && !lastFrameSynced) {
303 return;
304 }
305 preSurfaceCacheContentStatic_ = surfaceCacheContentStatic_;
306 surfaceCacheContentStatic_ = contentStatic;
307 needSync_ = true;
308 }
309
GetSurfaceCacheContentStatic() const310 bool RSSurfaceRenderParams::GetSurfaceCacheContentStatic() const
311 {
312 return surfaceCacheContentStatic_;
313 }
314
GetPositionZ() const315 float RSSurfaceRenderParams::GetPositionZ() const
316 {
317 return positionZ_;
318 }
319
SetSurfaceSubTreeDirty(bool isSubTreeDirty)320 void RSSurfaceRenderParams::SetSurfaceSubTreeDirty(bool isSubTreeDirty)
321 {
322 if (isSubTreeDirty_ == isSubTreeDirty) {
323 return;
324 }
325 isSubTreeDirty_ = isSubTreeDirty;
326 needSync_ = true;
327 }
328
GetSurfaceSubTreeDirty() const329 bool RSSurfaceRenderParams::GetSurfaceSubTreeDirty() const
330 {
331 return isSubTreeDirty_;
332 }
333
SetGpuOverDrawBufferOptimizeNode(bool overDrawNode)334 void RSSurfaceRenderParams::SetGpuOverDrawBufferOptimizeNode(bool overDrawNode)
335 {
336 if (isGpuOverDrawBufferOptimizeNode_ == overDrawNode) {
337 return;
338 }
339 isGpuOverDrawBufferOptimizeNode_ = overDrawNode;
340 needSync_ = true;
341 }
342
IsGpuOverDrawBufferOptimizeNode() const343 bool RSSurfaceRenderParams::IsGpuOverDrawBufferOptimizeNode() const
344 {
345 return isGpuOverDrawBufferOptimizeNode_;
346 }
347
SetOverDrawBufferNodeCornerRadius(const Vector4f & radius)348 void RSSurfaceRenderParams::SetOverDrawBufferNodeCornerRadius(const Vector4f& radius)
349 {
350 if (overDrawBufferNodeCornerRadius_ == radius) {
351 return;
352 }
353 overDrawBufferNodeCornerRadius_ = radius;
354 needSync_ = true;
355 }
356
GetOverDrawBufferNodeCornerRadius() const357 const Vector4f& RSSurfaceRenderParams::GetOverDrawBufferNodeCornerRadius() const
358 {
359 return overDrawBufferNodeCornerRadius_;
360 }
361
SetIsSubSurfaceNode(bool isSubSurfaceNode)362 void RSSurfaceRenderParams::SetIsSubSurfaceNode(bool isSubSurfaceNode)
363 {
364 isSubSurfaceNode_ = isSubSurfaceNode;
365 }
366
IsSubSurfaceNode() const367 bool RSSurfaceRenderParams::IsSubSurfaceNode() const
368 {
369 return isSubSurfaceNode_;
370 }
371
SetIsNodeToBeCaptured(bool isNodeToBeCaptured)372 void RSSurfaceRenderParams::SetIsNodeToBeCaptured(bool isNodeToBeCaptured)
373 {
374 isNodeToBeCaptured_ = isNodeToBeCaptured;
375 }
376
IsNodeToBeCaptured() const377 bool RSSurfaceRenderParams::IsNodeToBeCaptured() const
378 {
379 return isNodeToBeCaptured_;
380 }
381
SetSkipDraw(bool skip)382 void RSSurfaceRenderParams::SetSkipDraw(bool skip)
383 {
384 isSkipDraw_ = skip;
385 }
386
GetSkipDraw() const387 bool RSSurfaceRenderParams::GetSkipDraw() const
388 {
389 return isSkipDraw_;
390 }
391
SetLayerTop(bool isTop)392 void RSSurfaceRenderParams::SetLayerTop(bool isTop)
393 {
394 if (isLayerTop_ == isTop) {
395 return;
396 }
397 isLayerTop_ = isTop;
398 needSync_ = true;
399 }
400
IsLayerTop() const401 bool RSSurfaceRenderParams::IsLayerTop() const
402 {
403 return isLayerTop_;
404 }
405
OnSync(const std::unique_ptr<RSRenderParams> & target)406 void RSSurfaceRenderParams::OnSync(const std::unique_ptr<RSRenderParams>& target)
407 {
408 auto targetSurfaceParams = static_cast<RSSurfaceRenderParams*>(target.get());
409 if (targetSurfaceParams == nullptr) {
410 RS_LOGE("RSSurfaceRenderParams::OnSync targetSurfaceParams is nullptr");
411 return;
412 }
413
414 if (dirtyType_.test(RSRenderParamsDirtyType::LAYER_INFO_DIRTY)) {
415 targetSurfaceParams->layerInfo_ = layerInfo_;
416 dirtyType_.reset(RSRenderParamsDirtyType::LAYER_INFO_DIRTY);
417 }
418 targetSurfaceParams->windowInfo_ = windowInfo_;
419
420 #ifndef ROSEN_CROSS_PLATFORM
421 if (dirtyType_.test(RSRenderParamsDirtyType::BUFFER_INFO_DIRTY)) {
422 targetSurfaceParams->buffer_ = buffer_;
423 targetSurfaceParams->preBuffer_ = preBuffer_;
424 targetSurfaceParams->acquireFence_ = acquireFence_;
425 targetSurfaceParams->damageRect_ = damageRect_;
426 bufferSynced_ = true;
427 dirtyType_.reset(RSRenderParamsDirtyType::BUFFER_INFO_DIRTY);
428 }
429 #endif
430
431 targetSurfaceParams->rsSurfaceNodeType_ = rsSurfaceNodeType_;
432 targetSurfaceParams->selfDrawingType_ = selfDrawingType_;
433 targetSurfaceParams->ancestorDisplayNode_ = ancestorDisplayNode_;
434 targetSurfaceParams->ancestorDisplayDrawable_ = ancestorDisplayDrawable_;
435 targetSurfaceParams->alpha_ = alpha_;
436 targetSurfaceParams->isSpherizeValid_ = isSpherizeValid_;
437 targetSurfaceParams->isAttractionValid_ = isAttractionValid_;
438 targetSurfaceParams->isParentScaling_ = isParentScaling_;
439 targetSurfaceParams->needBilinearInterpolation_ = needBilinearInterpolation_;
440 targetSurfaceParams->backgroundColor_ = backgroundColor_;
441 targetSurfaceParams->absDrawRect_ = absDrawRect_;
442 targetSurfaceParams->rrect_ = rrect_;
443 targetSurfaceParams->occlusionVisible_ = occlusionVisible_;
444 targetSurfaceParams->visibleRegion_ = visibleRegion_;
445 targetSurfaceParams->visibleRegionInVirtual_ = visibleRegionInVirtual_;
446 targetSurfaceParams->oldDirtyInSurface_ = oldDirtyInSurface_;
447 targetSurfaceParams->transparentRegion_ = transparentRegion_;
448 targetSurfaceParams->isHardwareEnabled_ = isHardwareEnabled_;
449 targetSurfaceParams->isHardCursor_ = isHardCursor_;
450 targetSurfaceParams->isLastFrameHardwareEnabled_ = isLastFrameHardwareEnabled_;
451 targetSurfaceParams->isFixRotationByUser_ = isFixRotationByUser_;
452 targetSurfaceParams->isInFixedRotation_ = isInFixedRotation_;
453 targetSurfaceParams->uiFirstFlag_ = uiFirstFlag_;
454 targetSurfaceParams->uiFirstParentFlag_ = uiFirstParentFlag_;
455 targetSurfaceParams->uifirstUseStarting_ = uifirstUseStarting_;
456 targetSurfaceParams->childrenDirtyRect_ = childrenDirtyRect_;
457 targetSurfaceParams->isOccludedByFilterCache_ = isOccludedByFilterCache_;
458 targetSurfaceParams->isSecurityLayer_ = isSecurityLayer_;
459 targetSurfaceParams->leashPersistentId_ = leashPersistentId_;
460 targetSurfaceParams->isSkipLayer_ = isSkipLayer_;
461 targetSurfaceParams->isProtectedLayer_ = isProtectedLayer_;
462 targetSurfaceParams->drmCornerRadiusInfo_ = drmCornerRadiusInfo_;
463 targetSurfaceParams->animateState_ = animateState_;
464 targetSurfaceParams->skipLayerIds_= skipLayerIds_;
465 targetSurfaceParams->securityLayerIds_= securityLayerIds_;
466 targetSurfaceParams->protectedLayerIds_ = protectedLayerIds_;
467 targetSurfaceParams->privacyContentLayerIds_ = privacyContentLayerIds_;
468 targetSurfaceParams->name_ = name_;
469 targetSurfaceParams->surfaceCacheContentStatic_ = surfaceCacheContentStatic_;
470 targetSurfaceParams->bufferCacheSet_ = bufferCacheSet_;
471 targetSurfaceParams->positionZ_ = positionZ_;
472 targetSurfaceParams->isSubTreeDirty_ = isSubTreeDirty_;
473 targetSurfaceParams->overDrawBufferNodeCornerRadius_ = overDrawBufferNodeCornerRadius_;
474 targetSurfaceParams->isGpuOverDrawBufferOptimizeNode_ = isGpuOverDrawBufferOptimizeNode_;
475 targetSurfaceParams->isSubSurfaceNode_ = isSubSurfaceNode_;
476 targetSurfaceParams->isNodeToBeCaptured_ = isNodeToBeCaptured_;
477 targetSurfaceParams->dstRect_ = dstRect_;
478 targetSurfaceParams->isSkipDraw_ = isSkipDraw_;
479 targetSurfaceParams->isLayerTop_ = isLayerTop_;
480 targetSurfaceParams->needHidePrivacyContent_ = needHidePrivacyContent_;
481 targetSurfaceParams->isLeashWindowVisibleRegionEmpty_ = isLeashWindowVisibleRegionEmpty_;
482 targetSurfaceParams->opaqueRegion_ = opaqueRegion_;
483 targetSurfaceParams->needOffscreen_ = needOffscreen_;
484 targetSurfaceParams->totalMatrix_ = totalMatrix_;
485 targetSurfaceParams->visibleFilterChild_ = visibleFilterChild_;
486 targetSurfaceParams->isTransparent_ = isTransparent_;
487 targetSurfaceParams->globalAlpha_ = globalAlpha_;
488 targetSurfaceParams->hasFingerprint_ = hasFingerprint_;
489 targetSurfaceParams->layerSource_ = layerSource_;
490 targetSurfaceParams->sdrNit_ = sdrNit_;
491 targetSurfaceParams->displayNit_ = displayNit_;
492 targetSurfaceParams->brightnessRatio_ = brightnessRatio_;
493 targetSurfaceParams->hasSubSurfaceNodes_ = hasSubSurfaceNodes_;
494 targetSurfaceParams->allSubSurfaceNodeIds_ = std::move(allSubSurfaceNodeIds_);
495 targetSurfaceParams->isHwcEnabledBySolidLayer_ = isHwcEnabledBySolidLayer_;
496 targetSurfaceParams->apiCompatibleVersion_ = apiCompatibleVersion_;
497 RSRenderParams::OnSync(target);
498 }
499
ToString() const500 std::string RSSurfaceRenderParams::ToString() const
501 {
502 std::string ret = RSRenderParams::ToString() + ", RSSurfaceRenderParams: {";
503 ret += RENDER_BASIC_PARAM_TO_STRING(int(rsSurfaceNodeType_));
504 ret += RENDER_BASIC_PARAM_TO_STRING(int(selfDrawingType_));
505 ret += RENDER_BASIC_PARAM_TO_STRING(alpha_);
506 ret += RENDER_BASIC_PARAM_TO_STRING(isSpherizeValid_);
507 ret += RENDER_BASIC_PARAM_TO_STRING(isAttractionValid_);
508 ret += RENDER_BASIC_PARAM_TO_STRING(needBilinearInterpolation_);
509 ret += RENDER_BASIC_PARAM_TO_STRING(backgroundColor_.GetAlpha());
510 ret += RENDER_RECT_PARAM_TO_STRING(absDrawRect_);
511 ret += RENDER_BASIC_PARAM_TO_STRING(occlusionVisible_);
512 ret += RENDER_BASIC_PARAM_TO_STRING(isOccludedByFilterCache_);
513 ret += "}";
514 return ret;
515 }
516
IsVisibleDirtyRegionEmpty(const Drawing::Region curSurfaceDrawRegion) const517 bool RSSurfaceRenderParams::IsVisibleDirtyRegionEmpty(const Drawing::Region curSurfaceDrawRegion) const
518 {
519 if (IsMainWindowType()) {
520 return curSurfaceDrawRegion.IsEmpty();
521 }
522 if (IsLeashWindow()) {
523 return GetLeashWindowVisibleRegionEmptyParam();
524 }
525 return false;
526 }
527
SetOpaqueRegion(const Occlusion::Region & opaqueRegion)528 void RSSurfaceRenderParams::SetOpaqueRegion(const Occlusion::Region& opaqueRegion)
529 {
530 opaqueRegion_ = opaqueRegion;
531 }
532
GetOpaqueRegion() const533 const Occlusion::Region& RSSurfaceRenderParams::GetOpaqueRegion() const
534 {
535 return opaqueRegion_;
536 }
537
538 } // namespace OHOS::Rosen
539