( dataPath + DB_NAME_CACHE ).c_str() );
}
mWebContainer = LWE::WebContainer::Create(
- mOutputWidth, mOutputHeight,
- 1.0, "", locale.data(), timezoneId.data() );
-
- mWebContainer->RegisterPreRenderingHandler(
- [this]() -> LWE::WebContainer::RenderInfo {
- if (mOutputBuffer == NULL) {
- mOutputBuffer = (uint8_t*)malloc(
- mOutputWidth *
- mOutputHeight * sizeof(uint32_t));
- mOutputStride =
- mOutputWidth * sizeof(uint32_t);
- }
- ::LWE::WebContainer::RenderInfo result;
- result.updatedBufferAddress = mOutputBuffer;
- result.bufferStride = mOutputStride;
- return result;
-
- });
-
+ mOutputBuffer, mOutputWidth, mOutputHeight,
+ mOutputStride, 1.0, "", locale.data(), timezoneId.data() );
mWebContainer->RegisterOnRenderedHandler(
[ this ]( LWE::WebContainer* container, const LWE::WebContainer::RenderResult& renderResult )
{
auto oldOutputBuffer = mOutputBuffer;
mOutputBuffer = ( uint8_t* )malloc( mOutputWidth * mOutputHeight * sizeof( uint32_t ) );
mOutputStride = mOutputWidth * sizeof( uint32_t );
- mWebContainer->ResizeTo( mOutputWidth, mOutputHeight );
+ mWebContainer->UpdateBuffer( mOutputBuffer, mOutputWidth, mOutputHeight, mOutputStride );
if( oldOutputBuffer ) {
free(oldOutputBuffer);