Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
6 changes: 4 additions & 2 deletions packages/webview_flutter/tizen/inc/lwe/LWEWebView.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class LWE_EXPORT WebContainer {
const std::function<void(WebContainer*, bool mayNeedsSync)>&
onGLSwapBuffers,
const std::function<ExternalImageInfo(void)>& prepareImageCb,
const std::function<void(WebContainer*)>& renderedCb,
const std::function<void(WebContainer*, bool isRendered)>& renderedCb,
float devicePixelRatio, const char* defaultFontName, const char* locale,
const char* timezoneID);
// <--- end of function set for render with OpenGL
Expand Down Expand Up @@ -371,12 +371,14 @@ class LWE_EXPORT WebView {
virtual void Focus();
virtual void Blur();

virtual WebContainer* FetchWebContainer() = 0;
protected:
WebView(void* impl)
: m_impl(impl)
{
}

virtual WebContainer* FetchWebContainer() = 0;

void* m_impl;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,6 @@ enum class IdleModeJob {
};

constexpr int IdleModeCheckDefaultIntervalInMS{ 3000 };
}
} // namespace LWE

#endif
Binary file not shown.
11 changes: 7 additions & 4 deletions packages/webview_flutter/tizen/src/webview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ extern "C" size_t LWE_EXPORT createWebViewInstance(
const char* timezoneID,
const std::function<::LWE::WebContainer::ExternalImageInfo(void)>&
prepareImageCb,
const std::function<void(::LWE::WebContainer*)>& renderedCb);
const std::function<void(::LWE::WebContainer*, bool isRendered)>&
renderedCb);

std::string ExtractStringFromMap(const flutter::EncodableValue& arguments,
const char* key) {
Expand Down Expand Up @@ -480,9 +481,11 @@ void WebView::InitWebView() {
}
return result;
},
[this](LWE::WebContainer* c) {
FlutterMarkExternalTextureFrameAvailable(textureRegistrar_,
GetTextureId(), tbmSurface_);
[this](LWE::WebContainer* c, bool isRendered) {
if (isRendered) {
FlutterMarkExternalTextureFrameAvailable(textureRegistrar_,
GetTextureId(), tbmSurface_);
}
tbm_surface_destroy(tbmSurface_);
tbmSurface_ = nullptr;
});
Expand Down