Since we only use const uint8_t* internally, there is no reason to
allow 'only' non-const pointer when we try to load rive resources.
To increase performance by compiler, let we mark bytes as const
so RiveTizen itself never fix inputed buffer internally.
Change-Id: I6723bd9405939cf126177463ec6dfdda50691a90
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
void animationAdvanceApply(rive::LinearAnimationInstance* animation, double elapsed);
void animationApply(rive::LinearAnimationInstance* animation, double elapsed);
- bool loadRiveResource(uint8_t* bytes, size_t size);
+ bool loadRiveResource(const uint8_t* bytes, size_t size);
bool createCanvas(unsigned char* buffer, unsigned int width, unsigned int height, unsigned int stride);
bool render(double elapsed, unsigned int width, unsigned int height);
animation->time(elapsed);
}
-bool RiveTizen::loadRiveResource(uint8_t *bytes, size_t size)
+bool RiveTizen::loadRiveResource(const uint8_t *bytes, size_t size)
{
mFile = nullptr;
mArtboardInstance = nullptr;