2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <dali/internal/update/rendering/scene-graph-visual-renderer.h>
21 #include <dali/internal/update/common/property-resetter.h>
22 #include <dali/internal/update/rendering/scene-graph-renderer.h>
24 namespace Dali::Internal::SceneGraph::VisualRenderer
26 void AnimatableVisualProperties::ResetToBaseValues(BufferIndex updateBufferIndex)
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)
38 auto* decoratedVisualProperties = static_cast<VisualRenderer::AnimatableDecoratedVisualProperties*>(mExtendedProperties);
39 decoratedVisualProperties->ResetToBaseValues(updateBufferIndex);
43 void AnimatableVisualProperties::MarkAsDirty()
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)
55 auto* decoratedVisualProperties = static_cast<VisualRenderer::AnimatableDecoratedVisualProperties*>(mExtendedProperties);
56 decoratedVisualProperties->MarkAsDirty();
60 void AnimatableDecoratedVisualProperties::ResetToBaseValues(BufferIndex updateBufferIndex)
62 mCornerRadius.ResetToBaseValue(updateBufferIndex);
63 mCornerRadiusPolicy.ResetToBaseValue(updateBufferIndex);
64 mBorderlineWidth.ResetToBaseValue(updateBufferIndex);
65 mBorderlineColor.ResetToBaseValue(updateBufferIndex);
66 mBorderlineOffset.ResetToBaseValue(updateBufferIndex);
67 mBlurRadius.ResetToBaseValue(updateBufferIndex);
70 void AnimatableDecoratedVisualProperties::MarkAsDirty()
72 mCornerRadius.MarkAsDirty();
73 mCornerRadiusPolicy.MarkAsDirty();
74 mBorderlineWidth.MarkAsDirty();
75 mBorderlineColor.MarkAsDirty();
76 mBorderlineOffset.MarkAsDirty();
77 mBlurRadius.MarkAsDirty();
80 } // namespace Dali::Internal::SceneGraph::VisualRenderer