1 /* 2 * Copyright (c) 2022-2023 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 RENDER_SERVICE_CLIENT_CORE_ANIMATION_RS_RENDER_PROP_H 17 #define RENDER_SERVICE_CLIENT_CORE_ANIMATION_RS_RENDER_PROP_H 18 19 #include "animation/rs_value_estimator.h" 20 #include "common/rs_common_def.h" 21 #include "common/rs_macros.h" 22 #include "common/rs_rect.h" 23 #include "modifier/rs_animatable_arithmetic.h" 24 #include "modifier/rs_modifier_type.h" 25 #include "recording/draw_cmd_list.h" 26 #include "transaction/rs_marshalling_helper.h" 27 28 namespace OHOS { 29 namespace Rosen { 30 class RSRenderNode; 31 enum class ForegroundColorStrategyType; 32 enum class Gravity; 33 34 enum PropertyUpdateType : int8_t { 35 UPDATE_TYPE_OVERWRITE, // overwrite by given value 36 UPDATE_TYPE_INCREMENTAL, // incremental update by given value 37 UPDATE_TYPE_FORCE_OVERWRITE, // overwrite and cancel all previous animations 38 }; 39 40 class RSB_EXPORT RSRenderPropertyBase : public std::enable_shared_from_this<RSRenderPropertyBase> { 41 public: 42 RSRenderPropertyBase() = default; RSRenderPropertyBase(const PropertyId & id)43 RSRenderPropertyBase(const PropertyId& id) : id_(id) {} 44 RSRenderPropertyBase(const RSRenderPropertyBase&) = delete; 45 RSRenderPropertyBase(const RSRenderPropertyBase&&) = delete; 46 RSRenderPropertyBase& operator=(const RSRenderPropertyBase&) = delete; 47 RSRenderPropertyBase& operator=(const RSRenderPropertyBase&&) = delete; 48 virtual ~RSRenderPropertyBase() = default; 49 GetId()50 PropertyId GetId() const 51 { 52 return id_; 53 } 54 Attach(std::weak_ptr<RSRenderNode> node)55 void Attach(std::weak_ptr<RSRenderNode> node) 56 { 57 node_ = node; 58 OnChange(); 59 } 60 GetModifierType()61 RSModifierType GetModifierType() const 62 { 63 return modifierType_; 64 } 65 SetModifierType(RSModifierType type)66 void SetModifierType(RSModifierType type) 67 { 68 modifierType_ = type; 69 UpdatePropertyUnit(type); 70 } 71 Dump(std::string & out)72 virtual void Dump(std::string& out) const 73 { 74 } 75 GetSize()76 virtual size_t GetSize() const 77 { 78 return sizeof(*this); 79 } 80 81 static bool Marshalling(Parcel& parcel, const std::shared_ptr<RSRenderPropertyBase>& val); 82 [[nodiscard]] static bool Unmarshalling(Parcel& parcel, std::shared_ptr<RSRenderPropertyBase>& val); 83 84 protected: 85 void OnChange() const; 86 87 void UpdatePropertyUnit(RSModifierType type); 88 Clone()89 virtual const std::shared_ptr<RSRenderPropertyBase> Clone() const 90 { 91 return nullptr; 92 } 93 SetValue(const std::shared_ptr<RSRenderPropertyBase> & value)94 virtual void SetValue(const std::shared_ptr<RSRenderPropertyBase>& value) {} 95 SetPropertyType(const RSRenderPropertyType type)96 virtual void SetPropertyType(const RSRenderPropertyType type) {} 97 GetPropertyType()98 virtual RSRenderPropertyType GetPropertyType() const 99 { 100 return RSRenderPropertyType::INVALID; 101 } 102 SetPropertyUnit(RSPropertyUnit unit)103 virtual void SetPropertyUnit(RSPropertyUnit unit) {} 104 GetPropertyUnit()105 virtual RSPropertyUnit GetPropertyUnit() const 106 { 107 return RSPropertyUnit::UNKNOWN; 108 } 109 ToFloat()110 virtual float ToFloat() const 111 { 112 return 1.f; 113 } 114 CreateRSValueEstimator(const RSValueEstimatorType type)115 virtual std::shared_ptr<RSValueEstimator> CreateRSValueEstimator(const RSValueEstimatorType type) 116 { 117 return nullptr; 118 } 119 CreateRSSpringValueEstimator()120 virtual std::shared_ptr<RSSpringValueEstimatorBase> CreateRSSpringValueEstimator() 121 { 122 return nullptr; 123 } 124 IsNearEqual(const std::shared_ptr<RSRenderPropertyBase> & value,float zeroThreshold)125 virtual bool IsNearEqual(const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const 126 { 127 return true; 128 } 129 130 PropertyId id_; 131 std::weak_ptr<RSRenderNode> node_; 132 RSModifierType modifierType_ { RSModifierType::INVALID }; 133 134 private: Add(const std::shared_ptr<const RSRenderPropertyBase> & value)135 virtual std::shared_ptr<RSRenderPropertyBase> Add(const std::shared_ptr<const RSRenderPropertyBase>& value) 136 { 137 return shared_from_this(); 138 } 139 Minus(const std::shared_ptr<const RSRenderPropertyBase> & value)140 virtual std::shared_ptr<RSRenderPropertyBase> Minus(const std::shared_ptr<const RSRenderPropertyBase>& value) 141 { 142 return shared_from_this(); 143 } 144 Multiply(const float scale)145 virtual std::shared_ptr<RSRenderPropertyBase> Multiply(const float scale) 146 { 147 return shared_from_this(); 148 } 149 IsEqual(const std::shared_ptr<const RSRenderPropertyBase> & value)150 virtual bool IsEqual(const std::shared_ptr<const RSRenderPropertyBase>& value) const 151 { 152 return true; 153 } 154 155 friend std::shared_ptr<RSRenderPropertyBase> operator+=( 156 const std::shared_ptr<RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 157 friend std::shared_ptr<RSRenderPropertyBase> operator-=( 158 const std::shared_ptr<RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 159 friend std::shared_ptr<RSRenderPropertyBase> operator*=( 160 const std::shared_ptr<RSRenderPropertyBase>& value, const float scale); 161 friend std::shared_ptr<RSRenderPropertyBase> operator+( 162 const std::shared_ptr<const RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 163 friend std::shared_ptr<RSRenderPropertyBase> operator-( 164 const std::shared_ptr<const RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 165 friend std::shared_ptr<RSRenderPropertyBase> operator*( 166 const std::shared_ptr<const RSRenderPropertyBase>& value, const float scale); 167 friend bool operator==( 168 const std::shared_ptr<const RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 169 friend bool operator!=( 170 const std::shared_ptr<const RSRenderPropertyBase>& a, const std::shared_ptr<const RSRenderPropertyBase>& b); 171 friend class RSAnimationRateDecider; 172 friend class RSRenderPropertyAnimation; 173 friend class RSMarshallingHelper; 174 friend class RSValueEstimator; 175 friend class RSRenderPathAnimation; 176 friend class RSRenderSpringAnimation; 177 friend class RSRenderInterpolatingSpringAnimation; 178 friend class RSRenderCurveAnimation; 179 friend class RSRenderKeyframeAnimation; 180 template<typename T> 181 friend class RSSpringModel; 182 friend class RSTransitionCustom; 183 friend class RSAnimationTraceUtils; 184 }; 185 186 template<typename T> 187 class RSB_EXPORT_TMP RSRenderProperty : public RSRenderPropertyBase { 188 public: RSRenderProperty()189 RSRenderProperty() : RSRenderPropertyBase(0) {} RSRenderProperty(const T & value,const PropertyId & id)190 RSRenderProperty(const T& value, const PropertyId& id) : RSRenderPropertyBase(id), stagingValue_(value) {} RSRenderProperty(const T & value,const PropertyId & id,const RSRenderPropertyType type)191 RSRenderProperty(const T& value, const PropertyId& id, const RSRenderPropertyType type) 192 : RSRenderPropertyBase(id), stagingValue_(value) 193 {} 194 virtual ~RSRenderProperty() = default; 195 Set(const T & value)196 void Set(const T& value) 197 { 198 if (value == stagingValue_) { 199 return; 200 } 201 stagingValue_ = value; 202 OnChange(); 203 if (updateUIPropertyFunc_) { 204 updateUIPropertyFunc_(shared_from_this()); 205 } 206 } 207 Get()208 T Get() const 209 { 210 return stagingValue_; 211 } 212 GetRef()213 T& GetRef() 214 { 215 return stagingValue_; 216 } 217 GetSize()218 virtual size_t GetSize() const override 219 { 220 return sizeof(*this); 221 } 222 Dump(std::string & out)223 void Dump(std::string& out) const override 224 { 225 } 226 SetUpdateUIPropertyFunc(const std::function<void (const std::shared_ptr<RSRenderPropertyBase> &)> & updateUIPropertyFunc)227 void SetUpdateUIPropertyFunc( 228 const std::function<void(const std::shared_ptr<RSRenderPropertyBase>&)>& updateUIPropertyFunc) 229 { 230 updateUIPropertyFunc_ = updateUIPropertyFunc; 231 } 232 233 protected: 234 T stagingValue_; 235 std::function<void(const std::shared_ptr<RSRenderPropertyBase>&)> updateUIPropertyFunc_; GetPropertyType()236 RSRenderPropertyType GetPropertyType() const override 237 { 238 return RSRenderPropertyType::INVALID; 239 } 240 241 friend class RSMarshallingHelper; 242 }; 243 244 template<typename T> 245 class RSB_EXPORT_TMP RSRenderAnimatableProperty : public RSRenderProperty<T> { 246 public: RSRenderAnimatableProperty()247 RSRenderAnimatableProperty() : RSRenderProperty<T>() {} RSRenderAnimatableProperty(const T & value)248 RSRenderAnimatableProperty(const T& value) : RSRenderProperty<T>(value, 0) {} RSRenderAnimatableProperty(const T & value,const PropertyId & id)249 RSRenderAnimatableProperty(const T& value, const PropertyId& id) : RSRenderProperty<T>(value, id) {} RSRenderAnimatableProperty(const T & value,const PropertyId & id,const RSRenderPropertyType type)250 RSRenderAnimatableProperty(const T& value, const PropertyId& id, const RSRenderPropertyType type) 251 : RSRenderProperty<T>(value, id), type_(type) 252 {} RSRenderAnimatableProperty(const T & value,const PropertyId & id,const RSRenderPropertyType type,const RSPropertyUnit unit)253 RSRenderAnimatableProperty(const T& value, const PropertyId& id, 254 const RSRenderPropertyType type, const RSPropertyUnit unit) 255 : RSRenderProperty<T>(value, id), type_(type), unit_(unit) 256 {} 257 virtual ~RSRenderAnimatableProperty() = default; 258 259 protected: Clone()260 const std::shared_ptr<RSRenderPropertyBase> Clone() const override 261 { 262 return std::make_shared<RSRenderAnimatableProperty<T>>( 263 RSRenderProperty<T>::stagingValue_, RSRenderProperty<T>::id_, type_, unit_); 264 } 265 SetValue(const std::shared_ptr<RSRenderPropertyBase> & value)266 void SetValue(const std::shared_ptr<RSRenderPropertyBase>& value) override 267 { 268 auto property = std::static_pointer_cast<RSRenderAnimatableProperty<T>>(value); 269 if (property != nullptr && property->GetPropertyType() == type_) { 270 RSRenderProperty<T>::Set(property->Get()); 271 } 272 } 273 SetPropertyType(const RSRenderPropertyType type)274 void SetPropertyType(const RSRenderPropertyType type) override 275 { 276 type_ = type; 277 } 278 GetPropertyType()279 virtual RSRenderPropertyType GetPropertyType() const override 280 { 281 return type_; 282 } 283 SetPropertyUnit(RSPropertyUnit unit)284 void SetPropertyUnit(RSPropertyUnit unit) override 285 { 286 unit_ = unit; 287 } 288 GetPropertyUnit()289 RSPropertyUnit GetPropertyUnit() const override 290 { 291 return unit_; 292 } 293 ToFloat()294 float ToFloat() const override 295 { 296 return 1.f; 297 } 298 IsNearEqual(const std::shared_ptr<RSRenderPropertyBase> & value,float zeroThreshold)299 bool IsNearEqual(const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const override 300 { 301 return IsEqual(value); 302 } 303 CreateRSValueEstimator(const RSValueEstimatorType type)304 std::shared_ptr<RSValueEstimator> CreateRSValueEstimator(const RSValueEstimatorType type) override 305 { 306 switch (type) { 307 case RSValueEstimatorType::CURVE_VALUE_ESTIMATOR: { 308 return std::make_shared<RSCurveValueEstimator<T>>(); 309 } 310 case RSValueEstimatorType::KEYFRAME_VALUE_ESTIMATOR: { 311 return std::make_shared<RSKeyframeValueEstimator<T>>(); 312 } 313 default: { 314 return nullptr; 315 } 316 } 317 } 318 CreateRSSpringValueEstimator()319 std::shared_ptr<RSSpringValueEstimatorBase> CreateRSSpringValueEstimator() override 320 { 321 return std::make_shared<RSSpringValueEstimator<T>>(); 322 } 323 324 private: 325 RSRenderPropertyType type_ = RSRenderPropertyType::INVALID; 326 RSPropertyUnit unit_ = RSPropertyUnit::UNKNOWN; 327 Add(const std::shared_ptr<const RSRenderPropertyBase> & value)328 std::shared_ptr<RSRenderPropertyBase> Add(const std::shared_ptr<const RSRenderPropertyBase>& value) override 329 { 330 auto animatableProperty = std::static_pointer_cast<const RSRenderAnimatableProperty<T>>(value); 331 if (animatableProperty != nullptr) { 332 RSRenderProperty<T>::stagingValue_ = RSRenderProperty<T>::stagingValue_ + animatableProperty->stagingValue_; 333 } 334 return RSRenderProperty<T>::shared_from_this(); 335 } 336 Minus(const std::shared_ptr<const RSRenderPropertyBase> & value)337 std::shared_ptr<RSRenderPropertyBase> Minus(const std::shared_ptr<const RSRenderPropertyBase>& value) override 338 { 339 auto animatableProperty = std::static_pointer_cast<const RSRenderAnimatableProperty<T>>(value); 340 if (animatableProperty != nullptr) { 341 RSRenderProperty<T>::stagingValue_ = RSRenderProperty<T>::stagingValue_ - animatableProperty->stagingValue_; 342 } 343 return RSRenderProperty<T>::shared_from_this(); 344 } 345 Multiply(const float scale)346 std::shared_ptr<RSRenderPropertyBase> Multiply(const float scale) override 347 { 348 RSRenderProperty<T>::stagingValue_ = RSRenderProperty<T>::stagingValue_ * scale; 349 return RSRenderProperty<T>::shared_from_this(); 350 } 351 IsEqual(const std::shared_ptr<const RSRenderPropertyBase> & value)352 bool IsEqual(const std::shared_ptr<const RSRenderPropertyBase>& value) const override 353 { 354 auto animatableProperty = std::static_pointer_cast<const RSRenderAnimatableProperty<T>>(value); 355 if (animatableProperty != nullptr) { 356 return RSRenderProperty<T>::stagingValue_ == animatableProperty->stagingValue_; 357 } 358 return true; 359 } 360 361 friend class RSMarshallingHelper; 362 friend class RSRenderPathAnimation; 363 friend class RSRenderPropertyBase; 364 }; 365 366 template<> 367 RSB_EXPORT float RSRenderAnimatableProperty<float>::ToFloat() const; 368 template<> 369 RSB_EXPORT float RSRenderAnimatableProperty<Vector4f>::ToFloat() const; 370 template<> 371 RSB_EXPORT float RSRenderAnimatableProperty<Quaternion>::ToFloat() const; 372 template<> 373 RSB_EXPORT float RSRenderAnimatableProperty<Vector2f>::ToFloat() const; 374 375 template<> 376 RSB_EXPORT void RSRenderProperty<bool>::Dump(std::string& out) const; 377 template<> 378 RSB_EXPORT void RSRenderProperty<int>::Dump(std::string& out) const; 379 template<> 380 RSB_EXPORT void RSRenderProperty<float>::Dump(std::string& out) const; 381 template<> 382 RSB_EXPORT void RSRenderProperty<Vector4<uint32_t>>::Dump(std::string& out) const; 383 template<> 384 RSB_EXPORT void RSRenderProperty<Vector4f>::Dump(std::string& out) const; 385 template<> 386 RSB_EXPORT void RSRenderProperty<Quaternion>::Dump(std::string& out) const; 387 template<> 388 RSB_EXPORT void RSRenderProperty<Vector2f>::Dump(std::string& out) const; 389 template<> 390 RSB_EXPORT void RSRenderProperty<Matrix3f>::Dump(std::string& out) const; 391 template<> 392 RSB_EXPORT void RSRenderProperty<Color>::Dump(std::string& out) const; 393 template<> 394 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSFilter>>::Dump(std::string& out) const; 395 template<> 396 RSB_EXPORT void RSRenderProperty<Vector4<Color>>::Dump(std::string& out) const; 397 template<> 398 RSB_EXPORT void RSRenderProperty<RRect>::Dump(std::string& out) const; 399 template<> 400 RSB_EXPORT void RSRenderProperty<Drawing::DrawCmdListPtr>::Dump(std::string& out) const; 401 template<> 402 RSB_EXPORT void RSRenderProperty<ForegroundColorStrategyType>::Dump(std::string& out) const; 403 template<> 404 RSB_EXPORT void RSRenderProperty<SkMatrix>::Dump(std::string& out) const; 405 template<> 406 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSShader>>::Dump(std::string& out) const; 407 template<> 408 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSImage>>::Dump(std::string& out) const; 409 template<> 410 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSPath>>::Dump(std::string& out) const; 411 template<> 412 RSB_EXPORT void RSRenderProperty<Gravity>::Dump(std::string& out) const; 413 template<> 414 RSB_EXPORT void RSRenderProperty<Drawing::Matrix>::Dump(std::string& out) const; 415 template<> 416 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSLinearGradientBlurPara>>::Dump(std::string& out) const; 417 template<> 418 RSB_EXPORT void RSRenderProperty<std::shared_ptr<MotionBlurParam>>::Dump(std::string& out) const; 419 template<> 420 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSMagnifierParams>>::Dump(std::string& out) const; 421 template<> 422 RSB_EXPORT void RSRenderProperty<std::vector<std::shared_ptr<EmitterUpdater>>>::Dump(std::string& out) const; 423 template<> 424 RSB_EXPORT void RSRenderProperty<std::shared_ptr<ParticleNoiseFields>>::Dump(std::string& out) const; 425 template<> 426 RSB_EXPORT void RSRenderProperty<std::shared_ptr<RSMask>>::Dump(std::string& out) const; 427 428 template<> 429 RSB_EXPORT bool RSRenderAnimatableProperty<float>::IsNearEqual( 430 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 431 template<> 432 RSB_EXPORT bool RSRenderAnimatableProperty<Vector4f>::IsNearEqual( 433 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 434 template<> 435 RSB_EXPORT bool RSRenderAnimatableProperty<Quaternion>::IsNearEqual( 436 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 437 template<> 438 RSB_EXPORT bool RSRenderAnimatableProperty<Vector2f>::IsNearEqual( 439 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 440 template<> 441 RSB_EXPORT bool RSRenderAnimatableProperty<Matrix3f>::IsNearEqual( 442 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 443 template<> 444 RSB_EXPORT bool RSRenderAnimatableProperty<Color>::IsNearEqual( 445 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 446 template<> 447 RSB_EXPORT bool RSRenderAnimatableProperty<std::shared_ptr<RSFilter>>::IsNearEqual( 448 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 449 template<> 450 RSB_EXPORT bool RSRenderAnimatableProperty<Vector4<Color>>::IsNearEqual( 451 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 452 template<> 453 RSB_EXPORT bool RSRenderAnimatableProperty<RRect>::IsNearEqual( 454 const std::shared_ptr<RSRenderPropertyBase>& value, float zeroThreshold) const; 455 template<> 456 RSB_EXPORT bool RSRenderAnimatableProperty<std::shared_ptr<RSFilter>>::IsEqual( 457 const std::shared_ptr<const RSRenderPropertyBase>& value) const; 458 459 template<> 460 RSB_EXPORT size_t RSRenderProperty<Drawing::DrawCmdListPtr>::GetSize() const; 461 462 #if defined(_WIN32) 463 extern template class RSRenderProperty<bool>; 464 extern template class RSRenderProperty<int>; 465 extern template class RSRenderProperty<float>; 466 extern template class RSRenderProperty<Vector4<uint32_t>>; 467 extern template class RSRenderProperty<Vector4f>; 468 extern template class RSRenderProperty<Quaternion>; 469 extern template class RSRenderProperty<Vector2f>; 470 extern template class RSRenderProperty<Matrix3f>; 471 extern template class RSRenderProperty<Color>; 472 extern template class RSRenderProperty<std::shared_ptr<RSFilter>>; 473 extern template class RSRenderProperty<Vector4<Color>>; 474 extern template class RSRenderProperty<RRect>; 475 extern template class RSRenderProperty<Drawing::DrawCmdListPtr>; 476 extern template class RSRenderProperty<ForegroundColorStrategyType>; 477 extern template class RSRenderProperty<SkMatrix>; 478 extern template class RSRenderProperty<std::shared_ptr<RSShader>>; 479 extern template class RSRenderProperty<std::shared_ptr<RSImage>>; 480 extern template class RSRenderProperty<std::shared_ptr<RSPath>>; 481 extern template class RSRenderProperty<Gravity>; 482 extern template class RSRenderProperty<Drawing::Matrix>; 483 extern template class RSRenderProperty<std::shared_ptr<RSLinearGradientBlurPara>>; 484 extern template class RSRenderProperty<std::shared_ptr<MotionBlurParam>>; 485 extern template class RSRenderProperty<std::shared_ptr<RSMagnifierParams>>; 486 extern template class RSRenderProperty<std::vector<std::shared_ptr<EmitterUpdater>>>; 487 extern template class RSRenderProperty<std::shared_ptr<ParticleNoiseFields>>; 488 extern template class RSRenderProperty<std::shared_ptr<RSMask>>; 489 490 extern template class RSRenderAnimatableProperty<float>; 491 extern template class RSRenderAnimatableProperty<Vector4f>; 492 extern template class RSRenderAnimatableProperty<Quaternion>; 493 extern template class RSRenderAnimatableProperty<Vector2f>; 494 extern template class RSRenderAnimatableProperty<RRect>; 495 extern template class RSRenderAnimatableProperty<Matrix3f>; 496 extern template class RSRenderAnimatableProperty<Color>; 497 extern template class RSRenderAnimatableProperty<std::shared_ptr<RSFilter>>; 498 extern template class RSRenderAnimatableProperty<Vector4<Color>>; 499 #endif 500 } // namespace Rosen 501 } // namespace OHOS 502 503 #endif // RENDER_SERVICE_CLIENT_CORE_ANIMATION_RS_RENDER_PROP_H 504