X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fweb-view%2Fweb-view-impl.cpp;h=abc29708854055ff0085b72d11e24c74bcdc2c51;hb=refs%2Fchanges%2F20%2F238520%2F3;hp=7bdb61dd2fd76fa7de7b4cebf59200202ecc51bb;hpb=fca202af829a0657805e44461f08f284cdbf0bbb;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp index 7bdb61d..abc2970 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,14 +22,14 @@ #include #include #include -#include -#include +#include #include #include #include // INTERNAL INCLUDES #include +#include #include namespace Dali @@ -152,8 +152,11 @@ void WebView::LoadUrl( const std::string& url ) mUrl = url; if( mWebEngine ) { - Dali::Image image = Dali::NativeImage::New( *mWebEngine.GetNativeImageSource() ); - mVisual = Toolkit::VisualFactory::Get().CreateVisual( image ); + Texture texture = Dali::Texture::New( *mWebEngine.GetNativeImageSource() ); + const std::string nativeImageUrl = Dali::Toolkit::TextureManager::AddTexture( texture ); + mVisual = Toolkit::VisualFactory::Get().CreateVisual( + { { Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE } , + { Toolkit::ImageVisual::Property::URL, nativeImageUrl } } ); if( mVisual ) { @@ -168,8 +171,11 @@ void WebView::LoadHTMLString( const std::string& htmlString ) { if( mWebEngine ) { - Dali::Image image = Dali::NativeImage::New( *mWebEngine.GetNativeImageSource() ); - mVisual = Toolkit::VisualFactory::Get().CreateVisual( image ); + Texture texture = Dali::Texture::New( *mWebEngine.GetNativeImageSource() ); + const std::string nativeImageUrl = Dali::Toolkit::TextureManager::AddTexture( texture ); + mVisual = Toolkit::VisualFactory::Get().CreateVisual( + { { Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE } , + { Toolkit::ImageVisual::Property::URL, nativeImageUrl } } ); if( mVisual ) {