Skip to content

Commit 598ddb6

Browse files
committed
[webview_flutter] Update LWE (flutter-tizen#26)
Signed-off-by: MuHong Byun <[email protected]>
1 parent 059ac0e commit 598ddb6

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

packages/webview_flutter/tizen/inc/lwe/LWEWebView.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class LWE_EXPORT WebContainer {
169169
const std::function<void(WebContainer*, bool mayNeedsSync)>&
170170
onGLSwapBuffers,
171171
const std::function<ExternalImageInfo(void)>& prepareImageCb,
172-
const std::function<void(WebContainer*)>& renderedCb,
172+
const std::function<void(WebContainer*, bool isRendered)>& renderedCb,
173173
float devicePixelRatio, const char* defaultFontName, const char* locale,
174174
const char* timezoneID);
175175
// <--- end of function set for render with OpenGL
@@ -371,12 +371,14 @@ class LWE_EXPORT WebView {
371371
virtual void Focus();
372372
virtual void Blur();
373373

374-
virtual WebContainer* FetchWebContainer() = 0;
375374
protected:
376375
WebView(void* impl)
377376
: m_impl(impl)
378377
{
379378
}
379+
380+
virtual WebContainer* FetchWebContainer() = 0;
381+
380382
void* m_impl;
381383
};
382384

packages/webview_flutter/tizen/inc/lwe/PlatformIntegrationData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,6 @@ enum class IdleModeJob {
270270
};
271271

272272
constexpr int IdleModeCheckDefaultIntervalInMS{ 3000 };
273-
}
273+
} // namespace LWE
274274

275275
#endif
Binary file not shown.

packages/webview_flutter/tizen/src/webview.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ extern "C" size_t LWE_EXPORT createWebViewInstance(
2424
const char* timezoneID,
2525
const std::function<::LWE::WebContainer::ExternalImageInfo(void)>&
2626
prepareImageCb,
27-
const std::function<void(::LWE::WebContainer*)>& renderedCb);
27+
const std::function<void(::LWE::WebContainer*, bool isRendered)>&
28+
renderedCb);
2829

2930
std::string ExtractStringFromMap(const flutter::EncodableValue& arguments,
3031
const char* key) {
@@ -480,9 +481,11 @@ void WebView::InitWebView() {
480481
}
481482
return result;
482483
},
483-
[this](LWE::WebContainer* c) {
484-
FlutterMarkExternalTextureFrameAvailable(textureRegistrar_,
485-
GetTextureId(), tbmSurface_);
484+
[this](LWE::WebContainer* c, bool isRendered) {
485+
if (isRendered) {
486+
FlutterMarkExternalTextureFrameAvailable(textureRegistrar_,
487+
GetTextureId(), tbmSurface_);
488+
}
486489
tbm_surface_destroy(tbmSurface_);
487490
tbmSurface_ = nullptr;
488491
});

0 commit comments

Comments
 (0)