mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-02-17 02:20:59 +00:00
commit
17f31175e0
@ -340,6 +340,7 @@ enum class RSSurfaceNodeAbilityState : uint8_t {
|
||||
constexpr int64_t NS_TO_S = 1000000000;
|
||||
constexpr int64_t NS_PER_MS = 1000000;
|
||||
constexpr uint32_t SIZE_UPPER_LIMIT = 1000;
|
||||
constexpr uint32_t PARTICLE_EMMITER_UPPER_LIMIT = 2000;
|
||||
constexpr uint32_t PARTICLE_UPPER_LIMIT = 1000000;
|
||||
|
||||
#if defined(M_PI)
|
||||
|
@ -840,7 +840,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::vector<std::shared_
|
||||
uint32_t size = parcel.ReadUint32();
|
||||
bool success = true;
|
||||
std::vector<std::shared_ptr<EmitterUpdater>> emitterUpdaters;
|
||||
if (size > PARTICLE_UPPER_LIMIT) {
|
||||
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
|
||||
return false;
|
||||
}
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
@ -924,7 +924,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::shared_ptr<Particle
|
||||
}
|
||||
uint32_t size = parcel.ReadUint32();
|
||||
bool success = true;
|
||||
if (size > PARTICLE_UPPER_LIMIT) {
|
||||
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
|
||||
return false;
|
||||
}
|
||||
std::shared_ptr<ParticleNoiseFields> noiseFields = std::make_shared<ParticleNoiseFields>();
|
||||
@ -1228,7 +1228,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::vector<std::shared_
|
||||
uint32_t size = parcel.ReadUint32();
|
||||
bool success = true;
|
||||
std::vector<std::shared_ptr<ParticleRenderParams>> particlesRenderParams;
|
||||
if (size > PARTICLE_UPPER_LIMIT) {
|
||||
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
|
||||
return false;
|
||||
}
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user