Revert "[Tizen] Apply new LWE web engine interface"
authorSunghyun kim <scholb.kim@samsung.com>
Mon, 25 Feb 2019 07:10:12 +0000 (16:10 +0900)
committerSunghyun kim <scholb.kim@samsung.com>
Mon, 25 Feb 2019 07:10:16 +0000 (16:10 +0900)
This reverts commit 1e10c619780f7646b545b9ab343c0624bd1e6243.

Change-Id: Ifa9fd659e4fff919e5e6060ded8e0ffc35c64026

dali-extension/web-engine-lwe/tizen-web-engine-lwe.cpp

index 9003887..3bee25f 100644 (file)
@@ -414,25 +414,8 @@ void TizenWebEngineLWE::Create( int width, int height, const std::string& locale
                           ( 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 )
       {
@@ -607,7 +590,7 @@ void TizenWebEngineLWE::SetSize( int width, int height )
     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);