Fix svace issue (initialize render task list membervalue)
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / scene-graph-visual-renderer.cpp
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // CLASS HEADER
18 #include <dali/internal/update/rendering/scene-graph-visual-renderer.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/internal/update/common/property-resetter.h>
22 #include <dali/internal/update/rendering/scene-graph-renderer.h>
23
24 namespace Dali::Internal::SceneGraph::VisualRenderer
25 {
26 void AnimatableVisualProperties::ResetToBaseValues(BufferIndex updateBufferIndex)
27 {
28   mTransformOffset.ResetToBaseValue(updateBufferIndex);
29   mTransformSize.ResetToBaseValue(updateBufferIndex);
30   mTransformOrigin.ResetToBaseValue(updateBufferIndex);
31   mTransformAnchorPoint.ResetToBaseValue(updateBufferIndex);
32   mTransformOffsetSizeMode.ResetToBaseValue(updateBufferIndex);
33   mExtraSize.ResetToBaseValue(updateBufferIndex);
34   mMixColor.ResetToBaseValue(updateBufferIndex);
35   mPreMultipliedAlpha.ResetToBaseValue(updateBufferIndex);
36   if(mExtendedProperties)
37   {
38     auto* decoratedVisualProperties = static_cast<VisualRenderer::AnimatableDecoratedVisualProperties*>(mExtendedProperties);
39     decoratedVisualProperties->ResetToBaseValues(updateBufferIndex);
40   }
41 }
42
43 void AnimatableVisualProperties::MarkAsDirty()
44 {
45   mTransformOffset.MarkAsDirty();
46   mTransformSize.MarkAsDirty();
47   mTransformOrigin.MarkAsDirty();
48   mTransformAnchorPoint.MarkAsDirty();
49   mTransformOffsetSizeMode.MarkAsDirty();
50   mExtraSize.MarkAsDirty();
51   mMixColor.MarkAsDirty();
52   mPreMultipliedAlpha.MarkAsDirty();
53   if(mExtendedProperties)
54   {
55     auto* decoratedVisualProperties = static_cast<VisualRenderer::AnimatableDecoratedVisualProperties*>(mExtendedProperties);
56     decoratedVisualProperties->MarkAsDirty();
57   }
58 }
59
60 void AnimatableDecoratedVisualProperties::ResetToBaseValues(BufferIndex updateBufferIndex)
61 {
62   mCornerRadius.ResetToBaseValue(updateBufferIndex);
63   mCornerRadiusPolicy.ResetToBaseValue(updateBufferIndex);
64   mBorderlineWidth.ResetToBaseValue(updateBufferIndex);
65   mBorderlineColor.ResetToBaseValue(updateBufferIndex);
66   mBorderlineOffset.ResetToBaseValue(updateBufferIndex);
67   mBlurRadius.ResetToBaseValue(updateBufferIndex);
68 }
69
70 void AnimatableDecoratedVisualProperties::MarkAsDirty()
71 {
72   mCornerRadius.MarkAsDirty();
73   mCornerRadiusPolicy.MarkAsDirty();
74   mBorderlineWidth.MarkAsDirty();
75   mBorderlineColor.MarkAsDirty();
76   mBorderlineOffset.MarkAsDirty();
77   mBlurRadius.MarkAsDirty();
78 }
79
80 } // namespace Dali::Internal::SceneGraph::VisualRenderer