+ if( pixelDataSize < width * height )
+ {
+ DALI_LOG_ERROR( "PixelData of an incorrect size when trying to update texture\n");
+ }
+ else if( ( xOffset + width > ( mSize.GetWidth() / (1u << mipmap) ) ) ||
+ ( yOffset + height > ( mSize.GetHeight() / (1u << mipmap) ) ) )
+ {
+ DALI_LOG_ERROR( "Texture update area out of bounds\n");
+ }
+ else
+ {
+ //Parameters are correct. Send message to upload data to the texture
+ UploadParams params = { static_cast< uint16_t >( layer ),
+ static_cast< uint16_t >( mipmap ),
+ static_cast< uint16_t >( xOffset ),
+ static_cast< uint16_t >( yOffset ),
+ static_cast< uint16_t >( width ),
+ static_cast< uint16_t >( height ) };
+ UploadTextureMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, pixelData, params );
+
+ // Request event processing and update forcely
+ mEventThreadServices.GetRenderController().RequestProcessEventsOnIdle( true );
+ mEventThreadServices.ForceNextUpdate();
+
+ result = true;
+ }